diff --git a/src/test/resources/clds/templates/ui-alarm-default.json b/src/test/resources/clds/templates/ui-alarm-default.json
index 0d08359..c851e6c 100644
--- a/src/test/resources/clds/templates/ui-alarm-default.json
+++ b/src/test/resources/clds/templates/ui-alarm-default.json
@@ -267,7 +267,7 @@
 	"jnxSpaceSNAProcessUp": "vDBE-EMS-Juniper: jnxSpaceSNAProcessUp",
 	"jnxSpaceNodeDown": "vDBE-EMS-Juniper: jnxSpaceNodeDown",
 	"jnxSpaceNodeUp": "vDBE-EMS-Juniper: jnxSpaceNodeUp",
-	" jnxSpaceNodeRemoval": "vDBE-EMS-Juniper:  jnxSpaceNodeRemoval",
+	"jnxSpaceNodeRemoval": "vDBE-EMS-Juniper:  jnxSpaceNodeRemoval",
 	"jnxCmCfgChange": "vDBE-Juniper: jnxCmCfgChange",
 	"jnxCmRescueChange": "vDBE-Juniper: jnxCmRescueChange",
 	"jnxEventTrap": "vDBE-Juniper: jnxEventTrap",
diff --git a/src/test/resources/http-cache/example/pdp/api/deletePolicy/.file b/src/test/resources/http-cache/example/pdp/api/deletePolicy/.file
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/src/test/resources/http-cache/example/pdp/api/deletePolicy/.file
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/src/test/resources/http-cache/example/pdp/api/deletePolicy/.header b/src/test/resources/http-cache/example/pdp/api/deletePolicy/.header
new file mode 100644
index 0000000..6a280d9
--- /dev/null
+++ b/src/test/resources/http-cache/example/pdp/api/deletePolicy/.header
@@ -0,0 +1 @@
+{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"}
\ No newline at end of file
diff --git a/src/test/resources/http-cache/start_http_cache.sh b/src/test/resources/http-cache/start_http_cache.sh
index fe9e991..47c3cc8 100755
--- a/src/test/resources/http-cache/start_http_cache.sh
+++ b/src/test/resources/http-cache/start_http_cache.sh
@@ -34,4 +34,4 @@
 echo 'Installing requests packages for Python'
 pip install requests
 echo 'Executing the Http proxy in Cache mode only'
-python third_party_proxy.py --port 8080 --root /usr/src/http-cache-app/data-cache
+python third_party_proxy.py --port 8080 --root /usr/src/http-cache-app/data-cache --proxyaddress localhost:8085
diff --git a/src/test/resources/http-cache/third_party_proxy.py b/src/test/resources/http-cache/third_party_proxy.py
index 72ea495..29d34cc 100755
--- a/src/test/resources/http-cache/third_party_proxy.py
+++ b/src/test/resources/http-cache/third_party_proxy.py
@@ -41,6 +41,7 @@
 parser.add_argument("--proxy"         , type=str, help="Url of the  Act as a proxy. If not set, this script only uses the cache and will return a 404 if files aren't found")
 parser.add_argument("--port",     "-P", type=int, default="8081", help="Port on which the proxy should listen to")
 parser.add_argument("--verbose",  "-v", type=bool, help="Print more information in case of error")
+parser.add_argument("--proxyaddress","-a", type=str, help="Address of this proxy, generally either third_party_proxy:8085 or localhost:8085 depending if started with docker-compose or not")
 options = parser.parse_args()
 
 
@@ -49,6 +50,7 @@
 AUTH = (options.username, options.password)
 HEADERS = {'X-ECOMP-InstanceID':'CLAMP'}
 CACHE_ROOT = options.root
+PROXY_ADDRESS=options.proxyaddress
 
 def signal_handler(signal_sent, frame):
     global httpd
@@ -116,7 +118,17 @@
 
                 os.makedirs(cached_file, True)
                 with open(cached_file_header, 'w') as f:
-                    f.write("{\"Content-Length\": \"144\", \"Content-Type\": \"application/json\"}")
+                    f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
+                with open(cached_file_content, 'w') as f:
+                    f.write(jsonGenerated)
+            elif self.path.startswith("/dcae-operationstatus"):
+                print "self.path start with /dcae-operationstatus, generating response json..."
+                jsonGenerated =  "{\"operationType\": \"operationType1\", \"status\": \"succeeded\"}"
+                print "jsonGenerated: " + jsonGenerated
+
+                os.makedirs(cached_file, True)
+                with open(cached_file_header, 'w') as f:
+                    f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
                 with open(cached_file_content, 'w') as f:
                     f.write(jsonGenerated)
             else:
@@ -215,27 +227,91 @@
         cached_file_header = "%s/.header" % (cached_file,)
 
         _file_available = os.path.exists(cached_file_content)
-        if not _file_available and not HOST:
-            print("No file corresponding in cache and no HOST specified: %s" % HOST)
-            self.send_response(404)
-            return "404 Not found"
 
         if not _file_available:
-            print("Request for data currently not present in cache: %s" % (cached_file,))
+            if self.path.startswith("/dcae-deployments/"):
+                print "self.path start with /dcae-deployments/, generating response json..."
+                #jsondata = json.loads(self.data_string)
+                jsonGenerated = "{\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus\",\"test2\":\"test2\"}}"
+                print "jsonGenerated: " + jsonGenerated
 
-            url = '%s%s' % (HOST, self.path)
-            print("url: %s" % (url,))
-            response = requests.put(url, data=self.data_string, headers=self.headers, stream=True)
-
-            if response.status_code == 200:
-                self._write_cache(cached_file, cached_file_header, cached_file_content, response)
+                os.makedirs(cached_file, True)
+                with open(cached_file_header, 'w') as f:
+                    f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
+                with open(cached_file_content, 'w') as f:
+                    f.write(jsonGenerated)
             else:
-                print('Error when requesting file :')
-                print('Requested url : %s' % (url,))
-                print('Status code : %s' % (response.status_code,))
-                print('Content : %s' % (response.content,))
-                self.send_response(response.status_code)
-                return response.content
+                if not HOST:
+                    self.send_response(404)
+                    return "404 Not found"
+
+                print("Request for data currently not present in cache: %s" % (cached_file,))
+
+                url = '%s%s' % (HOST, self.path)
+                print("url: %s" % (url,))
+                response = requests.put(url, data=self.data_string, headers=self.headers, stream=True)
+
+                if response.status_code == 200:
+                    self._write_cache(cached_file, cached_file_header, cached_file_content, response)
+                else:
+                    print('Error when requesting file :')
+                    print('Requested url : %s' % (url,))
+                    print('Status code : %s' % (response.status_code,))
+                    print('Content : %s' % (response.content,))
+                    self.send_response(response.status_code)
+                    return response.content
+        else:
+            print("Request for data present in cache: %s" % (cached_file,))
+
+        self._send_content(cached_file_header, cached_file_content)
+
+
+    def do_DELETE(self):
+        print("\n\n\nGot a DELETE for %s " % self.path)
+        self.check_credentials()
+        print("self.headers:\n %s" % self.headers)
+
+        cached_file = '%s/%s' % (CACHE_ROOT, self.path,)
+        print("Cached file name before escaping : %s" % cached_file)
+        cached_file = cached_file.replace('<','&#60;').replace('>','&#62;').replace('?','&#63;').replace('*','&#42;').replace('\\','&#42;').replace(':','&#58;').replace('|','&#124;')
+        print("Cached file name after escaping (used for cache storage) : %s" % cached_file)
+        cached_file_content = "%s/.file" % (cached_file,)
+        cached_file_header = "%s/.header" % (cached_file,)
+
+        _file_available = os.path.exists(cached_file_content)
+
+        if not _file_available:
+            if self.path.startswith("/dcae-deployments/"):
+                print "self.path start with /dcae-deployments/, generating response json..."
+                #jsondata = json.loads(self.data_string)
+                jsonGenerated = "{\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus\",\"test2\":\"test2\"}}"
+                print "jsonGenerated: " + jsonGenerated
+
+                os.makedirs(cached_file, True)
+                with open(cached_file_header, 'w') as f:
+                    f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
+                with open(cached_file_content, 'w') as f:
+                    f.write(jsonGenerated)
+            else:
+                if not HOST:
+                    self.send_response(404)
+                    return "404 Not found"
+
+                print("Request for data currently not present in cache: %s" % (cached_file,))
+
+                url = '%s%s' % (HOST, self.path)
+                print("url: %s" % (url,))
+                response = requests.put(url, data=self.data_string, headers=self.headers, stream=True)
+
+                if response.status_code == 200:
+                    self._write_cache(cached_file, cached_file_header, cached_file_content, response)
+                else:
+                    print('Error when requesting file :')
+                    print('Requested url : %s' % (url,))
+                    print('Status code : %s' % (response.status_code,))
+                    print('Content : %s' % (response.content,))
+                    self.send_response(response.status_code)
+                    return response.content
         else:
             print("Request for data present in cache: %s" % (cached_file,))
 
