Retrieving PNF IP address from payload 54/84354/2
authorottero <rodrigo.ottero@est.tech>
Fri, 5 Apr 2019 14:47:21 +0000 (14:47 +0000)
committerottero <rodrigo.ottero@est.tech>
Fri, 5 Apr 2019 14:47:21 +0000 (14:47 +0000)
PNF IP is now retrieved from the payload

Issue-ID: CCSDK-926

Change-Id: I6942fc0000564553ae16bd1067351f00ca254d10
Signed-off-by: ottero <rodrigo.ottero@est.tech>
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl
components/model-catalog/resource-dictionary/starter-dictionary/nf-id.json [moved from components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json with 73% similarity]
components/model-catalog/resource-dictionary/starter-dictionary/pnf-ipv4-address.json [new file with mode: 0755]
ms/blueprintsprocessor/application/src/main/resources/logback.xml

index 2a866c9..536295e 100644 (file)
@@ -1,22 +1,22 @@
 [
   {
-    "name": "pnf-id",
+    "name": "nf-id",
     "input-param": true,
     "property": {
       "type": "string"
     },
-    "dictionary-name": "pnf-id",
+    "dictionary-name": "nf-id",
     "dictionary-source": "input",
     "dependencies": [
     ]
   },
   {
-    "name": "pnf-name",
+    "name": "pnf-ipv4-address",
     "input-param": true,
     "property": {
       "type": "string"
     },
-    "dictionary-name": "pnf-name",
+    "dictionary-name": "pnf-ipv4-address",
     "dictionary-source": "input",
     "dependencies": [
     ]
index 9e9350c..e94bb0f 100644 (file)
       "description" : "Dynamic DataType definition for workflow(config-deploy).",
       "version" : "1.0.0",
       "properties" : {
-        "pnf-id" : {
+        "pnf-ipv4-address" : {
           "type" : "string"
         },
-        "pnf-name" : {
+        "nf-id" : {
           "type" : "string"
         }
       },
index 4a00417..d6f702a 100644 (file)
     "source-input" : {
       "description" : "This is Input Resource Source Node Type",
       "version" : "1.0.0",
-      "properties" : {
-        "key" : {
-          "required" : false,
-          "type" : "string"
-        },
-        "key-dependencies" : {
-          "required" : true,
-          "type" : "list",
-          "entry_schema" : {
-            "type" : "string"
-          }
-        }
-      },
+      "properties" : { },
       "derived_from" : "tosca.nodes.ResourceSource"
     },
     "tosca.nodes.Component" : {
       "version" : "1.0.0",
       "derived_from" : "tosca.nodes.Root"
     },
-    "tosca.nodes.Workflow" : {
-      "description" : "This is Directed Graph Node Type",
+    "tosca.nodes.ResourceSource" : {
+      "description" : "TOSCA base type for Resource Sources",
       "version" : "1.0.0",
       "derived_from" : "tosca.nodes.Root"
     },
-    "tosca.nodes.ResourceSource" : {
-      "description" : "TOSCA base type for Resource Sources",
+    "tosca.nodes.Workflow" : {
+      "description" : "This is Directed Graph Node Type",
       "version" : "1.0.0",
       "derived_from" : "tosca.nodes.Root"
     }
index 189cbf8..0153276 100644 (file)
@@ -1,9 +1,9 @@
 {
-  "pnf-id" : {
-    "tags" : "pnf-id",
-    "name" : "pnf-id",
+  "nf-id" : {
+    "tags" : "nf-id",
+    "name" : "nf-id",
     "property" : {
-      "description" : "pnf-id",
+      "description" : "nf-id",
       "type" : "string"
     },
     "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
       }
     }
   },
-  "pnf-name" : {
-    "tags" : "pnf-name",
-    "name" : "pnf-name",
+  "pnf-ipv4-address" : {
+    "tags" : "pnf-ipv4-address",
+    "name" : "pnf-ipv4-address",
     "property" : {
-      "description" : "pnf-name",
+      "description" : "pnf-ipv4-address",
       "type" : "string"
     },
     "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
index d65aefa..2402c5b 100644 (file)
@@ -67,9 +67,9 @@ class RestconfConfigDeploy(RestconfComponentFunction):
     def retrieve_parameters(self, execution_request):
         resolution_key = self.getDynamicProperties("resolution-key").asText()
         self.log.info("resolution_key: {}", resolution_key)
-        pnf_id = execution_request.payload.get("config-deploy-request").get("config-deploy-properties").get("pnf-id")
+        pnf_id = execution_request.payload.get("config-deploy-request").get("config-deploy-properties").get("nf-id")
         pnf_id = str(pnf_id).strip('\"')
-        self.log.info("pnf-id: {}", pnf_id)
+        self.log.info("nf-id: {}", pnf_id)
         return pnf_id, resolution_key
 
     def recover(self, runtime_exception, execution_request):
index 1f3f94d..caad02b 100644 (file)
@@ -1,10 +1,10 @@
 <node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
-    <node-id>$pnf-id</node-id>
+    <node-id>$nf-id</node-id>
     <key-based xmlns="urn:opendaylight:netconf-node-topology">
         <key-id xmlns="urn:opendaylight:netconf-node-topology">ODL-private-key</key-id>
         <username xmlns="urn:opendaylight:netconf-node-topology">netconf</username>
      </key-based>
-    <host xmlns="urn:opendaylight:netconf-node-topology">$pnf-name</host>
+    <host xmlns="urn:opendaylight:netconf-node-topology">$pnf-ipv4-address</host>
     <port xmlns="urn:opendaylight:netconf-node-topology">6513</port>
     <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only>
     <protocol xmlns="urn:opendaylight:netconf-node-topology">
@@ -1,9 +1,9 @@
 {
-  "name" : "pnf-id",
-  "tags" : "pnf-id",
+  "name" : "nf-id",
+  "tags" : "nf-id",
   "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
   "property" : {
-    "description" : "pnf-id",
+    "description" : "nf-id",
     "type" : "string"
   },
   "sources" : {
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pnf-ipv4-address.json b/components/model-catalog/resource-dictionary/starter-dictionary/pnf-ipv4-address.json
new file mode 100755 (executable)
index 0000000..ce96d52
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "pnf-ipv4-address",
+  "tags" : "pnf-ipv4-address",
+  "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
+  "property" : {
+    "description" : "pnf-ipv4-address",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
index e0bd7ca..1c3c7dc 100644 (file)
@@ -29,7 +29,7 @@
     <logger name="org.hibernate" level="error"/>\r
     <logger name="org.onap.ccsdk.cds" level="info"/>\r
 \r
-    <root level="warn">\r
+    <root level="info">\r
         <appender-ref ref="STDOUT"/>\r
     </root>\r
 \r