diff options
author | liamfallon <liam.fallon@est.tech> | 2022-12-16 10:17:46 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2022-12-16 15:48:41 +0000 |
commit | f5ebd50d9f897c72aa3f6da67ac5d09e53b2c743 (patch) | |
tree | e2d69f665b8f168bee9580e4d73573e69e6475f7 /runtime-acm/src/main/java | |
parent | 0b5e99601abc5290d241f2082f12758ea46231ef (diff) |
Add new endpoints for ACM state handling
This commit introduces the Swagger changes required for the updates to
the State Handling in ACM.
The Update handling on the endpoints has changed and will be completed
in future reviews. In the meantime, some stubs and unit tests have been
temporarily disabled.
Issue-ID: POLICY-4487
Change-Id: I40b8cbb188d809b43c3e385aea35f88e9ea7da2b
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'runtime-acm/src/main/java')
4 files changed, 34 insertions, 4 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/CommissioningController.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/CommissioningController.java index 653bb9daf..a6b1ab38d 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/CommissioningController.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/CommissioningController.java @@ -21,10 +21,12 @@ package org.onap.policy.clamp.acm.runtime.main.rest; import java.util.UUID; +import javax.validation.Valid; import lombok.RequiredArgsConstructor; import org.onap.policy.clamp.acm.runtime.commissioning.CommissioningProvider; import org.onap.policy.clamp.acm.runtime.main.rest.gen.AutomationCompositionDefinitionApi; import org.onap.policy.clamp.acm.runtime.main.web.AbstractRestController; +import org.onap.policy.clamp.models.acm.messages.rest.commissioning.AcTypeStateUpdate; import org.onap.policy.clamp.models.acm.messages.rest.commissioning.CommissioningResponse; import org.onap.policy.models.base.PfModelException; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; @@ -90,9 +92,15 @@ public class CommissioningController extends AbstractRestController implements A return ResponseEntity.ok().body(provider.getAutomationCompositionDefinitions(compositionId)); } - @Override public ResponseEntity<CommissioningResponse> updateCompositionDefinition(UUID compositionId, ToscaServiceTemplate body, UUID requestId) { return ResponseEntity.ok().body(provider.updateCompositionDefinition(compositionId, body)); } + + @Override + public ResponseEntity<Void> compositionDefinitionPriming(UUID compositionId, UUID requestId, + @Valid AcTypeStateUpdate body) { + // TODO Auto-generated method stub + return null; + } } diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/InstantiationController.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/InstantiationController.java index 92651bc91..e9f1eaac0 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/InstantiationController.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/InstantiationController.java @@ -22,12 +22,14 @@ package org.onap.policy.clamp.acm.runtime.main.rest; import java.util.UUID; +import javax.validation.Valid; import lombok.RequiredArgsConstructor; import org.onap.policy.clamp.acm.runtime.instantiation.AutomationCompositionInstantiationProvider; import org.onap.policy.clamp.acm.runtime.main.rest.gen.AutomationCompositionInstanceApi; import org.onap.policy.clamp.acm.runtime.main.web.AbstractRestController; import org.onap.policy.clamp.models.acm.concepts.AutomationComposition; import org.onap.policy.clamp.models.acm.concepts.AutomationCompositions; +import org.onap.policy.clamp.models.acm.messages.rest.instantiation.AcInstanceStateUpdate; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationResponse; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationUpdate; import org.springframework.context.annotation.Profile; @@ -102,7 +104,6 @@ public class InstantiationController extends AbstractRestController implements A * @param requestId request ID used in ONAP logging * @return a response */ - @Override public ResponseEntity<InstantiationResponse> updateCompositionInstance(UUID compositionId, UUID instanceId, InstantiationUpdate instanceUpdate, UUID requestId) { @@ -124,4 +125,11 @@ public class InstantiationController extends AbstractRestController implements A return ResponseEntity.ok().body(provider.deleteAutomationComposition(compositionId, instanceId)); } + + @Override + public ResponseEntity<Void> ompositionInstanceState(UUID compositionId, UUID instanceId, + @Valid AcInstanceStateUpdate body, UUID requestId) { + // TODO Auto-generated method stub + return null; + } } diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java index f03cc4ecd..6c06d3c65 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java @@ -25,6 +25,7 @@ import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import org.onap.policy.clamp.acm.runtime.main.rest.gen.AutomationCompositionDefinitionApi; import org.onap.policy.clamp.acm.runtime.main.web.AbstractRestController; +import org.onap.policy.clamp.models.acm.messages.rest.commissioning.AcTypeStateUpdate; import org.onap.policy.clamp.models.acm.messages.rest.commissioning.CommissioningResponse; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplates; @@ -97,11 +98,17 @@ public class CommissioningControllerStub extends AbstractRestController return stubUtils.getResponse(pathToAllDefinitions, ToscaServiceTemplates.class, request, log); } - @Override public ResponseEntity<CommissioningResponse> updateCompositionDefinition( @PathVariable("compositionId") UUID compositionId, @Valid @RequestBody ToscaServiceTemplate body, @RequestHeader(value = "X-onap-RequestId", required = false) UUID xonaprequestid) { return stubUtils.getResponse(pathToPutUpdate, CommissioningResponse.class, request, log); } + + @Override + public ResponseEntity<Void> compositionDefinitionPriming(UUID compositionId, UUID requestId, + AcTypeStateUpdate body) { + // TODO Auto-generated method stub + return null; + } } diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java index 40152683d..c947f5a05 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java @@ -27,6 +27,7 @@ import org.onap.policy.clamp.acm.runtime.main.rest.gen.AutomationCompositionInst import org.onap.policy.clamp.acm.runtime.main.web.AbstractRestController; import org.onap.policy.clamp.models.acm.concepts.AutomationComposition; import org.onap.policy.clamp.models.acm.concepts.AutomationCompositions; +import org.onap.policy.clamp.models.acm.messages.rest.instantiation.AcInstanceStateUpdate; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationResponse; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationUpdate; import org.slf4j.Logger; @@ -101,7 +102,6 @@ public class InstantiationControllerStub extends AbstractRestController implemen return stubUtils.getResponse(pathToAllIntances, AutomationCompositions.class, request, log); } - @Override public ResponseEntity<InstantiationResponse> updateCompositionInstance( UUID compositionId, UUID instanceId, @@ -109,4 +109,11 @@ public class InstantiationControllerStub extends AbstractRestController implemen UUID xonaprequestid) { return stubUtils.getResponse(pathToResponseFile, InstantiationResponse.class, request, log); } + + @Override + public ResponseEntity<Void> ompositionInstanceState(UUID compositionId, UUID instanceId, + @Valid AcInstanceStateUpdate body, UUID requestId) { + // TODO Auto-generated method stub + return null; + } }
\ No newline at end of file |