diff options
Diffstat (limited to 'runtime-acm/src/main/java')
5 files changed, 38 insertions, 8 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java index 374c94f5d..b723dba7f 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java @@ -201,10 +201,10 @@ public class AutomationCompositionInstantiationProvider { * @return the automation compositions */ @Transactional(readOnly = true) - public AutomationCompositions getAutomationCompositions(String name, String version) { + public AutomationCompositions getAutomationCompositions(UUID compositionId, String name, String version) { var automationCompositions = new AutomationCompositions(); - automationCompositions - .setAutomationCompositionList(automationCompositionProvider.getAutomationCompositions(name, version)); + automationCompositions.setAutomationCompositionList( + automationCompositionProvider.getAutomationCompositions(compositionId, name, version)); return automationCompositions; } 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..1ff7c019e 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; @@ -90,7 +92,7 @@ public class InstantiationController extends AbstractRestController implements A public ResponseEntity<AutomationCompositions> queryCompositionInstances(UUID compositionId, String name, String version, UUID requestId) { - return ResponseEntity.ok().body(provider.getAutomationCompositions(name, version)); + return ResponseEntity.ok().body(provider.getAutomationCompositions(compositionId, name, version)); } /** @@ -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 1854fc24d..833b3fa0b 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; @@ -96,11 +97,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 cdd3ad80f..ac34f227d 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; @@ -100,7 +101,6 @@ public class InstantiationControllerStub extends AbstractRestController implemen return stubUtils.getResponse(pathToAllIntances, AutomationCompositions.class, request, log); } - @Override public ResponseEntity<InstantiationResponse> updateCompositionInstance( UUID compositionId, UUID instanceId, @@ -108,4 +108,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 |