From 4ed95b21e9f961039f362108e79ce8c7059d2809 Mon Sep 17 00:00:00 2001 From: ottero Date: Thu, 28 Mar 2019 13:30:47 +0000 Subject: Addressing last review comments Addressing comments done in the last review: https://gerrit.onap.org/r/#/c/83516/ Change-Id: I5bdac316fd07b5a82eea7a67425d8c402514c46a Issue-ID: CCSDK-926 Signed-off-by: ottero --- .../capability_restconf/Scripts/python/RestconfConfigDeploy.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'components/model-catalog/blueprint-model') 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 78a38a225..d65aefabb 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 @@ -37,11 +37,19 @@ class RestconfConfigDeploy(RestconfComponentFunction): web_client_service = self.restClientService(self.restconf_server_identifier) try: + # mount the device mount_payload = self.resolveAndGenerateMessage("config-deploy-mapping", "config-deploy-template") restconf_client.mount_device(web_client_service, pnf_id, mount_payload) + # log the current configuration subtree + current_configuration = restconf_client.retrieve_device_configuration_subtree( + web_client_service, pnf_id, self.configlet_resource_path) + self.log.info("Current configuration subtree: {}", current_configuration) + + # apply configuration configlet = self.resolveFromDatabase(resolution_key, self.configlet_template_name) - restconf_client.configure_device(web_client_service, pnf_id, self.configlet_resource_path, configlet) + restconf_client.configure_device_json_patch( + web_client_service, pnf_id, self.configlet_resource_path, configlet) except Exception, err: self.log.error("an error occurred while configuring device {}", err) raise err -- cgit 1.2.3-korg