From 8a5e40f28ee1cf4fbe4ace0fe81c95c1be35ac97 Mon Sep 17 00:00:00 2001 From: "SINGAL, KAPIL (ks220y)" Date: Mon, 16 Sep 2019 22:03:41 +0000 Subject: Changing line separator type to LF Changed Line Separator for all files using find . -type f -not -name .* -exec dos2unix {} \; Issue-ID: CCSDK-1733 Signed-off-by: SINGAL, KAPIL (ks220y) Change-Id: I2efa3276c35c0a0159c6d4debe21c0bd0b4a7b85 --- .../vLB/Plans/CONFIG_ConfigDeploy.xml | 52 ++--- .../vLB/Scripts/python/ConfigDeploy.py | 106 +++++----- .../vLB/Templates/baseconfig-mapping.json | 226 ++++++++++----------- .../vLB/Templates/baseconfig-template.vtl | 16 +- .../vLB/Templates/incremental-config-mapping.json | 226 ++++++++++----------- .../vLB/Templates/incremental-config-template.vtl | 16 +- .../vLB/Templates/nf-params-mapping.json | 130 ++++++------ 7 files changed, 386 insertions(+), 386 deletions(-) (limited to 'components/model-catalog/blueprint-model') diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Plans/CONFIG_ConfigDeploy.xml b/components/model-catalog/blueprint-model/service-blueprint/vLB/Plans/CONFIG_ConfigDeploy.xml index 92fb2aa48..d198a72dd 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Plans/CONFIG_ConfigDeploy.xml +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Plans/CONFIG_ConfigDeploy.xml @@ -1,27 +1,27 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py index 9e027e24c..04ea82ea9 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py @@ -1,54 +1,54 @@ -# Copyright (c) 2019 Bell Canada. -# -# 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. - -import netconf_constant -from common import ResolutionHelper -from time import sleep -from netconfclient import NetconfClient -from org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor import \ - NetconfComponentFunction - - -class ConfigDeploy(NetconfComponentFunction): - - def process(self, execution_request): - log = globals()[netconf_constant.SERVICE_LOG] - print(globals()) - print("Waiting 4 minutes until NETCONF server is UP on vLB ...") - sleep (240) - nc = NetconfClient(log, self, "netconf-connection") - rr = ResolutionHelper(self) - - # Get meshed template from DB - resolution_key = self.getDynamicProperties("resolution-key").asText() - payloadHostname = rr.retrieve_resolved_template_from_database(resolution_key, "baseconfig") - payloadInterface = rr.retrieve_resolved_template_from_database(resolution_key, "incremental-config") - - nc.connect() - nc.lock() - #if not response.isSuccess(): - # og.error(response.errorMessage) - nc.discard_change() - nc.edit_config(message_content=payloadInterface, edit_default_peration="none") - nc.edit_config(message_content=payloadHostname, edit_default_peration="none") - nc.validate() - nc.commit() - #nc.commit(confirmed = True, confirm_timeout=15) - nc.unlock() - nc.disconnect() - - def recover(self, runtime_exception, execution_request): - log.error("Exception in the script {}", runtime_exception) - print self.addError(runtime_exception.cause.message) +# Copyright (c) 2019 Bell Canada. +# +# 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. + +import netconf_constant +from common import ResolutionHelper +from time import sleep +from netconfclient import NetconfClient +from org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor import \ + NetconfComponentFunction + + +class ConfigDeploy(NetconfComponentFunction): + + def process(self, execution_request): + log = globals()[netconf_constant.SERVICE_LOG] + print(globals()) + print("Waiting 4 minutes until NETCONF server is UP on vLB ...") + sleep (240) + nc = NetconfClient(log, self, "netconf-connection") + rr = ResolutionHelper(self) + + # Get meshed template from DB + resolution_key = self.getDynamicProperties("resolution-key").asText() + payloadHostname = rr.retrieve_resolved_template_from_database(resolution_key, "baseconfig") + payloadInterface = rr.retrieve_resolved_template_from_database(resolution_key, "incremental-config") + + nc.connect() + nc.lock() + #if not response.isSuccess(): + # og.error(response.errorMessage) + nc.discard_change() + nc.edit_config(message_content=payloadInterface, edit_default_peration="none") + nc.edit_config(message_content=payloadHostname, edit_default_peration="none") + nc.validate() + nc.commit() + #nc.commit(confirmed = True, confirm_timeout=15) + nc.unlock() + nc.disconnect() + + def recover(self, runtime_exception, execution_request): + log.error("Exception in the script {}", runtime_exception) + print self.addError(runtime_exception.cause.message) return None \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-mapping.json index 0ab26be3b..000cbd039 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-mapping.json @@ -1,113 +1,113 @@ -[ - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "service-instance-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vnf-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vnf-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vdns_vf_module_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_vf_module_id", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ], - "version": 0 - }, - { - "name": "vdns_int_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_int_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id", - "vdns_vf_module_id" - ], - "version": 0 - }, - { - "name": "vdns_onap_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_onap_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id", - "vdns_vf_module_id" - ], - "version": 0 - } -] +[ + { + "name": "service-instance-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "service-instance-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vnf-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vnf-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vdns_vf_module_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_vf_module_id", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], + "version": 0 + }, + { + "name": "vdns_int_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_int_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id", + "vdns_vf_module_id" + ], + "version": 0 + }, + { + "name": "vdns_onap_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_onap_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id", + "vdns_vf_module_id" + ], + "version": 0 + } +] diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl index 23cd22bb3..9e73a318e 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl @@ -1,9 +1,9 @@ - { - "vdns-instance": [ - { - "ip-addr": "$vdns_int_private_ip_0", - "oam-ip-addr": "$vdns_onap_private_ip_0", - "enabled": false - } - ] + { + "vdns-instance": [ + { + "ip-addr": "$vdns_int_private_ip_0", + "oam-ip-addr": "$vdns_onap_private_ip_0", + "enabled": false + } + ] } \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-mapping.json index db29b5aa5..1aece7315 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-mapping.json @@ -1,113 +1,113 @@ -[ - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "service-instance-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vnf-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vnf-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vdns_vf_module_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_vf_module_id", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ], - "version": 0 - }, - { - "name": "vdns_int_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_int_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id", - "vdns_vf_module_id" - ], - "version": 0 - }, - { - "name": "vdns_onap_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_onap_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id", - "vdns_vf_module_id" - ], - "version": 0 - } -] +[ + { + "name": "service-instance-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "service-instance-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vnf-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vnf-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vdns_vf_module_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_vf_module_id", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], + "version": 0 + }, + { + "name": "vdns_int_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_int_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id", + "vdns_vf_module_id" + ], + "version": 0 + }, + { + "name": "vdns_onap_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_onap_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id", + "vdns_vf_module_id" + ], + "version": 0 + } +] diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl index a3cd17f65..7ec446f30 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl @@ -1,9 +1,9 @@ -{ - "vdns-instance": [ - { - "ip-addr": "$vdns_int_private_ip_0", - "oam-ip-addr": "$vdns_onap_private_ip_0", - "enabled": true - } - ] +{ + "vdns-instance": [ + { + "ip-addr": "$vdns_int_private_ip_0", + "oam-ip-addr": "$vdns_onap_private_ip_0", + "enabled": true + } + ] } \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/nf-params-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/nf-params-mapping.json index f36701d89..30004521b 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/nf-params-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/nf-params-mapping.json @@ -1,65 +1,65 @@ -[ - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "service-instance-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vnf-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vnf-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "ip", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vlb_onap_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ], - "version": 0 - } -] +[ + { + "name": "service-instance-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "service-instance-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vnf-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vnf-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "ip", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vlb_onap_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], + "version": 0 + } +] -- cgit 1.2.3-korg