From 0df592839717bd316ee5d9e866418072ff543cd8 Mon Sep 17 00:00:00 2001 From: ottero Date: Mon, 11 Mar 2019 14:03:09 +0000 Subject: Blueprint for configuring a PNF This is the first version of a blueprint, intended to be used to configure PNFs. The design considers that a blueprint will be created for each possible PNF. Change-Id: I4994149441257eb417b6d5f611e12cd81595177f Issue-ID: CCSDK-1107 Signed-off-by: ottero --- .../Definitions/activation-blueprint.json | 73 +++++-------------- .../Definitions/data_types.json | 25 +++---- .../Definitions/node_types.json | 83 +--------------------- .../Definitions/relationship_types.json | 8 +-- .../Definitions/resources_definition_types.json | 17 +---- 5 files changed, 28 insertions(+), 178 deletions(-) (limited to 'components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions') diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json index 96ae88e59..90b2e3ab0 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json @@ -1,16 +1,10 @@ - { "tosca_definitions_version" : "controller_blueprint_1_0_0", "metadata" : { "template_author" : "Rodrigo Ottero", "author-email" : "rodrigo.ottero@est.tech", "user-groups" : "ADMIN, OPERATION", - "template_name" : "pnf restconf", + "template_name" : "configuration_over_restconf", "template_version" : "1.0.0", "template_tags" : "pnf, restconf, config, configuration" }, @@ -90,15 +84,10 @@ } } }, + + "config-assign" : { "type" : "component-restconf-executor", - "requirements" : { - "restconf-connection" : { - "capability" : "restconf", - "node" : "sample-restconf-server", - "relationship" : "tosca.relationships.ConnectsTo" - } - }, "interfaces" : { "ComponentRestconfExecutor" : { "operations" : { @@ -107,12 +96,9 @@ "primary" : "component-script" }, "inputs" : { - "script-type" : "kotlin", - "script-class-reference" : "Scripts/kotlin/RestconfAssignConfig.kts", - "instance-dependencies" : [ ], - "artifact-prefix-names": [ - "config-assign" - ] + "script-type" : "jython", + "script-class-reference" : "Scripts/python/RestconfAssignConfig.py", + "instance-dependencies" : [ ] }, "outputs" : { "response-data" : "", @@ -132,11 +118,14 @@ "file" : "Templates/config-assign-pnf-mapping.json" }, "component-script" : { - "type" : "artifact-script-kotlin", - "file" : "Scripts/kotlin/RestconfAssignConfig.py" + "type" : "artifact-script-jython", + "file" : "Scripts/python/RestconfAssignConfig.py" } } }, + + + "configure-process" : { "type" : "dg-generic", "properties" : { @@ -154,13 +143,6 @@ }, "configure" : { "type" : "component-restconf-executor", - "requirements" : { - "restconf-connection" : { - "capability" : "restconf", - "node" : "sample-restconf-server", - "relationship" : "tosca.relationships.ConnectsTo" - } - }, "interfaces" : { "ComponentRestconfExecutor" : { "operations" : { @@ -169,12 +151,9 @@ "primary" : "component-script" }, "inputs" : { - "script-type" : "kotlin", - "script-class-reference" : "Scripts/kotlin/RestconfConfigure.kts", - "instance-dependencies" : [ ], - "artifact-prefix-names": [ - "configure-restconf-mount", "configure-restconf-unmount" - ] + "script-type" : "jython", + "script-class-reference" : "Scripts/python/RestconfConfigure.py", + "instance-dependencies" : [ ] }, "outputs" : { "response-data" : "", @@ -198,28 +177,8 @@ "file" : "Templates/configure-pnf-mapping.json" }, "component-script" : { - "type" : "artifact-script-kotlin", - "file" : "Scripts/kotlin/RestconfConfigure.py" - } - } - }, - "sample-restconf-device" : { - "type" : "pnf-netconf-device", - "capabilities" : { - "restconf" : { - "properties" : { - "login-key" : { - "get_input" : "password" - }, - "login-account" : { - "get_input" : "username" - }, - "target-ip-address" : { - "get_input" : "ip" - }, - "port-number" : 830, - "connection-time-out" : 5 - } + "type" : "artifact-script-jython", + "file" : "Scripts/python/RestconfConfigure.py" } } } 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 d9153f3f0..9f35eef88 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 @@ -1,22 +1,15 @@ { "data_types" : { - "dt-assign-activate-properties" : { - "description" : "Dynamic DataType definition for workflow(assign-activate).", + "dt-config-assign-properties" : { + "description" : "Dynamic DataType definition for workflow(config-assign).", "version" : "1.0.0", - "properties" : { - "hostname" : { - "type" : "string" - }, - "ip": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - }, + "properties" : { }, + "derived_from" : "tosca.datatypes.Dynamic" + }, + "dt-configure-properties" : { + "description" : "Dynamic DataType definition for workflow(configure).", + "version" : "1.0.0", + "properties" : { }, "derived_from" : "tosca.datatypes.Dynamic" } } 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 c8e3e6a93..be3bd319a 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 @@ -1,20 +1,13 @@ { "node_types" : { "component-restconf-executor" : { - "description" : "This is Restconf Configuration Component API", + "description" : "This is Restconf Transaction Configuration Component API", "version" : "1.0.0", "capabilities" : { "component-node" : { "type" : "tosca.capabilities.Node" } }, - "requirements" : { - "restconf-connection" : { - "capability" : "restconf", - "node" : "pnf-restconf-device", - "relationship" : "tosca.relationships.ConnectsTo" - } - }, "interfaces" : { "ComponentRestconfExecutor" : { "operations" : { @@ -80,24 +73,6 @@ }, "derived_from" : "tosca.nodes.DG" }, - "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" - } - } - }, - "derived_from" : "tosca.nodes.ResourceSource" - }, "tosca.nodes.Component" : { "description" : "This is default Component Node", "version" : "1.0.0", @@ -107,62 +82,6 @@ "description" : "This is Directed Graph Node Type", "version" : "1.0.0", "derived_from" : "tosca.nodes.Root" - }, - "tosca.nodes.ResourceSource" : { - "description" : "TOSCA base type for Resource Sources", - "version" : "1.0.0", - "derived_from" : "tosca.nodes.Root" - }, - "tosca.nodes.Vnf" : { - "description" : "This is VNF Node Type", - "version" : "1.0.0", - "derived_from" : "tosca.nodes.Root" - }, - "tosca.nodes.Pnf": { - "description": "This is the PNF Node Type", - "version": "1.0.0", - "derived_from": "tosca.nodes.Root" - }, - "pnf-restconf-device" : { - "description" : "This is a PNF Device with Restconf Capability", - "version" : "1.0.0", - "capabilities" : { - "netconf" : { - "type" : "tosca.capabilities.Restconf", - "properties" : { - "login-key" : { - "required" : true, - "type" : "string", - "default" : "sdnc" - }, - "login-account" : { - "required" : true, - "type" : "string", - "default" : "sdnc-tacacs" - }, - "source" : { - "required" : false, - "type" : "string", - "default" : "npm" - }, - "target-ip-address" : { - "required" : true, - "type" : "string" - }, - "port-number" : { - "required" : true, - "type" : "integer", - "default" : 830 - }, - "connection-time-out" : { - "required" : false, - "type" : "integer", - "default" : 30 - } - } - } - }, - "derived_from" : "tosca.nodes.Pnf" } } } \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/relationship_types.json index 027bfc0fc..4ddd7a57c 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/relationship_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/relationship_types.json @@ -1,9 +1,3 @@ { - "relationship_types" : { - "tosca.relationships.ConnectsTo" : { - "description" : "Relationship tosca.relationships.ConnectsTo", - "version" : "1.0.0", - "derived_from" : "tosca.relationships.Root" - } - } + "relationship_types" : { } } \ No newline at end of file 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 b77f451ad..6f31cf5a2 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,16 +1 @@ -{ - "hostname" : { - "tags" : "hostname", - "name" : "hostname", - "property" : { - "description" : "hostname", - "type" : "string" - }, - "updated-by" : "Singal, Kapil ", - "sources" : { - "input" : { - "type" : "source-input" - } - } - } -} \ No newline at end of file +{ } \ No newline at end of file -- cgit 1.2.3-korg