aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog
diff options
context:
space:
mode:
Diffstat (limited to 'components/model-catalog')
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py10
1 files changed, 9 insertions, 1 deletions
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