summaryrefslogtreecommitdiffstats
path: root/runtime/src/test/resources/http-cache/third_party_proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/test/resources/http-cache/third_party_proxy.py')
-rw-r--r--runtime/src/test/resources/http-cache/third_party_proxy.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/src/test/resources/http-cache/third_party_proxy.py b/runtime/src/test/resources/http-cache/third_party_proxy.py
index 67af21470..786c366e0 100644
--- a/runtime/src/test/resources/http-cache/third_party_proxy.py
+++ b/runtime/src/test/resources/http-cache/third_party_proxy.py
@@ -340,6 +340,16 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
with open(cached_file_content, 'w+') as f:
f.write(self.data_string)
return True
+ elif (self.path.startswith("/onap/controlloop/v2/instanceProperties")) and http_type == "DELETE":
+ print("self.path start with /instanceProperties Deleting instance properties, generating response json...")
+ jsonGenerated = "{\"errorDetails\": null,\"affectedControlLoopDefinitions\": [{ \"name\": \"PMSH_Instance1\", \"version\": \"2.3.1\" }]}"
+ self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
+ return True
+ elif (self.path.startswith("/onap/controlloop/v2/instantiation/command")) and http_type == "PUT":
+ print("self.path start with /instantiation/command Changing order state, generating response json...")
+ jsonGenerated = "{\"orderedState\":\"PASSIVE\",\"controlLoopIdentifierList\":[{\"name\":\"PMSH_Instance1\",\"version\":\"2.3.1\"}]}"
+ self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
+ return True
else:
return False