summaryrefslogtreecommitdiffstats
path: root/models/src
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2022-12-09 14:38:10 +0000
committerFrancesco Fiora <francesco.fiora@est.tech>2022-12-12 08:18:38 +0000
commit5e0f7912ac694eef2d283aab61a659470b4ba3e5 (patch)
treeb83a930736ab7ed1edd01931466e8fb3846277df /models/src
parent8554cbb864e32495214fd8287011868a832cc997 (diff)
Link the existing InstantiationController with the generated code
Issue-ID: POLICY-4467 Change-Id: Ibe9206ee4189e73357271211d83b0603edfb86da Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'models/src')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommand.java4
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationUpdate.java34
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommandTest.java2
3 files changed, 34 insertions, 6 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommand.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommand.java
index ac5444650..48fc8ba7c 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommand.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommand.java
@@ -22,13 +22,9 @@ package org.onap.policy.clamp.models.acm.messages.rest.instantiation;
import lombok.Data;
import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionOrderedState;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
@Data
public class InstantiationCommand {
// The state to which the automation compositions are to be set
private AutomationCompositionOrderedState orderedState;
-
- // The automation composition on which the command is to be issued
- private ToscaConceptIdentifier automationCompositionIdentifier;
}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationUpdate.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationUpdate.java
new file mode 100644
index 000000000..7aab59436
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationUpdate.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.clamp.models.acm.messages.rest.instantiation;
+
+import java.util.Map;
+import java.util.UUID;
+import lombok.Data;
+import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionElement;
+
+@Data
+public class InstantiationUpdate {
+
+ private InstantiationCommand instantiationCommand;
+
+ private Map<UUID, AutomationCompositionElement> elements;
+}
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommandTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommandTest.java
index 1aa67f425..a87f7e042 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommandTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationCommandTest.java
@@ -27,7 +27,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionOrderedState;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
class InstantiationCommandTest {
@Test
@@ -43,7 +42,6 @@ class InstantiationCommandTest {
var ic1 = new InstantiationCommand();
- ic1.setAutomationCompositionIdentifier(new ToscaConceptIdentifier());
ic1.setOrderedState(AutomationCompositionOrderedState.UNINITIALISED);
assertThat(ic1.toString()).contains("InstantiationCommand(");