summaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/actors')
-rw-r--r--controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java2
-rw-r--r--controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java28
-rw-r--r--controlloop/common/actors/actor.mso/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor1
-rw-r--r--controlloop/common/actors/actor.so/pom.xml (renamed from controlloop/common/actors/actor.mso/pom.xml)4
-rw-r--r--controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java (renamed from controlloop/common/actors/actor.mso/src/main/java/org/onap/policy/controlloop/actor/mso/MSOActorServiceProvider.java)226
-rw-r--r--controlloop/common/actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor1
-rw-r--r--controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java14
-rw-r--r--controlloop/common/actors/pom.xml2
8 files changed, 138 insertions, 140 deletions
diff --git a/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java b/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java
index 31bb5c8d2..dcdf59a56 100644
--- a/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java
+++ b/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java
@@ -94,7 +94,7 @@ public class AppcServiceProviderTest {
public static void setUpSimulator() {
try {
Util.buildAaiSim();
- } catch (InterruptedException e) {
+ } catch (Exception e) {
fail(e.getMessage());
}
}
diff --git a/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java b/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
index 4ffbf6941..eaff2503a 100644
--- a/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
+++ b/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
@@ -31,13 +31,13 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
-import org.onap.policy.aai.AAINQF199.AAINQF199InstanceFilters;
-import org.onap.policy.aai.AAINQF199.AAINQF199InventoryResponseItem;
-import org.onap.policy.aai.AAINQF199.AAINQF199Manager;
-import org.onap.policy.aai.AAINQF199.AAINQF199NamedQuery;
-import org.onap.policy.aai.AAINQF199.AAINQF199QueryParameters;
-import org.onap.policy.aai.AAINQF199.AAINQF199Request;
-import org.onap.policy.aai.AAINQF199.AAINQF199Response;
+import org.onap.policy.aai.AAINQInstanceFilters;
+import org.onap.policy.aai.AAINQInventoryResponseItem;
+import org.onap.policy.aai.AAIManager;
+import org.onap.policy.aai.AAINQNamedQuery;
+import org.onap.policy.aai.AAINQQueryParameters;
+import org.onap.policy.aai.AAINQRequest;
+import org.onap.policy.aai.AAINQResponse;
import org.onap.policy.appclcm.LCMCommonHeader;
import org.onap.policy.appclcm.LCMRequest;
import org.onap.policy.appclcm.LCMRequestWrapper;
@@ -108,9 +108,9 @@ public class AppcLcmActorServiceProvider implements Actor {
*
* @return the vnf-id of the target vnf to act upon or null if not found
*/
- private static String parseAAIResponse(List<AAINQF199InventoryResponseItem> items, String resourceId) {
+ private static String parseAAIResponse(List<AAINQInventoryResponseItem> items, String resourceId) {
String vnfId = null;
- for (AAINQF199InventoryResponseItem item: items) {
+ for (AAINQInventoryResponseItem item: items) {
if ((item.genericVNF != null)
&& (item.genericVNF.modelInvariantId != null)
&& (resourceId.equals(item.genericVNF.modelInvariantId))) {
@@ -143,9 +143,9 @@ public class AppcLcmActorServiceProvider implements Actor {
//TODO: This request id should not be hard coded in future releases
UUID requestId = UUID.fromString("a93ac487-409c-4e8c-9e5f-334ae8f99087");
- AAINQF199Request aaiRequest = new AAINQF199Request();
- aaiRequest.queryParameters = new AAINQF199QueryParameters();
- aaiRequest.queryParameters.namedQuery = new AAINQF199NamedQuery();
+ AAINQRequest aaiRequest = new AAINQRequest();
+ aaiRequest.queryParameters = new AAINQQueryParameters();
+ aaiRequest.queryParameters.namedQuery = new AAINQNamedQuery();
aaiRequest.queryParameters.namedQuery.namedQueryUUID = requestId;
Map<String, Map<String, String>> filter = new HashMap<>();
@@ -154,11 +154,11 @@ public class AppcLcmActorServiceProvider implements Actor {
filterItem.put("vnf-id", sourceVnfId);
filter.put("generic-vnf", filterItem);
- aaiRequest.instanceFilters = new AAINQF199InstanceFilters();
+ aaiRequest.instanceFilters = new AAINQInstanceFilters();
aaiRequest.instanceFilters.instanceFilter.add(filter);
//TODO: URL should not be hard coded for future releases
- AAINQF199Response aaiResponse = AAINQF199Manager.postQuery(
+ AAINQResponse aaiResponse = AAIManager.postQuery(
"http://localhost:6666",
"policy", "policy",
aaiRequest, requestId);
diff --git a/controlloop/common/actors/actor.mso/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/controlloop/common/actors/actor.mso/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
deleted file mode 100644
index 90d6c7f0e..000000000
--- a/controlloop/common/actors/actor.mso/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
+++ /dev/null
@@ -1 +0,0 @@
-org.onap.policy.controlloop.actor.mso.MSOActorServiceProvider \ No newline at end of file
diff --git a/controlloop/common/actors/actor.mso/pom.xml b/controlloop/common/actors/actor.so/pom.xml
index 5b0f908fe..ff5b12167 100644
--- a/controlloop/common/actors/actor.mso/pom.xml
+++ b/controlloop/common/actors/actor.so/pom.xml
@@ -8,7 +8,7 @@
<artifactId>actors</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <artifactId>actor.mso</artifactId>
+ <artifactId>actor.so</artifactId>
<dependencies>
<dependency>
<groupId>org.onap.policy.drools-applications</groupId>
@@ -30,7 +30,7 @@
</dependency>
<dependency>
<groupId>org.onap.policy.drools-applications</groupId>
- <artifactId>mso</artifactId>
+ <artifactId>so</artifactId>
<version>1.1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
diff --git a/controlloop/common/actors/actor.mso/src/main/java/org/onap/policy/controlloop/actor/mso/MSOActorServiceProvider.java b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
index 64e0c616b..aac90f7a6 100644
--- a/controlloop/common/actors/actor.mso/src/main/java/org/onap/policy/controlloop/actor/mso/MSOActorServiceProvider.java
+++ b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * MSOActorServiceProvider
+ * SOActorServiceProvider
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.controlloop.actor.mso;
+package org.onap.policy.controlloop.actor.so;
import java.util.Collections;
import java.util.HashMap;
@@ -27,40 +27,39 @@ import java.util.Map;
import java.util.UUID;
import org.drools.core.WorkingMemory;
-import org.onap.policy.aai.AAINQF199.AAINQF199InstanceFilters;
-import org.onap.policy.aai.AAINQF199.AAINQF199InventoryResponseItem;
-import org.onap.policy.aai.AAINQF199.AAINQF199Manager;
-import org.onap.policy.aai.AAINQF199.AAINQF199NamedQuery;
-import org.onap.policy.aai.AAINQF199.AAINQF199QueryParameters;
-import org.onap.policy.aai.AAINQF199.AAINQF199Request;
-import org.onap.policy.aai.AAINQF199.AAINQF199RequestWrapper;
-import org.onap.policy.aai.AAINQF199.AAINQF199Response;
-import org.onap.policy.aai.AAINQF199.AAINQF199ResponseWrapper;
+import org.onap.policy.aai.AAINQInstanceFilters;
+import org.onap.policy.aai.AAINQInventoryResponseItem;
+import org.onap.policy.aai.AAIManager;
+import org.onap.policy.aai.AAINQNamedQuery;
+import org.onap.policy.aai.AAINQQueryParameters;
+import org.onap.policy.aai.AAINQRequest;
+import org.onap.policy.aai.AAINQResponse;
+import org.onap.policy.aai.AAINQResponseWrapper;
import org.onap.policy.controlloop.ControlLoopNotificationType;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.VirtualControlLoopNotification;
import org.onap.policy.controlloop.actorServiceProvider.spi.Actor;
import org.onap.policy.controlloop.policy.Policy;
-import org.onap.policy.mso.SOCloudConfiguration;
-import org.onap.policy.mso.SOManager;
-import org.onap.policy.mso.SOModelInfo;
-import org.onap.policy.mso.SORelatedInstance;
-import org.onap.policy.mso.SORelatedInstanceListElement;
-import org.onap.policy.mso.SORequest;
-import org.onap.policy.mso.SORequestDetails;
-import org.onap.policy.mso.SORequestInfo;
-import org.onap.policy.mso.SORequestParameters;
-import org.onap.policy.mso.util.Serialization;
+import org.onap.policy.so.SOCloudConfiguration;
+import org.onap.policy.so.SOManager;
+import org.onap.policy.so.SOModelInfo;
+import org.onap.policy.so.SORelatedInstance;
+import org.onap.policy.so.SORelatedInstanceListElement;
+import org.onap.policy.so.SORequest;
+import org.onap.policy.so.SORequestDetails;
+import org.onap.policy.so.SORequestInfo;
+import org.onap.policy.so.SORequestParameters;
+import org.onap.policy.so.util.Serialization;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
-public class MSOActorServiceProvider implements Actor {
+public class SOActorServiceProvider implements Actor {
- private static final Logger logger = LoggerFactory.getLogger(MSOActorServiceProvider.class);
+ private static final Logger logger = LoggerFactory.getLogger(SOActorServiceProvider.class);
private static String vnfItemVnfId;
@@ -78,7 +77,7 @@ public class MSOActorServiceProvider implements Actor {
private static String serviceItemServiceInstanceId;
- private String serviceItemPersonaModelId;
+ private String serviceItemModelInvariantId;
private String serviceItemModelName;
@@ -90,9 +89,9 @@ public class MSOActorServiceProvider implements Actor {
private String vfModuleItemVfModuleName;
- private String vfModuleItemPersonaModelId;
+ private String vfModuleItemModelInvariantId;
- private String vfModuleItemPersonaModelVersion;
+ private String vfModuleItemModelVersionId;
private String vfModuleItemModelName;
@@ -129,10 +128,10 @@ public class MSOActorServiceProvider implements Actor {
}
/**
- * MSOActorServiceProvider Constructor
+ * SOActorServiceProvider Constructor
*
*/
- public MSOActorServiceProvider() {
+ public SOActorServiceProvider() {
}
@@ -142,65 +141,65 @@ public class MSOActorServiceProvider implements Actor {
* @param eventRequestID
* @returns the response to the AAI Named Query
*/
- private AAINQF199ResponseWrapper AaiNamedQueryRequest(VirtualControlLoopEvent onset) {
+ private AAINQResponseWrapper AaiNamedQueryRequest(VirtualControlLoopEvent onset) {
- // create AAI named-query request with UUID started with "F199"
- AAINQF199Request aainqf199request = new AAINQF199Request();
- AAINQF199QueryParameters aainqf199queryparam = new AAINQF199QueryParameters();
- AAINQF199NamedQuery aainqf199namedquery = new AAINQF199NamedQuery();
- AAINQF199InstanceFilters aainqf199instancefilter = new AAINQF199InstanceFilters();
+ // create AAI named-query request with UUID started with ""
+ AAINQRequest aainqrequest = new AAINQRequest();
+ AAINQQueryParameters aainqqueryparam = new AAINQQueryParameters();
+ AAINQNamedQuery aainqnamedquery = new AAINQNamedQuery();
+ AAINQInstanceFilters aainqinstancefilter = new AAINQInstanceFilters();
// queryParameters
- aainqf199namedquery.namedQueryUUID = UUID.fromString("4ff56a54-9e3f-46b7-a337-07a1d3c6b469"); // UUID.fromString($params.getAaiNamedQueryUUID()) TO DO: AaiNamedQueryUUID
- aainqf199queryparam.namedQuery = aainqf199namedquery;
- aainqf199request.queryParameters = aainqf199queryparam;
+ aainqnamedquery.namedQueryUUID = UUID.fromString("4ff56a54-9e3f-46b7-a337-07a1d3c6b469"); // UUID.fromString($params.getAaiNamedQueryUUID()) TO DO: AaiNamedQueryUUID
+ aainqqueryparam.namedQuery = aainqnamedquery;
+ aainqrequest.queryParameters = aainqqueryparam;
//
// instanceFilters
//
- Map<String, Map<String, String>> aainqf199instancefiltermap = new HashMap<>();
- Map<String, String> aainqf199instancefiltermapitem = new HashMap<>();
- aainqf199instancefiltermapitem.put("vserver-name", onset.AAI.get("vserver.vserver-name")); // TO DO: get vserver.vname from dcae onset.AAI.get("vserver.vserver-name")
- aainqf199instancefiltermap.put("vserver", aainqf199instancefiltermapitem);
- aainqf199instancefilter.instanceFilter.add(aainqf199instancefiltermap);
- aainqf199request.instanceFilters = aainqf199instancefilter;
+ Map<String, Map<String, String>> aainqinstancefiltermap = new HashMap<>();
+ Map<String, String> aainqinstancefiltermapitem = new HashMap<>();
+ aainqinstancefiltermapitem.put("vserver-name", onset.AAI.get("vserver.vserver-name")); // TO DO: get vserver.vname from dcae onset.AAI.get("vserver.vserver-name")
+ aainqinstancefiltermap.put("vserver", aainqinstancefiltermapitem);
+ aainqinstancefilter.instanceFilter.add(aainqinstancefiltermap);
+ aainqrequest.instanceFilters = aainqinstancefilter;
//
- // print aainqf199request for debug
+ // print aainqrequest for debug
//
logger.debug("AAI Request sent:");
- logger.debug(Serialization.gsonPretty.toJson(aainqf199request));
+ logger.debug(Serialization.gsonPretty.toJson(aainqrequest));
//
- // Create AAINQF199RequestWrapper
+ // Create AAINQRequestWrapper
//
- AAINQF199RequestWrapper aainqf199RequestWrapper = new AAINQF199RequestWrapper(onset.requestID, aainqf199request);
+// AAINQRequestWrapper aainqRequestWrapper = new AAINQRequestWrapper(onset.requestID, aainqrequest);
//
- // insert aainqf199request into memory
+ // insert aainqrequest into memory
//
-// insert(aainqf199RequestWrapper);
+// insert(aainqRequestWrapper);
String url = "http://localhost:6666";
String username = "testUser";
String password = "testPass";
//***** send the request *****\\
- AAINQF199Response aainqf199response = AAINQF199Manager.postQuery(url, username, password, // TO DO: get AAI URL, username, and password
- aainqf199RequestWrapper.aainqf199request, onset.requestID);
+ AAINQResponse aainqresponse = AAIManager.postQuery(url, username, password, // TO DO: get AAI URL, username, and password
+ aainqrequest, onset.requestID);
// Check AAI response
- if (aainqf199response == null) {
+ if (aainqresponse == null) {
System.err.println("Failed to get AAI response");
// Fail and retract everything
return null;
} else {
- // Create AAINQF199ResponseWrapper
- AAINQF199ResponseWrapper aainqf199ResponseWrapper = new AAINQF199ResponseWrapper(onset.requestID, aainqf199response);
+ // Create AAINQResponseWrapper
+ AAINQResponseWrapper aainqResponseWrapper = new AAINQResponseWrapper(onset.requestID, aainqresponse);
- // insert aainqf199ResponseWrapper to memory -- Is this needed?
-// insert(aainqf199ResponseWrapper);
+ // insert aainqResponseWrapper to memory -- Is this needed?
+// insert(aainqResponseWrapper);
//
- extractSOFieldsFromNamedQuery(aainqf199ResponseWrapper, onset);
- return aainqf199ResponseWrapper;
+ extractSOFieldsFromNamedQuery(aainqResponseWrapper, onset);
+ return aainqResponseWrapper;
}
}
@@ -209,32 +208,32 @@ public class MSOActorServiceProvider implements Actor {
* @param namedQueryResponseWrapper
* @param onset
*/
- private void extractSOFieldsFromNamedQuery(AAINQF199ResponseWrapper namedQueryResponseWrapper, VirtualControlLoopEvent onset) {
+ private void extractSOFieldsFromNamedQuery(AAINQResponseWrapper namedQueryResponseWrapper, VirtualControlLoopEvent onset) {
try {
// vnfItem
- setVnfItemVnfId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfID);
- setVnfItemVnfType(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfType);
+ setVnfItemVnfId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfID);
+ setVnfItemVnfType(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfType);
setVnfItemVnfType(vnfItemVnfType.substring(vnfItemVnfType.lastIndexOf("/")+1));
- setVnfItemModelInvariantId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelId);
- setVnfItemModelVersionId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelVersion);
- setVnfItemModelName(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue);
- setVnfItemModelVersion(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(2).propertyValue);
- setVnfItemModelNameVersionId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue);
+ setVnfItemModelInvariantId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.modelInvariantId);
+ setVnfItemModelVersionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.modelVersionId);
+ setVnfItemModelName(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue);
+ setVnfItemModelVersion(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(2).propertyValue);
+ setVnfItemModelNameVersionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue);
// serviceItem
- setServiceItemServiceInstanceId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.serviceInstanceID);
- setServiceItemPersonaModelId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelId);
- setServiceItemModelName(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue);
- setServiceItemModelType(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).propertyValue);
- setServiceItemModelVersion(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelVersion);
- setServiceItemModelNameVersionId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue);
+ setServiceItemServiceInstanceId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.serviceInstanceID);
+ setServiceItemModelInvariantId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.modelInvariantId);
+ setServiceItemModelName(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue);
+ setServiceItemModelType(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).propertyValue);
+ setServiceItemModelVersion(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.modelVersionId);
+ setServiceItemModelNameVersionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue);
// Find the index for base vf module and non-base vf module
int baseIndex = -1;
int nonBaseIndex = -1;
- List<AAINQF199InventoryResponseItem> inventoryItems = namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems;
- for (AAINQF199InventoryResponseItem m : inventoryItems) {
+ List<AAINQInventoryResponseItem> inventoryItems = namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems;
+ for (AAINQInventoryResponseItem m : inventoryItems) {
if (m.vfModule != null && m.vfModule.isBaseVfModule == true) {
baseIndex = inventoryItems.indexOf(m);
} else if (m.vfModule != null && m.vfModule.isBaseVfModule == false && m.vfModule.orchestrationStatus == null) {
@@ -253,20 +252,20 @@ public class MSOActorServiceProvider implements Actor {
}
// This comes from the base module
- setVfModuleItemVfModuleName(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(baseIndex).vfModule.vfModuleName);
+ setVfModuleItemVfModuleName(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(baseIndex).vfModule.vfModuleName);
setVfModuleItemVfModuleName(vfModuleItemVfModuleName.replace("Vfmodule", "vDNS"));
// vfModuleItem - NOT the base module
- setVfModuleItemPersonaModelId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).vfModule.personaModelId);
- setVfModuleItemPersonaModelVersion(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).vfModule.personaModelVersion);
- setVfModuleItemModelName(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).extraProperties.extraProperty.get(0).propertyValue);
- setVfModuleItemModelNameVersionId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).extraProperties.extraProperty.get(4).propertyValue);
+ setVfModuleItemModelInvariantId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).vfModule.modelInvariantId);
+ setVfModuleItemModelVersionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).vfModule.modelVersionId);
+ setVfModuleItemModelName(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).extraProperties.extraProperty.get(0).propertyValue);
+ setVfModuleItemModelNameVersionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).extraProperties.extraProperty.get(4).propertyValue);
// tenantItem
- setTenantItemTenantId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).tenant.tenantId);
+ setTenantItemTenantId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).tenant.tenantId);
// cloudRegionItem
- setCloudRegionItemCloudRegionId(namedQueryResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId);
+ setCloudRegionItemCloudRegionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId);
} catch (Exception e) {
logger.error(e.getMessage(), e);
@@ -316,7 +315,7 @@ public class MSOActorServiceProvider implements Actor {
(getServiceItemServiceInstanceId() == null) || (getServiceItemModelName() == null) ||
(getServiceItemModelType() == null) || (getServiceItemModelVersion() == null) ||
(getServiceItemModelNameVersionId() == null) || (getVfModuleItemVfModuleName() == null) ||
- (getVfModuleItemPersonaModelId() == null) || (getVfModuleItemPersonaModelVersion() == null) ||
+ (getVfModuleItemModelInvariantId() == null) || (getVfModuleItemModelVersionId() == null) ||
(getVfModuleItemModelName() == null) || (getVfModuleItemModelNameVersionId() == null) ||
(getTenantItemTenantId() == null) || (getCloudRegionItemCloudRegionId() == null)) {
return false;
@@ -330,7 +329,7 @@ public class MSOActorServiceProvider implements Actor {
* @param onset
* @param operation
* @param policy
- * @return MSORequest
+ * @return SORequest
*/
public SORequest constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation, Policy policy) {
@@ -353,6 +352,7 @@ public class MSOActorServiceProvider implements Actor {
// Construct SO Request
SORequest request = new SORequest();
+ request.requestId = onset.requestID;
request.requestDetails = new SORequestDetails();
request.requestDetails.modelInfo = new SOModelInfo();
request.requestDetails.cloudConfiguration = new SOCloudConfiguration();
@@ -368,10 +368,10 @@ public class MSOActorServiceProvider implements Actor {
// modelInfo
//
request.requestDetails.modelInfo.modelType = "vfModule";
- request.requestDetails.modelInfo.modelInvariantId = getVfModuleItemPersonaModelId();
+ request.requestDetails.modelInfo.modelInvariantId = getVfModuleItemModelInvariantId();
request.requestDetails.modelInfo.modelNameVersionId = getVfModuleItemModelNameVersionId();
request.requestDetails.modelInfo.modelName = getVfModuleItemModelName();
- request.requestDetails.modelInfo.modelVersion = getVfModuleItemPersonaModelVersion();
+ request.requestDetails.modelInfo.modelVersion = getVfModuleItemModelVersionId();
//
// requestInfo
//
@@ -389,7 +389,7 @@ public class MSOActorServiceProvider implements Actor {
relatedInstanceListElement1.relatedInstance.instanceId = getServiceItemServiceInstanceId();
relatedInstanceListElement1.relatedInstance.modelInfo = new SOModelInfo();
relatedInstanceListElement1.relatedInstance.modelInfo.modelType = "service";
- relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = getServiceItemPersonaModelId();
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = getServiceItemModelInvariantId();
relatedInstanceListElement1.relatedInstance.modelInfo.modelNameVersionId = getServiceItemModelNameVersionId();
relatedInstanceListElement1.relatedInstance.modelInfo.modelName = getServiceItemModelName();
relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = getServiceItemModelVersion();
@@ -406,9 +406,9 @@ public class MSOActorServiceProvider implements Actor {
request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1);
request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);
//
- // print MSO request for debug
+ // print SO request for debug
//
- logger.debug("MSO request sent:");
+ logger.debug("SO request sent:");
logger.debug(Serialization.gsonPretty.toJson(request));
return request;
@@ -417,14 +417,14 @@ public class MSOActorServiceProvider implements Actor {
/**
* This method is needed to get the serviceInstanceId and vnfInstanceId which is used
- * in the asyncMSORestCall
+ * in the asyncSORestCall
*
* @param wm
* @param request
*/
public static void sendRequest(WorkingMemory wm, Object request) {
SOManager Mm = new SOManager();
- Mm.asyncMSORestCall(wm, getServiceItemServiceInstanceId(), getVnfItemVnfId(), (SORequest)request);
+ Mm.asyncSORestCall(wm, getServiceItemServiceInstanceId(), getVnfItemVnfId(), (SORequest)request);
}
/**
@@ -438,7 +438,7 @@ public class MSOActorServiceProvider implements Actor {
* @param vnfItemVnfId the vnfItemVnfId to set
*/
private void setVnfItemVnfId(String vnfItemVnfId) {
- MSOActorServiceProvider.vnfItemVnfId = vnfItemVnfId;
+ SOActorServiceProvider.vnfItemVnfId = vnfItemVnfId;
}
/**
@@ -456,14 +456,14 @@ public class MSOActorServiceProvider implements Actor {
}
/**
- * @return the vnfItemPersonaModelId
+ * @return the vnfItemModelInvariantId
*/
public String getVnfItemModelInvariantId() {
return this.vnfItemModelInvariantId;
}
/**
- * @param vnfItemPersonaModelId the vnfItemPersonaModelId to set
+ * @param vnfItemModelInvariantId the vnfItemModelInvariantId to set
*/
private void setVnfItemModelInvariantId(String vnfItemModelInvariantId) {
this.vnfItemModelInvariantId = vnfItemModelInvariantId;
@@ -537,21 +537,21 @@ public class MSOActorServiceProvider implements Actor {
*/
private void setServiceItemServiceInstanceId(
String serviceItemServiceInstanceId) {
- MSOActorServiceProvider.serviceItemServiceInstanceId = serviceItemServiceInstanceId;
+ SOActorServiceProvider.serviceItemServiceInstanceId = serviceItemServiceInstanceId;
}
/**
- * @return the serviceItemPersonaModelId
+ * @return the serviceItemModelInvariantId
*/
- public String getServiceItemPersonaModelId() {
- return this.serviceItemPersonaModelId;
+ public String getServiceItemModelInvariantId() {
+ return this.serviceItemModelInvariantId;
}
/**
- * @param serviceItemPersonaModelId the serviceItemPersonaModelId to set
+ * @param serviceItemModeInvariantlId the serviceItemModelInvariantId to set
*/
- private void setServiceItemPersonaModelId(String serviceItemPersonaModelId) {
- this.serviceItemPersonaModelId = serviceItemPersonaModelId;
+ private void setServiceItemModelInvariantId(String serviceItemModelInvariantId) {
+ this.serviceItemModelInvariantId = serviceItemModelInvariantId;
}
/**
@@ -626,32 +626,32 @@ public class MSOActorServiceProvider implements Actor {
}
/**
- * @return the vfModuleItemPersonaModelId
+ * @return the vfModuleItemModelInvariantId
*/
- public String getVfModuleItemPersonaModelId() {
- return this.vfModuleItemPersonaModelId;
+ public String getVfModuleItemModelInvariantId() {
+ return this.vfModuleItemModelInvariantId;
}
/**
- * @param vfModuleItemPersonaModelId the vfModuleItemPersonaModelId to set
+ * @param vfModuleItemModelInvariantId the vfModuleItemModelInvariantId to set
*/
- private void setVfModuleItemPersonaModelId(String vfModuleItemPersonaModelId) {
- this.vfModuleItemPersonaModelId = vfModuleItemPersonaModelId;
+ private void setVfModuleItemModelInvariantId(String vfModuleItemModelInvariantId) {
+ this.vfModuleItemModelInvariantId = vfModuleItemModelInvariantId;
}
/**
- * @return the vfModuleItemPersonaModelVersion
+ * @return the vfModuleItemModelVersionId
*/
- public String getVfModuleItemPersonaModelVersion() {
- return this.vfModuleItemPersonaModelVersion;
+ public String getVfModuleItemModelVersionId() {
+ return this.vfModuleItemModelVersionId;
}
/**
- * @param vfModuleItemPersonaModelVersion the vfModuleItemPersonaModelVersion to set
+ * @param vfModuleItemModelVersionId the vfModuleItemModelVersionId to set
*/
- private void setVfModuleItemPersonaModelVersion(
- String vfModuleItemPersonaModelVersion) {
- this.vfModuleItemPersonaModelVersion = vfModuleItemPersonaModelVersion;
+ private void setVfModuleItemModelVersionId(
+ String vfModuleItemModelVersionId) {
+ this.vfModuleItemModelVersionId = vfModuleItemModelVersionId;
}
/**
diff --git a/controlloop/common/actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/controlloop/common/actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
new file mode 100644
index 000000000..ad136e98f
--- /dev/null
+++ b/controlloop/common/actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
@@ -0,0 +1 @@
+org.onap.policy.controlloop.actor.so.SOActorServiceProvider \ No newline at end of file
diff --git a/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java b/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java
index ffada0a81..bd06ef133 100644
--- a/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java
+++ b/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java
@@ -19,19 +19,17 @@
package org.onap.policy.controlloop.actor.vfc;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
-import org.onap.policy.controlloop.VirtualControlLoopEvent;
-import org.onap.policy.vfc.VFCRequest;
-import org.onap.policy.vfc.VFCHealRequest;
-import org.onap.policy.vfc.VFCHealAdditionalParams;
-import org.onap.policy.vfc.VFCHealActionVmInfo;
import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.actorServiceProvider.spi.Actor;
import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.vfc.VFCHealActionVmInfo;
+import org.onap.policy.vfc.VFCHealAdditionalParams;
+import org.onap.policy.vfc.VFCHealRequest;
+import org.onap.policy.vfc.VFCRequest;
-import org.onap.policy.controlloop.actorServiceProvider.spi.Actor;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
diff --git a/controlloop/common/actors/pom.xml b/controlloop/common/actors/pom.xml
index 1f38e90b1..48335de75 100644
--- a/controlloop/common/actors/pom.xml
+++ b/controlloop/common/actors/pom.xml
@@ -16,7 +16,7 @@
<module>actor.appc</module>
<module>actor.vfc</module>
<module>actor.appclcm</module>
- <module>actor.mso</module>
+ <module>actor.so</module>
<module>actor.test</module>
</modules>
<dependencies>