diff options
author | Sirisha_Manchikanti <sirisha.manchikanti@est.tech> | 2022-02-28 17:10:36 +0000 |
---|---|---|
committer | Sirisha_Manchikanti <sirisha.manchikanti@est.tech> | 2022-03-02 12:12:49 +0000 |
commit | 7ec767641505f52cd8ecf8b9a76fa35afe32635e (patch) | |
tree | 90dde20bbe7d13b2ee253a7b21ea1cb18f94194e /plugins/forwarding-plugins/src/main | |
parent | ee04ffd34d67563f1b33a4fbb1eb17e948725d0f (diff) |
Rename ControlLoop to AutomationCompsition
Issue-ID: POLICY-3938
Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech>
Change-Id: I63188fa9bc5d634d3aeb7e2d7051c4d67b5a202c
Diffstat (limited to 'plugins/forwarding-plugins/src/main')
-rw-r--r-- | plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarder.java (renamed from plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiControlLoopForwarder.java) | 24 | ||||
-rw-r--r-- | plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarderParameters.java (renamed from plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiControlLoopForwarderParameters.java) | 13 |
2 files changed, 19 insertions, 18 deletions
diff --git a/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiControlLoopForwarder.java b/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarder.java index 605c68cd..99615f50 100644 --- a/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiControlLoopForwarder.java +++ b/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarder.java @@ -43,17 +43,17 @@ import org.slf4j.LoggerFactory; /** * This class provides an implementation of {@link PolicyForwarder} interface for forwarding the - * controlloop design template to the life cycle api's of controlloop components. + * automationComposition design template to the life cycle api's of automationComposition components. * * @author Sirisha Manchikanti (sirisha.manchikanti@est.tech) */ -public class LifecycleApiControlLoopForwarder implements PolicyForwarder { +public class LifecycleApiAutomationCompositionForwarder implements PolicyForwarder { - private static final String COMMISSION_CONTROLLOOP_URI = "/onap/controlloop/v2/commission"; - private static final Logger LOGGER = LoggerFactory.getLogger(LifecycleApiControlLoopForwarder.class); + private static final String COMMISSION_AUTOMATION_COMPOSITION_URI = "/onap/acm/v2/commission"; + private static final Logger LOGGER = LoggerFactory.getLogger(LifecycleApiAutomationCompositionForwarder.class); - private LifecycleApiControlLoopForwarderParameters forwarderParameters; - private HttpClient controlLoopClient; + private LifecycleApiAutomationCompositionForwarderParameters forwarderParameters; + private HttpClient automationCompositionClient; /** * {@inheritDoc}. @@ -62,8 +62,8 @@ public class LifecycleApiControlLoopForwarder implements PolicyForwarder { public void configure(final String parameterGroupName) throws HttpClientConfigException { forwarderParameters = ParameterService.get(parameterGroupName); - controlLoopClient = HttpClientFactoryInstance.getClientFactory().build( - forwarderParameters.getControlLoopRuntimeParameters()); + automationCompositionClient = HttpClientFactoryInstance.getClientFactory().build( + forwarderParameters.getAutomationCompositionRuntimeParameters()); } /** @@ -88,7 +88,7 @@ public class LifecycleApiControlLoopForwarder implements PolicyForwarder { if (null != toscaServiceTemplate.getToscaTopologyTemplate() && null != toscaServiceTemplate.getNodeTypes() && null != toscaServiceTemplate.getDataTypes()) { - commissionControlLoop(toscaServiceTemplate); + commissionAutomationComposition(toscaServiceTemplate); } } else { throw new PolicyForwardingException("The entity is not of type ToscaServiceTemplate - " + entity); @@ -99,15 +99,15 @@ public class LifecycleApiControlLoopForwarder implements PolicyForwarder { } } - private Response commissionControlLoop(final ToscaServiceTemplate toscaServiceTemplate) + private Response commissionAutomationComposition(final ToscaServiceTemplate toscaServiceTemplate) throws PolicyForwardingException { return invokeHttpClient(Entity.entity(toscaServiceTemplate, MediaType.APPLICATION_JSON), - COMMISSION_CONTROLLOOP_URI); + COMMISSION_AUTOMATION_COMPOSITION_URI); } private Response invokeHttpClient(final Entity<?> entity, final String path) throws PolicyForwardingException { - var response = controlLoopClient.post(path, entity, Map.of(HttpHeaders.ACCEPT, + var response = automationCompositionClient.post(path, entity, Map.of(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON, HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)); if (response.getStatus() / 100 != 2) { LOGGER.error( diff --git a/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiControlLoopForwarderParameters.java b/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarderParameters.java index d1abce71..be7c5263 100644 --- a/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiControlLoopForwarderParameters.java +++ b/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarderParameters.java @@ -29,19 +29,20 @@ import org.onap.policy.common.parameters.annotations.Valid; import org.onap.policy.distribution.main.parameters.PolicyForwarderConfigurationParameterGroup; /** - * Holds the parameters for the {@link LifecycleApiControlLoopForwarder}. + * Holds the parameters for the {@link LifecycleApiAutomationCompositionForwarder}. * * @author Sirisha Manchikanti (sirisha.manchikanti@est.tech) */ @Getter @NotNull @NotBlank -public class LifecycleApiControlLoopForwarderParameters extends PolicyForwarderConfigurationParameterGroup { - public static final String CONTROLLOOP_FORWARDER_PLUGIN_CLASS = LifecycleApiControlLoopForwarder.class.getName(); +public class LifecycleApiAutomationCompositionForwarderParameters extends PolicyForwarderConfigurationParameterGroup { + public static final String AUTOMATION_COMPOSITION_FORWARDER_PLUGIN_CLASS = + LifecycleApiAutomationCompositionForwarder.class.getName(); - private @Valid RestClientParameters controlLoopRuntimeParameters; + private @Valid RestClientParameters automationCompositionRuntimeParameters; - public LifecycleApiControlLoopForwarderParameters() { - super(LifecycleApiControlLoopForwarderParameters.class.getSimpleName()); + public LifecycleApiAutomationCompositionForwarderParameters() { + super(LifecycleApiAutomationCompositionForwarderParameters.class.getSimpleName()); } } |