summaryrefslogtreecommitdiffstats
path: root/components/scripts
diff options
context:
space:
mode:
authorEliezio Oliveira <eliezio.oliveira@est.tech>2019-07-31 11:50:26 +0100
committerDan Timoney <dtimoney@att.com>2019-08-09 19:46:17 +0000
commit1e7e4a53684df04ba248c20d884ba907ca7c2870 (patch)
treed75f0c3b55ada932c42cff18ba120e3c337c37f4 /components/scripts
parent1596f69d2e59a158ae509e798448a398b2c9559f (diff)
Add declarative acceptance tests
First two UATs are for blueprints Echo and "PNF Configuration". The body of the ODL mount request was changed from XML to JSON, so it can be represented in a YAML file. Initial documentation about the UATs can be found at components/model-catalog/blueprint-model/uat-blueprints/README.md BluePrintArchiveUtils.recurseFiles() replaced by compressFolder() that uses native Java 7. Removed commons-compress as dependency since is no longer used. Change-Id: I96a584ae12ca009f90fe8fe9485eb57ce05e8add Issue-ID: CCSDK-1569 Signed-off-by: Eliezio Oliveira <eliezio.oliveira@est.tech>
Diffstat (limited to 'components/scripts')
-rw-r--r--components/scripts/python/ccsdk_restconf/restconf_client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/scripts/python/ccsdk_restconf/restconf_client.py b/components/scripts/python/ccsdk_restconf/restconf_client.py
index 43f2a02c4..927c1fedd 100644
--- a/components/scripts/python/ccsdk_restconf/restconf_client.py
+++ b/components/scripts/python/ccsdk_restconf/restconf_client.py
@@ -43,9 +43,9 @@ class RestconfClient:
return ResourceResolutionExtensionsKt.storedContentFromResolvedArtifact(self.__component_function, key,
artifact_template)
- def mount_device(self, web_client_service, nf_id, mount_payload):
+ def mount_device(self, web_client_service, nf_id, mount_payload, content_type="application/xml"):
self.__log.debug("mounting device {}", nf_id)
- headers = {"Content-Type": "application/xml"}
+ headers = {"Content-Type": content_type}
url = self.__base_odl_url + nf_id
self.__log.debug("sending mount request, url: {}", url)
web_client_service.exchangeResource("PUT", url, mount_payload, headers)