From a47cb28a3c6e7694233c3de1127f8ce9a1aa739c 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 +---- .../Plans/CONFIG_configAssign.xml | 4 -- .../capability_restconf/Plans/CONFIG_configure.xml | 4 -- .../Scripts/RestconfAssignConfig.kts | 1 - .../Scripts/RestconfConfigure.kts | 1 - .../Scripts/python/RestconfAssignConfig.py | 38 ++++++++++ .../Scripts/python/RestconfConfigure.py | 38 ++++++++++ .../capability_restconf/TOSCA-Metada/TOSCA.meta | 5 -- .../capability_restconf/TOSCA-Metadata/TOSCA.meta | 5 ++ .../Templates/config-assign-pnf-mapping.json | 15 +--- .../Templates/configure-pnf-mapping.json | 37 +--------- .../configure-restconf-mount-template.vtl | 8 +-- ms/blueprintsprocessor/application/pom.xml | 4 ++ .../src/main/resources/application-dev.properties | 9 ++- .../src/main/resources/application.properties | 11 ++- .../kotlin/scripts/InternalSimpleRestconf.cba.kts | 18 ----- .../BluePrintArtifactDefinitionValidatorImpl.kt | 2 +- .../enhancer/BluePrintEnhancerServiceImplTest.kt | 2 +- 22 files changed, 139 insertions(+), 269 deletions(-) delete mode 100644 components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/RestconfAssignConfig.kts delete mode 100644 components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/RestconfConfigure.kts create mode 100644 components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfAssignConfig.py create mode 100644 components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigure.py delete mode 100644 components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metada/TOSCA.meta create mode 100644 components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metadata/TOSCA.meta 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 96ae88e5..90b2e3ab 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 d9153f3f..9f35eef8 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 c8e3e6a9..be3bd319 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 027bfc0f..4ddd7a57 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 b77f451a..6f31cf5a 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 diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configAssign.xml b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configAssign.xml index 417f72de..220cba9f 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configAssign.xml +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configAssign.xml @@ -1,7 +1,3 @@ - - diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configure.xml b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configure.xml index 94fe6dde..c48ffbed 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configure.xml +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configure.xml @@ -1,7 +1,3 @@ - - diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/RestconfAssignConfig.kts b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/RestconfAssignConfig.kts deleted file mode 100644 index a0990367..00000000 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/RestconfAssignConfig.kts +++ /dev/null @@ -1 +0,0 @@ -TBD diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/RestconfConfigure.kts b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/RestconfConfigure.kts deleted file mode 100644 index a0990367..00000000 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/RestconfConfigure.kts +++ /dev/null @@ -1 +0,0 @@ -TBD diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfAssignConfig.py b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfAssignConfig.py new file mode 100644 index 00000000..36dd32ff --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfAssignConfig.py @@ -0,0 +1,38 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + + +from org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor import \ + RestconfComponentFunction + + +class RestconfAssignConfig(RestconfComponentFunction): + + + def process(self, execution_request): + # create instances of the needed objects + # retrieve any needed information not present on the request, like pnf ip + # create the configlet + # persist the configlet + # end + print("process", execution_request) + + + def recover(self, runtime_exception, execution_request): + print("recover") + return None \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigure.py b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigure.py new file mode 100644 index 00000000..c584baa9 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigure.py @@ -0,0 +1,38 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + + +from org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor import \ + RestconfComponentFunction + + +class RestconfConfigure(RestconfComponentFunction): + + + def process(self, execution_request): + # create instances of the needed objects + # retrieve any needed information not present on the request, like pnf ip + # retrieve the configlet + # send the configlet + # end + print("process", execution_request) + + + def recover(self, runtime_exception, execution_request): + print("recover") + return None diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metada/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metada/TOSCA.meta deleted file mode 100644 index 6ac9caf5..00000000 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metada/TOSCA.meta +++ /dev/null @@ -1,5 +0,0 @@ -TOSCA-Meta-File-Version: 1.0.0 -CSAR-Version: 1.0 -Created-By: Rodrigo Ottero -Entry-Definitions: Definitions/activation-blueprint.json -Template-Tags: activation-blueprint diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metadata/TOSCA.meta new file mode 100644 index 00000000..6ac9caf5 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metadata/TOSCA.meta @@ -0,0 +1,5 @@ +TOSCA-Meta-File-Version: 1.0.0 +CSAR-Version: 1.0 +Created-By: Rodrigo Ottero +Entry-Definitions: Definitions/activation-blueprint.json +Template-Tags: activation-blueprint diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-pnf-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-pnf-mapping.json index 85533abc..41b42e67 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-pnf-mapping.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-pnf-mapping.json @@ -1,16 +1,3 @@ - [ - { - "name": "odl_host", - "input-param": true, - "property": { - "type": "string" - }, - "dictionary-name": "odl_host", - "dictionary-source": "capability", - "dependencies": [ - ] - } + ] diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-pnf-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-pnf-mapping.json index 123680c0..41b42e67 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-pnf-mapping.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-pnf-mapping.json @@ -1,38 +1,3 @@ - [ - { - "name": "pnf_id", - "input-param": true, - "property": { - "type": "string" - }, - "dictionary-name": "pnf_id", - "dictionary-source": "capability", - "dependencies": [ - ] - }, - { - "name": "pnf_ip", - "input-param": true, - "property": { - "type": "string" - }, - "dictionary-name": "pnf_ip", - "dictionary-source": "capability", - "dependencies": [ - ] - }, - { - "name": "pnf_ip_port", - "input-param": true, - "property": { - "type": "string" - }, - "dictionary-name": "pnf_ip_port", - "dictionary-source": "capability", - "dependencies": [ - ] - } + ] diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-restconf-mount-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-restconf-mount-template.vtl index 17f7a367..a899aa45 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-restconf-mount-template.vtl +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-restconf-mount-template.vtl @@ -1,14 +1,14 @@ - $pnf_id + $pnf-id ODL-private-key netconf - $pnf_ip - $pnf_ip_port + $pnf-ip + 6513 false TLS - 2 + 5 diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index f42cdfad..c96bd086 100755 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -59,6 +59,10 @@ org.onap.ccsdk.apps.blueprintsprocessor.functions netconf-executor + + org.onap.ccsdk.apps.blueprintsprocessor.functions + restconf-executor + org.onap.ccsdk.apps.blueprintsprocessor selfservice-api diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties index b1f16898..380eb201 100755 --- a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties +++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties @@ -38,4 +38,11 @@ blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5Inno # Python executor blueprints.processor.functions.python.executor.executionPath=./../../../components/scripts/python/ccsdk_blueprints -blueprints.processor.functions.python.executor.modulePaths=./../../../components/scripts/python/ccsdk_blueprints \ No newline at end of file +blueprints.processor.functions.python.executor.modulePaths=./../../../components/scripts/python/ccsdk_blueprints + +# SDN-C's ODL Restconf Connection Details +blueprintsprocessor.restconfEnabled=true +blueprintsprocessor.restclient.sdncodl.type=basic-auth +blueprintsprocessor.restclient.sdncodl.url=http://localhost:8282/ +blueprintsprocessor.restclient.sdncodl.userId=admin +blueprintsprocessor.restclient.sdncodl.token=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U \ No newline at end of file diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties index e955c97c..8cafceba 100755 --- a/ms/blueprintsprocessor/application/src/main/resources/application.properties +++ b/ms/blueprintsprocessor/application/src/main/resources/application.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2017-2019 AT&T, IBM, Bell Canada. +# Copyright (c) 2017-2019 AT&T, IBM, Bell Canada, Nordix Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,9 +21,11 @@ server.port=8080 blueprintsprocessor.grpcEnable=false blueprintsprocessor.httpPort=8080 blueprintsprocessor.grpcPort=9111 + # Blueprint Processor File Execution and Handling Properties blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive + # Primary Database Configuration blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl blueprintsprocessor.db.primary.username=sdnctl @@ -33,9 +35,16 @@ blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=update blueprintsprocessor.db.primary.hibernateDDLAuto=update blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect + # Python executor blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython/ccsdk_blueprints blueprints.processor.functions.python.executor.modulePaths=/opt/app/onap/scripts/jython/ccsdk_blueprints,/opt/app/onap/scripts/jython/ccsdk_netconf security.user.password: {bcrypt}$2a$10$duaUzVUVW0YPQCSIbGEkQOXwafZGwQ/b32/Ys4R1iwSSawFgz7QNu security.user.name: ccsdkapps + +# SDN-C's ODL Restconf Connection Details +blueprintsprocessor.restconfEnabled=true +blueprintsprocessor.restclient.sdncodl.type=basic-auth +blueprintsprocessor.restclient.sdncodl.url=http://sdnc:8282/ +blueprintsprocessor.restclient.sdncodl.userId=admin diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts index dbbebe52..588f7f10 100644 --- a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts +++ b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts @@ -52,7 +52,6 @@ open class MountNEditConfigure : RestconfComponentFunction() { override fun process(executionRequest: ExecutionServiceInput) { val webClientService = restClientService("odlparent") - println("foi?") TODO("not implemented") //To change body of created functions use File | Settings | File Templates. } @@ -60,7 +59,6 @@ open class MountNEditConfigure : RestconfComponentFunction() { TODO("not implemented") //To change body of created functions use File | Settings | File Templates. } - } /** @@ -82,19 +80,3 @@ open class TestRestconfConfigure : RestconfComponentFunction() { log.info("recovering..") } } - - - -println("zzzzzzzzzzzzz") -val x = MountNEditConfigure() -println(x.getName()) -val executionServiceInput = ExecutionServiceInput().apply { - commonHeader = CommonHeader().apply { - requestId = "1234" - } - actionIdentifiers = ActionIdentifiers().apply { - actionName = "activate" - } - payload = JacksonUtils.jsonNode("{}") as ObjectNode -} -x.process(executionServiceInput); \ No newline at end of file diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt index 4ea5ab5b..8072f283 100644 --- a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt +++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt @@ -58,7 +58,7 @@ open class BluePrintArtifactDefinitionValidatorImpl( val completePath = bluePrintContext.rootPath.plus(File.separator).plus(file) check(File(completePath).exists()) { - throw BluePrintException("couldn't file ($completePath)") + throw BluePrintException("couldn't find file ($completePath)") } // Perform Extension Validation diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt index ccacee02..3bfb3d2b 100644 --- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt +++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt @@ -65,7 +65,7 @@ class BluePrintEnhancerServiceImplTest { val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration" val targetPath = Paths.get("target", "bp-enhance").toUri().path - + val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath) Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext) -- cgit 1.2.3-korg