diff options
author | liamfallon <liam.fallon@est.tech> | 2022-01-25 19:55:43 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2022-02-18 15:54:40 +0000 |
commit | 43098043c4ef31d9d5dead66568d7d9482a6b165 (patch) | |
tree | 6f6ea4812ff93d65e7c64e12a3ec6ab4462a64e2 /runtime | |
parent | f401b5099bcb64f3e21de608d0207dd69d8043cd (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')
-rw-r--r-- | runtime/src/main/java/org/onap/policy/clamp/clds/config/AafConfiguration.java | 2 | ||||
-rw-r--r-- | runtime/src/main/resources/application-noaaf.properties | 6 | ||||
-rw-r--r-- | runtime/src/main/resources/application.properties | 6 | ||||
-rw-r--r-- | runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml | 34 | ||||
-rw-r--r-- | runtime/src/main/resources/clds/camel/routes/acm-flows.xml (renamed from runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml) | 92 | ||||
-rw-r--r-- | runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseItTestCase.java | 2 | ||||
-rw-r--r-- | runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeInstantiationResponseItTestCase.java | 5 | ||||
-rw-r--r-- | runtime/src/test/resources/application.properties | 6 | ||||
-rw-r--r-- | runtime/src/test/resources/http-cache/third_party_proxy.py | 36 |
9 files changed, 95 insertions, 94 deletions
diff --git a/runtime/src/main/java/org/onap/policy/clamp/clds/config/AafConfiguration.java b/runtime/src/main/java/org/onap/policy/clamp/clds/config/AafConfiguration.java index e8502b72a..bdefdfe6d 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/clds/config/AafConfiguration.java +++ b/runtime/src/main/java/org/onap/policy/clamp/clds/config/AafConfiguration.java @@ -61,7 +61,7 @@ public class AafConfiguration { registration.addUrlPatterns("/restservices/clds/v2/policyToscaModels/*"); registration.addUrlPatterns("/restservices/clds/v2/policies/*"); registration.addUrlPatterns("/restservices/clds/v2/loop/*"); - registration.addUrlPatterns("/restservices/clds/v2/toscaControlLoop/*"); + registration.addUrlPatterns("/restservices/clds/v2/acm/*"); registration.setName("cadiFilter"); registration.setOrder(0); return registration; diff --git a/runtime/src/main/resources/application-noaaf.properties b/runtime/src/main/resources/application-noaaf.properties index 9f13a314c..22f9774e1 100644 --- a/runtime/src/main/resources/application-noaaf.properties +++ b/runtime/src/main/resources/application-noaaf.properties @@ -193,6 +193,6 @@ clamp.config.cds.userName=ccsdkapps clamp.config.cds.password=ccsdkapps # Configuration settings for ControlLoop Runtime Rest API -clamp.config.controlloop.runtime.url=http://localhost:6969 -clamp.config.controlloop.runtime.userName=runtimeUser -clamp.config.controlloop.runtime.password=zb!XztG34 +clamp.config.acm.runtime.url=http://localhost:6969 +clamp.config.acm.runtime.userName=runtimeUser +clamp.config.acm.runtime.password=zb!XztG34 diff --git a/runtime/src/main/resources/application.properties b/runtime/src/main/resources/application.properties index 21b37c69f..054b88972 100644 --- a/runtime/src/main/resources/application.properties +++ b/runtime/src/main/resources/application.properties @@ -203,6 +203,6 @@ clamp.config.cds.userName=ccsdkapps clamp.config.cds.password=ccsdkapps # Configuration settings for ControlLoop Runtime Rest API -clamp.config.controlloop.runtime.url=http://localhost:6969 -clamp.config.controlloop.runtime.userName=runtimeUser -clamp.config.controlloop.runtime.password=zb!XztG34 +clamp.config.acm.runtime.url=http://localhost:6969 +clamp.config.acm.runtime.userName=runtimeUser +clamp.config.acm.runtime.password=zb!XztG34 diff --git a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 8c9824ef7..8ad20a844 100644 --- a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -1476,7 +1476,7 @@ </route> </post> - <get uri="/v2/toscaControlLoop/getToscaTemplate" outType="java.lang.String" bindingMode="off" + <get uri="/v2/acm/getToscaTemplate" outType="java.lang.String" bindingMode="off" produces="application/json"> <route> <removeHeaders pattern="*" @@ -1515,7 +1515,7 @@ </route> </get> - <post uri="/v2/toscaControlLoop/commissionToscaTemplate" + <post uri="/v2/acm/commissionToscaTemplate" type="java.lang.String" consumes="plain/text" outType="java.lang.String" @@ -1558,7 +1558,7 @@ </route> </post> - <delete uri="/v2/toscaControlLoop/decommissionToscaTemplate" + <delete uri="/v2/acm/decommissionToscaTemplate" type="java.lang.String" consumes="plain/text" outType="java.lang.String" @@ -1602,7 +1602,7 @@ </route> </delete> - <delete uri="/v2/toscaControlLoop/deleteToscaInstantiation" + <delete uri="/v2/acm/deleteToscaInstantiation" type="java.lang.String" consumes="plain/text" outType="java.lang.String" @@ -1646,7 +1646,7 @@ </route> </delete> - <get uri="/v2/toscaControlLoop/getToscaInstantiation" outType="java.lang.String" bindingMode="off" produces="application/json"> + <get uri="/v2/acm/getToscaInstantiation" outType="java.lang.String" bindingMode="off" produces="application/json"> <route> <removeHeaders pattern="*"/> <doTry> @@ -1679,7 +1679,7 @@ </doTry> </route> </get> - <get uri="/v2/toscaControlLoop/getInstantiationOrderState" outType="java.lang.String" bindingMode="off" produces="application/json"> + <get uri="/v2/acm/getInstantiationOrderState" outType="java.lang.String" bindingMode="off" produces="application/json"> <route> <removeHeaders pattern="*" excludePattern="name|version|requestId"/> @@ -1713,7 +1713,7 @@ </doTry> </route> </get> - <get uri="/v2/toscaControlLoop/getJsonSchema" outType="java.lang.String" bindingMode="off" produces="application/json"> + <get uri="/v2/acm/getJsonSchema" outType="java.lang.String" bindingMode="off" produces="application/json"> <route> <removeHeaders pattern="*" excludePattern="section"/> @@ -1748,7 +1748,7 @@ </route> </get> - <get uri="/v2/toscaControlLoop/getElementDefinitions" outType="java.lang.String" bindingMode="off" produces="application/json"> + <get uri="/v2/acm/getElementDefinitions" outType="java.lang.String" bindingMode="off" produces="application/json"> <route> <removeHeaders pattern="*" excludePattern="name|version|requestId"/> @@ -1783,7 +1783,7 @@ </route> </get> - <get uri="/v2/toscaControlLoop/getControlLoopDefinitions" outType="java.lang.String" bindingMode="off" produces="application/json"> + <get uri="/v2/acm/getAutomationCompositionDefinitions" outType="java.lang.String" bindingMode="off" produces="application/json"> <route> <removeHeaders pattern="*" excludePattern="name|version|requestId"/> @@ -1796,7 +1796,7 @@ <setProperty name="raiseHttpExceptionFlag"> <simple resultType="java.lang.Boolean">true</simple> </setProperty> - <to uri="direct:get-control-loop-definitions"/> + <to uri="direct:get-acm-definitions"/> <to uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> <doCatch> <exception>java.lang.Exception</exception> @@ -1806,19 +1806,19 @@ <to uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> <log loggingLevel="ERROR" - message="GET Control Loop Definitions request failed: ${exception.stacktrace}"/> + message="GET Automation Composition Definitions request failed: ${exception.stacktrace}"/> <setHeader name="CamelHttpResponseCode"> <constant>500</constant> </setHeader> <setBody> - <simple>GET Control Loop Definitions FAILED</simple> + <simple>GET Automation Composition Definitions FAILED</simple> </setBody> </doCatch> </doTry> </route> </get> - <post uri="/v2/toscaControlLoop/postToscaInstanceProperties" + <post uri="/v2/acm/postToscaInstanceProperties" type="java.lang.String" consumes="plain/text" outType="java.lang.String" @@ -1860,7 +1860,7 @@ </doTry> </route> </post> - <delete uri="/v2/toscaControlLoop/deleteToscaInstanceProperties" + <delete uri="/v2/acm/deleteToscaInstanceProperties" type="java.lang.String" consumes="plain/text" outType="java.lang.String" @@ -1904,7 +1904,7 @@ </route> </delete> - <get uri="/v2/toscaControlLoop/getCommonOrInstanceProperties" outType="java.lang.String" bindingMode="off" produces="application/json"> + <get uri="/v2/acm/getCommonOrInstanceProperties" outType="java.lang.String" bindingMode="off" produces="application/json"> <route> <removeHeaders pattern="*" excludePattern="name|version|requestId|common"/> @@ -1939,7 +1939,7 @@ </route> </get> - <post uri="/v2/toscaControlLoop/postToscaInstantiation" + <post uri="/v2/acm/postToscaInstantiation" type="java.lang.String" consumes="plain/text" outType="java.lang.String" @@ -1982,7 +1982,7 @@ </route> </post> - <put uri="/v2/toscaControlLoop/putToscaInstantiationStateChange" + <put uri="/v2/acm/putToscaInstantiationStateChange" type="java.lang.String" consumes="plain/text" outType="java.lang.String" diff --git a/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml b/runtime/src/main/resources/clds/camel/routes/acm-flows.xml index 146ab14d5..c304c5360 100644 --- a/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml +++ b/runtime/src/main/resources/clds/camel/routes/acm-flows.xml @@ -5,7 +5,7 @@ <log loggingLevel="INFO" message="Getting the tosca service template"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Getting the tosca service template')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Getting the tosca service template')"/> <setHeader name="CamelHttpMethod"> <constant>GET</constant> </setHeader> @@ -19,8 +19,8 @@ <simple>${header.version}</simple> </setProperty> <log loggingLevel="INFO" - message="Endpoint to get Tosca Service Template: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/toscaservicetemplate"></log> - <toD uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/toscaservicetemplate?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + message="Endpoint to get Tosca Service Template: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/toscaservicetemplate"></log> + <toD uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/toscaservicetemplate?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -35,7 +35,7 @@ <log loggingLevel="INFO" message="Commissioning the tosca service template"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Commissioning the tosca service template')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Commissioning the tosca service template')"/> <setHeader name="CamelHttpMethod"> <constant>POST</constant> </setHeader> @@ -43,9 +43,9 @@ <constant>application/json</constant> </setHeader> <log loggingLevel="INFO" - message="Endpoint to send Tosca Service Template: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission"></log> + message="Endpoint to send Tosca Service Template: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission? bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission? bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -60,7 +60,7 @@ <log loggingLevel="INFO" message="Decommissioning the tosca service template"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Decommissioning the tosca service template')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Decommissioning the tosca service template')"/> <setHeader name="CamelHttpMethod"> <constant>DELETE</constant> </setHeader> @@ -74,9 +74,9 @@ <simple>${header.version}</simple> </setProperty> <log loggingLevel="INFO" - message="Endpoint to send Tosca Service Template: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission"></log> + message="Endpoint to send Tosca Service Template: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -91,7 +91,7 @@ <log loggingLevel="INFO" message="Getting the Tosca instantiation"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('ControlLoop', 'Getting the Tosca instantiation')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Getting the Tosca instantiation')"/> <setHeader name="CamelHttpMethod"> <constant>GET</constant> </setHeader> @@ -99,9 +99,9 @@ <constant>application/json</constant> </setHeader> <log loggingLevel="INFO" - message="Endpoint to get Tosca Instantiation: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation"></log> + message="Endpoint to get Tosca Instantiation: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiation"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiation?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -116,7 +116,7 @@ <log loggingLevel="INFO" message="Deleting Tosca Instantiation"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Deleting Tosca Instantiation')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Deleting Tosca Instantiation')"/> <setHeader name="CamelHttpMethod"> <constant>DELETE</constant> </setHeader> @@ -130,9 +130,9 @@ <simple>${header.version}</simple> </setProperty> <log loggingLevel="INFO" - message="Endpoint to delete Tosca Instantiation: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation"></log> + message="Endpoint to delete Tosca Instantiation: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiation"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiation?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -147,7 +147,7 @@ <log loggingLevel="INFO" message="Creating the tosca instance properties"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Creating the tosca instance properties')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Creating the tosca instance properties')"/> <setHeader name="CamelHttpMethod"> <constant>POST</constant> </setHeader> @@ -155,9 +155,9 @@ <constant>application/json</constant> </setHeader> <log loggingLevel="INFO" - message="Endpoint to send Tosca Instance Properties: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instanceProperties"></log> + message="Endpoint to send Tosca Instance Properties: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instanceProperties"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instanceProperties?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instanceProperties?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -172,7 +172,7 @@ <log loggingLevel="INFO" message="Deleting Tosca Instance Properties"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Deleting Tosca Instance Properties')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Deleting Tosca Instance Properties')"/> <setHeader name="CamelHttpMethod"> <constant>DELETE</constant> </setHeader> @@ -186,9 +186,9 @@ <simple>${header.version}</simple> </setProperty> <log loggingLevel="INFO" - message="Endpoint to delete Tosca Instance Properties: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instanceProperties"></log> + message="Endpoint to delete Tosca Instance Properties: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instanceProperties"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instanceProperties?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instanceProperties?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -203,7 +203,7 @@ <log loggingLevel="INFO" message="Create the tosca instantiation service"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Create the tosca instantiation service')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Create the tosca instantiation service')"/> <setHeader name="CamelHttpMethod"> <constant>POST</constant> </setHeader> @@ -211,9 +211,9 @@ <constant>application/json</constant> </setHeader> <log loggingLevel="INFO" - message="Endpoint to send Tosca Instantiation Service: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation"></log> + message="Endpoint to send Tosca Instantiation Service: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiation"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiation?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -228,7 +228,7 @@ <log loggingLevel="INFO" message="Change the tosca instantiation state service"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Change the tosca instantiation state service')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Change the tosca instantiation state service')"/> <setHeader name="CamelHttpMethod"> <constant>PUT</constant> </setHeader> @@ -236,9 +236,9 @@ <constant>application/json</constant> </setHeader> <log loggingLevel="INFO" - message="Endpoint to send Tosca Instantiation state change Service: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation/command"></log> + message="Endpoint to send Tosca Instantiation state change Service: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiation/command"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation/command?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiation/command?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -253,7 +253,7 @@ <log loggingLevel="INFO" message="Getting the Tosca Instantiation Order State"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('ControlLoop', 'Getting the Tosca Instantiation Order State')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Getting the Tosca Instantiation Order State')"/> <setHeader name="CamelHttpMethod"> <constant>GET</constant> </setHeader> @@ -267,9 +267,9 @@ <simple>${header.version}</simple> </setProperty> <log loggingLevel="INFO" - message="Endpoint to get Tosca Instantiation Order State: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiationState"></log> + message="Endpoint to get Tosca Instantiation Order State: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiationState"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiationState?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/instantiationState?name=${exchangeProperty[name]}&version=${exchangeProperty[version]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -284,7 +284,7 @@ <log loggingLevel="INFO" message="Getting the JSON Schema"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('ControlLoop', 'Getting the JSON Schema')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Getting the JSON Schema')"/> <setHeader name="CamelHttpMethod"> <constant>GET</constant> </setHeader> @@ -295,9 +295,9 @@ <simple>${header.section}</simple> </setProperty> <log loggingLevel="INFO" - message="Endpoint to get Json Schema: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/toscaServiceTemplateSchema"></log> + message="Endpoint to get Json Schema: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/toscaServiceTemplateSchema"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/toscaServiceTemplateSchema?section=${exchangeProperty[section]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/toscaServiceTemplateSchema?section=${exchangeProperty[section]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -310,9 +310,9 @@ <from uri="direct:get-element-definitions"/> <doTry> <log loggingLevel="INFO" - message="Getting the Control Loop Element Definitions"/> + message="Getting the Automation Composition Element Definitions"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('ControlLoop', 'Getting the Controlloop Element Definitions')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Getting the Automation Composition Element Definitions')"/> <setHeader name="CamelHttpMethod"> <constant>GET</constant> </setHeader> @@ -320,9 +320,9 @@ <constant>application/json</constant> </setHeader> <log loggingLevel="INFO" - message="Endpoint to get Json Schema: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/elements"></log> + message="Endpoint to get Json Schema: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/elements"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/elements?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/elements?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -331,13 +331,13 @@ </doFinally> </doTry> </route> - <route id="get-control-loop-definitions"> - <from uri="direct:get-control-loop-definitions"/> + <route id="get-acm-definitions"> + <from uri="direct:get-acm-definitions"/> <doTry> <log loggingLevel="INFO" - message="Getting the Control Loop Definitions"/> + message="Getting the Automation Composition Definitions"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('ControlLoop', 'Getting the Controlloop Element Definitions')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Getting the Automation Composition Element Definitions')"/> <setHeader name="CamelHttpMethod"> <constant>GET</constant> </setHeader> @@ -345,9 +345,9 @@ <constant>application/json</constant> </setHeader> <log loggingLevel="INFO" - message="Endpoint to get Json Schema: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/elements"></log> + message="Endpoint to get Json Schema: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/elements"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission? bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission? bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> @@ -362,7 +362,7 @@ <log loggingLevel="INFO" message="Getting Common Or Instance Properties"/> <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('ControlLoop', 'Getting Common Or Instance Properties')"/> + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('AutomationComposition', 'Getting Common Or Instance Properties')"/> <setHeader name="CamelHttpMethod"> <constant>GET</constant> </setHeader> @@ -373,9 +373,9 @@ <simple>${header.common}</simple> </setProperty> <log loggingLevel="INFO" - message="Endpoint to get Common Or Instance Properties: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/getCommonOrInstanceProperties"></log> + message="Endpoint to get Common Or Instance Properties: {{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/getCommonOrInstanceProperties"></log> <toD - uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission/getCommonOrInstanceProperties?common=${exchangeProperty[common]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.acm.runtime.url}}/onap/policy/clamp/acm/v2/commission/getCommonOrInstanceProperties?common=${exchangeProperty[common]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.acm.runtime.userName}}&authPassword={{clamp.config.acm.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> 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) |