From b3aceebc81daf3b64d043cf6e835a7ec5ebadd34 Mon Sep 17 00:00:00 2001 From: ottero Date: Fri, 5 Apr 2019 14:47:21 +0000 Subject: Retrieving PNF IP address from payload PNF IP is now retrieved from the payload Issue-ID: CCSDK-926 Change-Id: I6942fc0000564553ae16bd1067351f00ca254d10 Signed-off-by: ottero --- .../Definitions/config-deploy-pnf-mapping.json | 8 ++++---- .../Definitions/data_types.json | 4 ++-- .../Definitions/node_types.json | 22 +++++----------------- .../Definitions/resources_definition_types.json | 16 ++++++++-------- .../Scripts/python/RestconfConfigDeploy.py | 4 ++-- .../config-deploy-restconf-mount-template.vtl | 4 ++-- .../starter-dictionary/nf-id.json | 15 +++++++++++++++ .../starter-dictionary/pnf-id.json | 15 --------------- .../starter-dictionary/pnf-ipv4-address.json | 15 +++++++++++++++ 9 files changed, 53 insertions(+), 50 deletions(-) create mode 100755 components/model-catalog/resource-dictionary/starter-dictionary/nf-id.json delete mode 100755 components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json create mode 100755 components/model-catalog/resource-dictionary/starter-dictionary/pnf-ipv4-address.json (limited to 'components/model-catalog') diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json index 2a866c9b5..536295ef7 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json @@ -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": [ ] diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json index 9e9350c81..e94bb0f6b 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json @@ -10,10 +10,10 @@ "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" } }, diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json index 4a0041773..d6f702a9f 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json @@ -160,19 +160,7 @@ "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" : { @@ -180,13 +168,13 @@ "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" } diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json index 189cbf86f..01532769b 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json @@ -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 ", @@ -14,11 +14,11 @@ } } }, - "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 ", diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py index d65aefabb..2402c5b1a 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py @@ -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): diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl index 1f3f94d4e..caad02bce 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl @@ -1,10 +1,10 @@ - $pnf-id + $nf-id ODL-private-key netconf - $pnf-name + $pnf-ipv4-address 6513 false diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/nf-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/nf-id.json new file mode 100755 index 000000000..a140a442f --- /dev/null +++ b/components/model-catalog/resource-dictionary/starter-dictionary/nf-id.json @@ -0,0 +1,15 @@ +{ + "name" : "nf-id", + "tags" : "nf-id", + "updated-by" : "Rodrigo Ottero ", + "property" : { + "description" : "nf-id", + "type" : "string" + }, + "sources" : { + "input" : { + "type" : "source-input", + "properties" : { } + } + } +} \ No newline at end of file diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json deleted file mode 100755 index 32468533a..000000000 --- a/components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name" : "pnf-id", - "tags" : "pnf-id", - "updated-by" : "Rodrigo Ottero ", - "property" : { - "description" : "pnf-id", - "type" : "string" - }, - "sources" : { - "input" : { - "type" : "source-input", - "properties" : { } - } - } -} \ No newline at end of file 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 index 000000000..ce96d5296 --- /dev/null +++ b/components/model-catalog/resource-dictionary/starter-dictionary/pnf-ipv4-address.json @@ -0,0 +1,15 @@ +{ + "name" : "pnf-ipv4-address", + "tags" : "pnf-ipv4-address", + "updated-by" : "Rodrigo Ottero ", + "property" : { + "description" : "pnf-ipv4-address", + "type" : "string" + }, + "sources" : { + "input" : { + "type" : "source-input", + "properties" : { } + } + } +} \ No newline at end of file -- cgit 1.2.3-korg