aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-kubernetes/src
diff options
context:
space:
mode:
Diffstat (limited to 'participant/participant-impl/participant-impl-kubernetes/src')
-rwxr-xr-xparticipant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java7
-rwxr-xr-x[-rw-r--r--]participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java8
2 files changed, 15 insertions, 0 deletions
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java
index 778d0d10c..d6ce70ce1 100755
--- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java
+++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java
@@ -249,4 +249,11 @@ public class AutomationCompositionElementHandler implements AutomationCompositio
intermediaryApi.updateAutomationCompositionElementState(automationCompositionId, element.getId(), deployState,
lockState, StateChangeResult.NO_ERROR, "Restarted");
}
+
+ @Override
+ public void migrate(UUID automationCompositionId, AcElementDeploy element, UUID compositionTargetId,
+ Map<String, Object> properties) throws PfModelException {
+ intermediaryApi.updateAutomationCompositionElementState(automationCompositionId, element.getId(),
+ DeployState.DEPLOYED, null, StateChangeResult.NO_ERROR, "Migrated");
+ }
}
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java b/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java
index 6cf344feb..fb8a04602 100644..100755
--- a/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java
+++ b/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java
@@ -234,4 +234,12 @@ class AutomationCompositionElementHandlerTest {
nodeTemplatesMap.get(K8S_AUTOMATION_COMPOSITION_ELEMENT).getProperties(), DeployState.UNDEPLOYING,
LockState.LOCKED));
}
+
+ @Test
+ void testMigrate() throws PfModelException {
+ var element = CommonTestData.createAcElementDeploy();
+ var automationCompositionId = commonTestData.getAutomationCompositionId();
+ assertDoesNotThrow(() -> automationCompositionElementHandler.migrate(automationCompositionId, element,
+ UUID.randomUUID(), Map.of()));
+ }
}