X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=components%2Fmodel-catalog%2Fblueprint-model%2Ftest-blueprint%2Fcapability_restconf%2FScripts%2Fpython%2FRestconfConfigDeploy.py;h=7bda87229330e8fd9323acbd3e9b1454ee5ca03f;hb=3c1781135b4029fdc657b2009259d3b8ddd8eebc;hp=d65aefabb962d8727b627f7a221ed994568e50ca;hpb=20eda4bcdd1c32890d0a16a556cee1bfbbc08353;p=ccsdk%2Fcds.git 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..7bda87229 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 @@ -14,15 +14,13 @@ # limitations under the License. # ============LICENSE_END========================================================= -from org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor import \ - RestconfComponentFunction from java.lang import Exception as JavaException from restconf_client import RestconfClient +from org.onap.ccsdk.cds.blueprintsprocessor.services.execution import AbstractScriptComponentFunction -class RestconfConfigDeploy(RestconfComponentFunction): - +class RestconfConfigDeploy(AbstractScriptComponentFunction): log = globals()["log"] configlet_template_name = "config-assign" configlet_resource_path = "/yang-ext:mount/mynetconf:netconflist" @@ -34,11 +32,11 @@ class RestconfConfigDeploy(RestconfComponentFunction): try: restconf_client = RestconfClient(self.log, self) pnf_id, resolution_key = self.retrieve_parameters(execution_request) - web_client_service = self.restClientService(self.restconf_server_identifier) + web_client_service = restconf_client.web_client_service(self.restconf_server_identifier) try: # mount the device - mount_payload = self.resolveAndGenerateMessage("config-deploy-mapping", "config-deploy-template") + mount_payload = restconf_client.resolve_and_generate_message_from_template_prefix("config-deploy") restconf_client.mount_device(web_client_service, pnf_id, mount_payload) # log the current configuration subtree @@ -47,7 +45,7 @@ class RestconfConfigDeploy(RestconfComponentFunction): self.log.info("Current configuration subtree: {}", current_configuration) # apply configuration - configlet = self.resolveFromDatabase(resolution_key, self.configlet_template_name) + configlet = restconf_client.retrieve_resolved_template_from_database(resolution_key, self.configlet_template_name) restconf_client.configure_device_json_patch( web_client_service, pnf_id, self.configlet_resource_path, configlet) except Exception, err: