summaryrefslogtreecommitdiffstats
path: root/runtime/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2022-01-25 19:55:43 +0000
committerliamfallon <liam.fallon@est.tech>2022-02-18 15:54:40 +0000
commit43098043c4ef31d9d5dead66568d7d9482a6b165 (patch)
tree6f6ea4812ff93d65e7c64e12a3ec6ab4462a64e2 /runtime/src/test
parentf401b5099bcb64f3e21de608d0207dd69d8043cd (diff)
Rename TOSCA Control Loop to ACM
This commit renames the TOSCA Control Loop functionality in CLAMP to Automation Composition Management. This review is a direct renaming review and, as everything is renamed together it is large. Issue-ID: POLICY-3939 Change-Id: I28f0a6dd889bf3570a4c1365ae9e71fc58db6d6c Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'runtime/src/test')
-rw-r--r--runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseItTestCase.java2
-rw-r--r--runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeInstantiationResponseItTestCase.java5
-rw-r--r--runtime/src/test/resources/application.properties6
-rw-r--r--runtime/src/test/resources/http-cache/third_party_proxy.py36
4 files changed, 25 insertions, 24 deletions
diff --git a/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseItTestCase.java b/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseItTestCase.java
index 7824be460..8c9c5b3e4 100644
--- a/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseItTestCase.java
+++ b/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseItTestCase.java
@@ -125,7 +125,7 @@ public class RuntimeCommissioningResponseItTestCase {
ProducerTemplate prodTemplate = camelContext.createProducerTemplate();
Exchange exchangeResponse =
- prodTemplate.send("direct:get-control-loop-definitions", ExchangeBuilder.anExchange(camelContext)
+ prodTemplate.send("direct:get-acm-definitions", ExchangeBuilder.anExchange(camelContext)
.withProperty("name", "ToscaServiceTemplate")
.withProperty("version", "1.0.0")
.withProperty("raiseHttpExceptionFlag", "true")
diff --git a/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeInstantiationResponseItTestCase.java b/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeInstantiationResponseItTestCase.java
index cc08ea0a6..d655257c6 100644
--- a/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeInstantiationResponseItTestCase.java
+++ b/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeInstantiationResponseItTestCase.java
@@ -53,9 +53,10 @@ public class RuntimeInstantiationResponseItTestCase {
private static final String RAISE_HTTP_EXCEPTION_FLAG = "raiseHttpExceptionFlag";
- private static final String SAMPLE_CONTROL_LOOP_LIST = "{\"controlLoopList\": [{\"name\": \"PMSHInstance0\","
+ private static final String SAMPLE_CONTROL_LOOP_LIST =
+ "{\"automationCompositionList\": [{\"name\": \"PMSHInstance0\","
+ "\"version\": \"1.0.1\",\"definition\": {},\"state\": \"UNINITIALISED\",\"orderedState\": \"UNINITIALISED\","
- + "\"description\": \"PMSH control loop instance 0\",\"elements\": {}}]}";
+ + "\"description\": \"PMSH Automation Composition instance 0\",\"elements\": {}}]}";
private static final String SAMPLE_TOSCA_TEMPLATE =
"{\"tosca_definitions_version\": \"tosca_simple_yaml_1_1_0\","
diff --git a/runtime/src/test/resources/application.properties b/runtime/src/test/resources/application.properties
index f2cf0dd33..d09b3ce49 100644
--- a/runtime/src/test/resources/application.properties
+++ b/runtime/src/test/resources/application.properties
@@ -182,6 +182,6 @@ clamp.config.tosca.converter.default.datatypes=classpath:/clds/tosca-converter/d
clamp.config.tosca.converter.dictionary.support.enabled=true
# Configuration settings for ControlLoop Runtime Rest API
-clamp.config.controlloop.runtime.url=http://localhost:${docker.http-cache.port.host}
-clamp.config.controlloop.runtime.userName=runtimeUser
-clamp.config.controlloop.runtime.password=zb!XztG34
+clamp.config.acm.runtime.url=http://localhost:${docker.http-cache.port.host}
+clamp.config.acm.runtime.userName=runtimeUser
+clamp.config.acm.runtime.password=zb!XztG34
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 786c366e0..9c22f3ff5 100644
--- a/runtime/src/test/resources/http-cache/third_party_proxy.py
+++ b/runtime/src/test/resources/http-cache/third_party_proxy.py
@@ -276,44 +276,44 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
with open(cached_file_content, 'w') as f:
f.write(response)
return True
- elif (self.path.startswith("/onap/controlloop/v2/commission/toscaservicetemplate")) and http_type == "GET":
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/commission/toscaservicetemplate")) and http_type == "GET":
if not _file_available:
cached_file_folder = cached_file_folder.split('bridgeEndpoint')[0]
print(("cached file folder for onap is %s: ", cached_file_folder))
- print("self.path start with /onap/controlloop/v2/commission/, generating response json...")
+ print("self.path start with /onap/policy/clamp/acm/v2/commission/, generating response json...")
jsonGenerated = "{\"tosca_definitions_version\": \"tosca_simple_yaml_1_1_0\",\"data_types\": {},\"node_types\": {}, \"policy_types\": {}, \"topology_template\": {}, \"name\": \"ToscaServiceTemplateSimple\", \"version\": \"1.0.0\", \"metadata\": {}}"
self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
return True
- elif (self.path.startswith("/onap/controlloop/v2/commission/toscaServiceTemplateSchema")) and http_type == "GET":
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/commission/toscaServiceTemplateSchema")) and http_type == "GET":
if not _file_available:
cached_file_folder = cached_file_folder.split('bridgeEndpoint')[0]
print(("cached file folder for onap is %s: ", cached_file_folder))
- print("self.path start with /onap/controlloop/v2/commission/, generating response json...")
+ print("self.path start with /onap/policy/clamp/acm/v2/commission/, generating response json...")
jsonGenerated = "{\"tosca_definitions_version\": \"tosca_simple_yaml_1_1_0\",\"data_types\": {},\"node_types\": {}, \"policy_types\": {}, \"topology_template\": {}, \"name\": \"ToscaServiceTemplateSimple\", \"version\": \"1.0.0\", \"metadata\": {}}"
self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
return True
- elif (self.path.startswith("/onap/controlloop/v2/commission/elements")) and http_type == "GET":
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/commission/elements")) and http_type == "GET":
if not _file_available:
- print("self.path start with /commission/elements Control Loop Elements, generating response json...")
+ print("self.path start with /commission/elements Automation Composition Elements, generating response json...")
jsonGenerated = "[{\"name\": ,\"org.onap.domain.pmsh.PMSH_DCAEMicroservice\": [{ \"version\": \"1.2.3\", \"derived_from\": null }]}]"
self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
return True
- elif (self.path.startswith("/onap/controlloop/v2/commission")) and http_type == "GET":
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/commission")) and http_type == "GET":
if not _file_available:
- print("self.path start with /commission control loop definition, generating response json...")
+ print("self.path start with /commission Automation Composition definition, generating response json...")
#jsondata = json.loads(self.data_string)
jsonGenerated = "[{\"name\": ,\"org.onap.domain.pmsh.PMSHControlLoopDefinition\": [{ \"version\": \"1.2.3\", \"derived_from\": null }]}]"
self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
return True
- elif (self.path.startswith("/onap/controlloop/v2/commission/getCommonOrInstanceProperties")) and http_type == "GET":
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/commission/getCommonOrInstanceProperties")) and http_type == "GET":
if not _file_available:
print("self.path start with /commission getting common properties, generating response json...")
with open("example/node_template.json", "r") as f:
jsonGenerated = f.read()
self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
return True
- elif (self.path.startswith("/onap/controlloop/v2/commission")) and http_type == "POST":
- print("self.path start with POST /onap/controlloop/v2/commission, copying body to response ...")
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/commission")) and http_type == "POST":
+ print("self.path start with POST /onap/policy/clamp/acm/v2/commission, copying body to response ...")
if not os.path.exists(cached_file_folder):
os.makedirs(cached_file_folder, 0o777)
with open(cached_file_header, 'w+') as f:
@@ -321,18 +321,18 @@ 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/commission")) and http_type == "DELETE":
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/commission")) and http_type == "DELETE":
print("self.path start with /commission Decommissioning, generating response json...")
jsonGenerated = "{\"errorDetails\": null,\"affectedControlLoopDefinitions\": [{ \"name\": \"ToscaServiceTemplateSimple\", \"version\": \"1.0.0\" }]}"
self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
return True
- elif (self.path.startswith("/onap/controlloop/v2/instantiation")) and http_type == "GET":
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/instantiation")) and http_type == "GET":
print("self.path start with /instantiation Retrieving Instantiation, generating response json...")
- jsonGenerated = "{\"controlLoopList\": [{\"name\": \"PMSHInstance0\",\"version\": \"1.0.1\",\"definition\": {},\"state\": \"UNINITIALISED\",\"orderedState\": \"UNINITIALISED\",\"description\": \"PMSH control loop instance 0\",\"elements\": {}}]}";
+ jsonGenerated = "{\"automationCompositionList\": [{\"name\": \"PMSHInstance0\",\"version\": \"1.0.1\",\"definition\": {},\"state\": \"UNINITIALISED\",\"orderedState\": \"UNINITIALISED\",\"description\": \"PMSH Automation Composition instance 0\",\"elements\": {}}]}";
self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
return True
- elif (self.path.startswith("/onap/controlloop/v2/instanceProperties")) and http_type == "POST":
- print("self.path start with POST /onap/controlloop/v2/instanceProperties, copying body to response ...")
+ elif (self.path.startswith("/onap/policy/clamp/acm/v2/instanceProperties")) and http_type == "POST":
+ print("self.path start with POST /onap/policy/clamp/acm/v2/instanceProperties, copying body to response ...")
if not os.path.exists(cached_file_folder):
os.makedirs(cached_file_folder, 0o777)
with open(cached_file_header, 'w+') as f:
@@ -340,12 +340,12 @@ 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":
+ elif (self.path.startswith("/onap/policy/clamp/acm/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":
+ elif (self.path.startswith("/onap/policy/clamp/acm/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)