summaryrefslogtreecommitdiffstats
path: root/src/test/resources/http-cache
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2020-02-18 14:20:23 +0100
committerxuegao <xg353y@intl.att.com>2020-02-26 15:59:25 +0100
commit3a26471260e56f7a87533f0147fc63530d6ea08c (patch)
tree400059c05ccb58b0e10d3ce1309085a944e394b8 /src/test/resources/http-cache
parente0d0fdb5484d2c02669358160a11d6751ada4f3a (diff)
Create get Pdp Groups flow
Create a camel flow to get the list of Pdp Groups info from Policy. Create a scheduler to trigger the camel flow regularly and store the Pdp Groups info into DB. Issue-ID: CLAMP-644, CLAMP-649 Change-Id: I6427202cc0186cd85428d5d25b28a8622e4d7ca4 Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'src/test/resources/http-cache')
-rw-r--r--src/test/resources/http-cache/example/policy/pap/v1/pdps&#63;connectionTimeToLive=5000/.file76
-rw-r--r--src/test/resources/http-cache/example/policy/pap/v1/pdps&#63;connectionTimeToLive=5000/.header1
-rwxr-xr-xsrc/test/resources/http-cache/third_party_proxy.py2
3 files changed, 79 insertions, 0 deletions
diff --git a/src/test/resources/http-cache/example/policy/pap/v1/pdps&#63;connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/pap/v1/pdps&#63;connectionTimeToLive=5000/.file
new file mode 100644
index 000000000..6b6b372cf
--- /dev/null
+++ b/src/test/resources/http-cache/example/policy/pap/v1/pdps&#63;connectionTimeToLive=5000/.file
@@ -0,0 +1,76 @@
+{
+ "groups": [
+ {
+ "description": "This group should be used for managing all control loop related policies and pdps",
+ "name": "controlloop",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "apex",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.Operational",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "drools",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.Operational",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "xacml",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.Guard",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ],
+ "properties": {}
+ },
+ {
+ "description": "This group should be used for managing all monitoring related policies and pdps",
+ "name": "monitoring",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "xacml",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.monitoring.*",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ],
+ "properties": {}
+ }
+ ]
+}
diff --git a/src/test/resources/http-cache/example/policy/pap/v1/pdps&#63;connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/pap/v1/pdps&#63;connectionTimeToLive=5000/.header
new file mode 100644
index 000000000..6a280d972
--- /dev/null
+++ b/src/test/resources/http-cache/example/policy/pap/v1/pdps&#63;connectionTimeToLive=5000/.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/third_party_proxy.py b/src/test/resources/http-cache/third_party_proxy.py
index 32f7faf4e..79e152ebb 100755
--- a/src/test/resources/http-cache/third_party_proxy.py
+++ b/src/test/resources/http-cache/third_party_proxy.py
@@ -297,6 +297,7 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
self.send_response(404)
self.end_headers()
self.wfile.write('404 Not found, no remote HOST specified on the emulator !!!')
+ print("HOST value is: %s " % (options.proxy))
return "404 Not found, no remote HOST specified on the emulator !!!"
url = '%s%s' % (HOST, self.path)
@@ -315,6 +316,7 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
return response.content
else:
print("Request for data currently present in cache: %s" % (cached_file_folder,))
+ print("HOST value is: %s " % (HOST))
self._send_content(cached_file_header, cached_file_content)