aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorehautot <eh552t@intl.att.com>2018-03-15 17:49:50 +0100
committerehautot <eh552t@intl.att.com>2018-03-21 14:59:22 +0100
commit153c829cfc5608b8b6a2d9312eb270540f5f2d9f (patch)
tree810b864c478093af68a707359a45d7cebf4ef3ff /src/test
parent3dc5f2a4a5c066a57ef0ce346be884b045ae73c9 (diff)
Modify third party proxy to test the SUBMIT
Change-Id: I86dad99c141ef78b23e28cbb3eab6516d04000a8 Signed-off-by: ehautot <eh552t@intl.att.com> Issue-ID: CLAMP-100
Diffstat (limited to 'src/test')
-rw-r--r--src/test/resources/http-cache/example/pdp/api/getConfig/.file2
-rw-r--r--src/test/resources/http-cache/example/pdp/api/getConfig/.header1
-rw-r--r--src/test/resources/http-cache/example/pdp/api/pushPolicy/.file1
-rw-r--r--src/test/resources/http-cache/example/pdp/api/pushPolicy/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VFC/.header)0
-rw-r--r--src/test/resources/http-cache/example/pdp/api/updatePolicy/.file1
-rw-r--r--src/test/resources/http-cache/example/pdp/api/updatePolicy/.header1
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VF/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VF/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VF/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VF/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VFC/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VFC/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VFC/.header1
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/services/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/services/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.header)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts/.file1
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts/.header1
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.file (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.file)0
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.header (renamed from src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.header)0
-rwxr-xr-xsrc/test/resources/http-cache/sdc_proxy.py127
-rwxr-xr-xsrc/test/resources/http-cache/start_http_cache.sh4
-rwxr-xr-xsrc/test/resources/http-cache/third_party_proxy.py251
55 files changed, 262 insertions, 129 deletions
diff --git a/src/test/resources/http-cache/example/pdp/api/getConfig/.file b/src/test/resources/http-cache/example/pdp/api/getConfig/.file
new file mode 100644
index 00000000..fb2ad04b
--- /dev/null
+++ b/src/test/resources/http-cache/example/pdp/api/getConfig/.file
@@ -0,0 +1,2 @@
+[{"policyConfigMessage":"Config Retrieved! ","policyConfigStatus":"CONFIG_RETRIEVED","type":"JSON","config":"{\"service\":\"tca_policy\",\"location\":\"SampleServiceLocation\",\"uuid\":\"test\",\"policyName\":\"MicroServicevCPE\",\"description\":\"MicroService vCPE Policy\",\"configName\":\"SampleConfigName\",\"templateVersion\":\"OpenSource.version.1\",\"version\":\"1.1.0\",\"priority\":\"1\",\"policyScope\":\"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"riskType\":\"SampleRiskType\",\"riskLevel\":\"1\",\"guard\":\"False\",\"content\":{\"tca_policy\":{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}}}","policyName":"com.Config_MS_MicroServicevCPE.1.xml","policyVersion":"1","matchingConditions":{"ONAPName":"DCAE","ConfigName":"SampleConfigName","service":"tca_policy","uuid":"test","Location":"SampleServiceLocation"},"responseAttributes":{},"property":null},
+{"policyConfigMessage":"Config Retrieved! ","policyConfigStatus":"CONFIG_RETRIEVED","type":"JSON","config":"{\"service\":\"tca_policy\",\"location\":\"SampleServiceLocation\",\"uuid\":\"test\",\"policyName\":\"MicroServicevCPE\",\"description\":\"MicroService vCPE Policy\",\"configName\":\"SampleConfigName\",\"templateVersion\":\"OpenSource.version.1\",\"version\":\"1.1.0\",\"priority\":\"1\",\"policyScope\":\"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"riskType\":\"SampleRiskType\",\"riskLevel\":\"1\",\"guard\":\"False\",\"content\":{\"tca_policy\":{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}}}","policyName":"ClHolmes1.Config_ClosedLoop_f142fc95_2601_11e8_89ce_0242ac130002_null","policyVersion":"1","matchingConditions":{"ONAPName":"DCAE","ConfigName":"SampleConfigName","service":"tca_policy","uuid":"test","Location":"SampleServiceLocation"},"responseAttributes":{},"property":null}] \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/pdp/api/getConfig/.header b/src/test/resources/http-cache/example/pdp/api/getConfig/.header
new file mode 100644
index 00000000..9958716f
--- /dev/null
+++ b/src/test/resources/http-cache/example/pdp/api/getConfig/.header
@@ -0,0 +1 @@
+{"Transfer-Encoding": "chunked", "Date": "Mon, 12 Mar 2018 15:03:26 GMT", "Content-Type": "application/json;charset=UTF-8", "Server": "Apache-Coyote/1.1"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/pdp/api/pushPolicy/.file b/src/test/resources/http-cache/example/pdp/api/pushPolicy/.file
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/src/test/resources/http-cache/example/pdp/api/pushPolicy/.file
@@ -0,0 +1 @@
+[] \ No newline at end of file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VFC/.header b/src/test/resources/http-cache/example/pdp/api/pushPolicy/.header
index 6a280d97..6a280d97 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VFC/.header
+++ b/src/test/resources/http-cache/example/pdp/api/pushPolicy/.header
diff --git a/src/test/resources/http-cache/example/pdp/api/updatePolicy/.file b/src/test/resources/http-cache/example/pdp/api/updatePolicy/.file
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/src/test/resources/http-cache/example/pdp/api/updatePolicy/.file
@@ -0,0 +1 @@
+[] \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/pdp/api/updatePolicy/.header b/src/test/resources/http-cache/example/pdp/api/updatePolicy/.header
new file mode 100644
index 00000000..6a280d97
--- /dev/null
+++ b/src/test/resources/http-cache/example/pdp/api/updatePolicy/.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/sdc-example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.file
index 7115df3f..7115df3f 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.header
index e7f1e849..e7f1e849 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=CVFC/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VF/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VF/.file
index 253046a9..253046a9 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VF/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VF/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VF/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VF/.header
index ff1f54a0..ff1f54a0 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VF/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VF/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VFC/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VFC/.file
index a99aa44d..a99aa44d 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources&#63;resourceType=VFC/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VFC/.file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VFC/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VFC/.header
new file mode 100644
index 00000000..6a280d97
--- /dev/null
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources&#63;resourceType=VFC/.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/sdc-example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file
index 8b9114f1..8b9114f1 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.header
index 439efd9f..439efd9f 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file
index da4363f1..da4363f1 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.header
index 27e67e5c..27e67e5c 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file
index 05f71475..05f71475 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.header
index 79b1c524..79b1c524 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file
index 9985a8be..9985a8be 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.header
index 5d398140..5d398140 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file
index bbae2420..bbae2420 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.header
index c4e7b690..c4e7b690 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file
index 940d0ecc..940d0ecc 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.header
index 45800a0a..45800a0a 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file
index 53fa9e39..53fa9e39 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.header
index 86110d46..86110d46 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file
index 2a272ee6..2a272ee6 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.header
index 56bc0de4..56bc0de4 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file
index ea376775..ea376775 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.header
index 31ab6c95..31ab6c95 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file
index b2e0716c..b2e0716c 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.header
index 86df6fd4..86df6fd4 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file
index 24da339a..24da339a 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.header
index faa4d0bd..faa4d0bd 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file
index 4a23a0ec..4a23a0ec 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.header
index 84e69926..84e69926 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file
index ecf6aa73..ecf6aa73 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.header
index 650c2ad4..650c2ad4 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file
index 58b5d367..58b5d367 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.header
index 2ae908f0..2ae908f0 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file
index 8038b813..8038b813 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.header
index ebd87211..ebd87211 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file
index 77773830..77773830 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.header
index 629e7d98..629e7d98 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/services/.file
index 92694fed..92694fed 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/services/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/services/.header
index 231ae3db..231ae3db 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/services/.header
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.file
index 294d88c5..294d88c5 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.header
index b68cd5a9..b68cd5a9 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/metadata/.header
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts/.file
new file mode 100644
index 00000000..29d8ab70
--- /dev/null
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts/.file
@@ -0,0 +1 @@
+{"artifactName":"ClosedLoop-2e3d2132-26d4-11e8-826d-0242ac130002.yml","artifactType":"DCAE_INVENTORY_BLUEPRINT","artifactURL":"","artifactDescription":"Description of the Artifact","artifactChecksum":"ZjJlMjVmMWE2M2M1OTM2MDZlODlmNTVmZmYzNjViYzM=","artifactUUID":"13fb13f9-f5d7-4ade-b934-d0da78754a51","artifactVersion":"1"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts/.header
new file mode 100644
index 00000000..125a579e
--- /dev/null
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts/.header
@@ -0,0 +1 @@
+{"Content-Length": "323", "Content-Type": "application/json"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.file
index bc8d30ce..bc8d30ce 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.file
diff --git a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.header b/src/test/resources/http-cache/example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.header
index fba705b1..fba705b1 100644
--- a/src/test/resources/http-cache/sdc-example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.header
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/services/aecb6332-e906-4334-9f04-93ba4926f6c2/metadata/.header
diff --git a/src/test/resources/http-cache/sdc_proxy.py b/src/test/resources/http-cache/sdc_proxy.py
deleted file mode 100755
index 45dac413..00000000
--- a/src/test/resources/http-cache/sdc_proxy.py
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/env python2
-###
-# ============LICENSE_START=======================================================
-# ONAP CLAMP
-# ================================================================================
-# Copyright (C) 2018 AT&T Intellectual Property. All rights
-# reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END============================================
-# ===================================================================
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-###
-
-import json
-import requests
-import os
-import sys
-import SimpleHTTPServer
-import SocketServer
-import argparse
-import tempfile
-import signal
-
-parser = argparse.ArgumentParser(description="SDC Cache & Replay")
-parser.add_argument("--username", "-u", type=str, help="Set the username for contacting SDC")
-parser.add_argument("--password", "-p", type=str, help="Set the password for contacting SDC")
-parser.add_argument("--root", "-r", default=tempfile.mkdtemp, type=str, help="Root folder for the proxy cache")
-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")
-options = parser.parse_args()
-
-
-PORT = options.port
-SDC_HOST = options.proxy
-SDC_AUTH = (options.username, options.password)
-SDC_HEADERS = {'X-ECOMP-InstanceID':'CLAMP'}
-CACHE_ROOT = options.root
-
-def signal_handler(signal_sent, frame):
- global httpd
- if signal_sent == signal.SIGINT:
- print('Got Ctrl-C (SIGINT)')
- httpd.socket.close()
- httpd.shutdown()
- httpd.server_close()
-
-class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
-
- def print_headers(self):
- for header,value in self.headers.items():
- print("%s : %s" % (header, value))
-
- def check_credentials(self):
- pass
-
- def _send_content(self, header_file, content_file):
- self.send_response(200)
- with open(header_file, 'rb') as f:
- headers = json.load(f)
- for key,value in headers.items():
- if key in ('Transfer-Encoding',):
- continue
- self.send_header(key, value)
- self.end_headers()
- with open(content_file,'rb') as f:
- fc = f.read()
- self.wfile.write(fc)
-
- def _write_cache(self,cached_file, header_file, content_file, response):
- os.makedirs(cached_file, True)
- with open(content_file, 'w') as f:
- f.write(response.raw.read())
- with open(header_file, 'w') as f:
- json.dump(dict(response.raw.headers), f)
- # Entry point of the code
- def do_GET(self):
-
- self.print_headers()
- self.check_credentials()
-
- 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 and not SDC_HOST:
- self.send_response(404)
- return "404 Not found"
-
- if not _file_available:
- print("SDC Request for data currently not present in cache: %s" % (cached_file,))
- url = '%s%s' % (SDC_HOST, self.path)
- response = requests.get(url, auth=SDC_AUTH, headers=SDC_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
-
- self._send_content(cached_file_header, cached_file_content)
-
-# Main code that start the HTTP server
-httpd = SocketServer.ForkingTCPServer(('', PORT), Proxy)
-httpd.allow_reuse_address = True
-print "Listening on port "+ str(PORT) + " and caching in " + CACHE_ROOT + "(Press Ctrl+C to stop HTTPD Caching script)"
-signal.signal(signal.SIGINT, signal_handler)
-httpd.serve_forever() \ 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 36829dde..fe9e9911 100755
--- a/src/test/resources/http-cache/start_http_cache.sh
+++ b/src/test/resources/http-cache/start_http_cache.sh
@@ -27,11 +27,11 @@ if [ $# -eq 1 ]
echo 'input parameter is set (proxy http)';
export http_proxy=$1
export https_proxy=$1
- else
+ else
echo 'input parameter is not set (proxy http)';
fi
echo 'Installing requests packages for Python'
pip install requests
echo 'Executing the Http proxy in Cache mode only'
-python sdc_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
diff --git a/src/test/resources/http-cache/third_party_proxy.py b/src/test/resources/http-cache/third_party_proxy.py
new file mode 100755
index 00000000..72ea4958
--- /dev/null
+++ b/src/test/resources/http-cache/third_party_proxy.py
@@ -0,0 +1,251 @@
+#!/usr/bin/env python2
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2018 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+###
+
+import json
+import requests
+import os
+import sys
+import SimpleHTTPServer
+import SocketServer
+import argparse
+import tempfile
+import signal
+import uuid
+import shutil
+
+parser = argparse.ArgumentParser(description="3rd party Cache & Replay")
+parser.add_argument("--username", "-u", type=str, help="Set the username for contacting 3rd party - only used for GET")
+parser.add_argument("--password", "-p", type=str, help="Set the password for contacting 3rd party - only used for GET")
+parser.add_argument("--root", "-r", default=tempfile.mkdtemp, type=str, help="Root folder for the proxy cache")
+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")
+options = parser.parse_args()
+
+
+PORT = options.port
+HOST = options.proxy
+AUTH = (options.username, options.password)
+HEADERS = {'X-ECOMP-InstanceID':'CLAMP'}
+CACHE_ROOT = options.root
+
+def signal_handler(signal_sent, frame):
+ global httpd
+ if signal_sent == signal.SIGINT:
+ print('Got Ctrl-C (SIGINT)')
+ httpd.socket.close()
+ httpd.shutdown()
+ httpd.server_close()
+
+class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
+
+ def print_headers(self):
+ for header,value in self.headers.items():
+ print("header: %s : %s" % (header, value))
+
+ def check_credentials(self):
+ pass
+
+ def _send_content(self, header_file, content_file):
+ self.send_response(200)
+ with open(header_file, 'rb') as f:
+ headers = json.load(f)
+ for key,value in headers.items():
+ if key in ('Transfer-Encoding',):
+ continue
+ self.send_header(key, value)
+ self.end_headers()
+ with open(content_file,'rb') as f:
+ fc = f.read()
+ self.wfile.write(fc)
+
+ def _write_cache(self,cached_file, header_file, content_file, response):
+ os.makedirs(cached_file, True)
+ with open(content_file, 'w') as f:
+ f.write(response.raw.read())
+ with open(header_file, 'w') as f:
+ json.dump(dict(response.raw.headers), f)
+ # Entry point of the code
+ def do_GET(self):
+ print("\n\n\nGot a GET request for %s " % self.path)
+
+ self.print_headers()
+ self.check_credentials()
+
+ 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:
+ print("Request for data currently not present in cache: %s" % (cached_file,))
+
+ if self.path.startswith("/dcae-service-types?asdcResourceId="):
+ print "self.path start with /dcae-service-types?asdcResourceId=, generating response json..."
+ uuidGenerated = str(uuid.uuid4())
+ typeId = "typeId-" + uuidGenerated
+ typeName = "typeName-" + uuidGenerated
+ print "typeId generated: " + typeName + " and typeName: "+ typeId
+ jsonGenerated = "{\"totalCount\":1, \"items\":[{\"typeId\":\"" + typeId + "\", \"typeName\":\"" + typeName +"\"}]}"
+ print "jsonGenerated: " + jsonGenerated
+
+ os.makedirs(cached_file, True)
+ with open(cached_file_header, 'w') as f:
+ f.write("{\"Content-Length\": \"144\", \"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"
+
+ url = '%s%s' % (HOST, self.path)
+ response = requests.get(url, auth=AUTH, headers=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 currently present in cache: %s" % (cached_file,))
+
+ self._send_content(cached_file_header, cached_file_content)
+
+ if self.path.startswith("/dcae-service-types?asdcResourceId="):
+ print "DCAE case deleting folder created " + cached_file
+ shutil.rmtree(cached_file, ignore_errors=False, onerror=None)
+ else:
+ print "NOT in DCAE case deleting folder created " + cached_file
+
+ def do_POST(self):
+ print("\n\n\nGot a POST for %s" % self.path)
+ self.check_credentials()
+ self.data_string = self.rfile.read(int(self.headers['Content-Length']))
+ print("data-string:\n %s" % self.data_string)
+ 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("/sdc/v1/catalog/services/"):
+ print "self.path start with /sdc/v1/catalog/services/, generating response json..."
+ jsondata = json.loads(self.data_string)
+ jsonGenerated = "{\"artifactName\":\"" + jsondata['artifactName'] + "\",\"artifactType\":\"" + jsondata['artifactType'] + "\",\"artifactURL\":\"" + self.path + "\",\"artifactDescription\":\"" + jsondata['description'] + "\",\"artifactChecksum\":\"ZjJlMjVmMWE2M2M1OTM2MDZlODlmNTVmZmYzNjViYzM=\",\"artifactUUID\":\"" + str(uuid.uuid4()) + "\",\"artifactVersion\":\"1\"}"
+ 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.post(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_PUT(self):
+ print("\n\n\nGot a PUT for %s " % self.path)
+ self.check_credentials()
+ self.data_string = self.rfile.read(int(self.headers['Content-Length']))
+ print("data-string:\n %s" % self.data_string)
+ 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 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,))
+
+ 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)
+
+
+
+# Main code that start the HTTP server
+httpd = SocketServer.ForkingTCPServer(('', PORT), Proxy)
+httpd.allow_reuse_address = True
+print "Listening on port "+ str(PORT) + " and caching in " + CACHE_ROOT + "(Press Ctrl+C to stop HTTPD Caching script)"
+signal.signal(signal.SIGINT, signal_handler)
+httpd.serve_forever() \ No newline at end of file