summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java66
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java4
-rw-r--r--controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java5
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl7
4 files changed, 32 insertions, 50 deletions
diff --git a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
index 8c1b23af9..b31906334 100644
--- a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
+++ b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
@@ -27,9 +27,9 @@ import java.util.Map;
import java.util.UUID;
import org.drools.core.WorkingMemory;
+import org.onap.policy.aai.AAIManager;
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;
@@ -202,12 +202,17 @@ public class SOActorServiceProvider implements Actor {
// insert aainqResponseWrapper to memory -- Is this needed?
// insert(aainqResponseWrapper);
- //
+ if (logger.isDebugEnabled()) {
+ logger.debug("AAI Named Query Response: ");
+ logger.debug(Serialization.gsonPretty.toJson(aainqResponseWrapper.aainqresponse));
+ }
+
extractSOFieldsFromNamedQuery(aainqResponseWrapper, onset);
return aainqResponseWrapper;
}
}
+
/**
* Extract the required fields from the named query response
* @param namedQueryResponseWrapper
@@ -236,22 +241,19 @@ public class SOActorServiceProvider implements Actor {
// Find the index for base vf module and non-base vf module
int baseIndex = -1;
- int nonBaseIndex = -1;
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) {
baseIndex = inventoryItems.indexOf(m);
- } else if (m.vfModule != null && m.vfModule.orchestrationStatus == null) {
- nonBaseIndex = inventoryItems.indexOf(m);
- }
+ }
//
- if (baseIndex != -1 && nonBaseIndex != -1) {
+ if (baseIndex != -1) {
break;
}
}
// Report the error if either base vf module or non-base vf module is not found
- if (baseIndex == -1 || nonBaseIndex == -1) {
+ if (baseIndex == -1) {
logger.error("Either base or non-base vf module is not found from AAI response.");
return;
}
@@ -261,49 +263,19 @@ public class SOActorServiceProvider implements Actor {
setVfModuleItemVfModuleName(vfModuleItemVfModuleName.replace("Vfmodule", "vDNS"));
// vfModuleItem - NOT the base module
- 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);
+ setVfModuleItemModelInvariantId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(baseIndex).vfModule.modelInvariantId);
+ setVfModuleItemModelVersionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(baseIndex).vfModule.modelVersionId);
+ setVfModuleItemModelName(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(baseIndex).extraProperties.extraProperty.get(0).propertyValue);
+ setVfModuleItemModelNameVersionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(baseIndex).extraProperties.extraProperty.get(4).propertyValue);
// tenantItem
setTenantItemTenantId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).tenant.tenantId);
// cloudRegionItem
setCloudRegionItemCloudRegionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId);
-
+
} catch (Exception e) {
- logger.error(e.getMessage(), e);
- VirtualControlLoopNotification notification = new VirtualControlLoopNotification(onset);
- notification.notification = ControlLoopNotificationType.REJECTED;
- notification.message = "Exception occurred " + e.getMessage();
- notification.policyName = onset.policyName;
- notification.policyScope = onset.policyScope;
- notification.policyVersion = onset.policyVersion;
- //
- try {
- logger.debug(Serialization.gsonPretty.toJson(notification));
- } catch (Exception e1) {
- logger.error("Can't deliver notification: " + notification);
- logger.error(e1.getMessage(), e1);
- }
- //
- notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
- notification.message = "Invalid named-query response from AAI";
- //
- try {
- logger.debug(Serialization.gsonPretty.toJson(notification));
- } catch (Exception e1) {
- logger.error("Can't deliver notification: " + notification);
- logger.error(e1.getMessage(), e1);
- }
- // Retract everything
- return;
- }
-
- // Extracted fields should not be null
- if (!checkExtractedFields()) {
- System.err.println("some fields are missing from AAI response.");
+ logger.warn("Problem extracting SO data from AAI query response because of {}", e.getMessage(), e);
return;
}
}
@@ -327,7 +299,7 @@ public class SOActorServiceProvider implements Actor {
}
return true;
}
-
+
/**
* Construct SO Request
*
@@ -335,6 +307,7 @@ public class SOActorServiceProvider implements Actor {
* @param operation
* @param policy
* @return SORequest
+ * @throws IllegalAccessException
*/
public SORequest constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation, Policy policy) {
@@ -349,8 +322,7 @@ public class SOActorServiceProvider implements Actor {
// check if the fields extracted from named query response are
// not null so we can proceed with SO request
if (!checkExtractedFields()) {
-
- System.err.println("AAI response is missing some required fields. Cannot proceed with SO Request construction.");
+ logger.warn("AAI response is missing some required fields. Cannot proceed with SO Request construction.");
return null;
} else {
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
index a6d321f43..608d2c00d 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
@@ -225,6 +225,10 @@ public class ControlLoopOperationManager implements Serializable {
// Save the operation
this.currentOperation = operation;
+ if (this.operationRequest == null) {
+ this.policyResult = PolicyResult.FAILURE;
+ }
+
return operationRequest;
case "VFC":
this.operationRequest = VFCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset, operation.operation, this.policy, this.eventManager.getVnfResponse());
diff --git a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
index ad106e555..5eac5cc51 100644
--- a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
+++ b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
@@ -52,8 +52,9 @@ public class AaiSimulatorJaxRs {
AAINQRequest request = Serialization.gsonPretty.fromJson(req, AAINQRequest.class);
if (request.instanceFilters.instanceFilter.get(0).containsKey("vserver"))
- {
- return "{\n\t\"inventory-response-item\": [{\n\t\t\t\"extra-properties\": {},\n\t\t\t\"inventory-response-items\": {\n\t\t\t\t\"inventory-response-item\": [{\n\t\t\t\t\t\t\"extra-properties\": {\n\t\t\t\t\t\t\t\"extra-property\": [{\n\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name\",\n\t\t\t\t\t\t\t\t\t\"property-value\": \"c15ce9e1-e914-4c8f-b8bb\"\n\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-type\",\n\t\t\t\t\t\t\t\t\t\"property-value\": \"resource\"\n\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-version\",\n\t\t\t\t\t\t\t\t\t\"property-value\": \"1\"\n\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-id\",\n\t\t\t\t\t\t\t\t\t\"property-value\": \"033a32ed-aa65-4764-a736-36f2942f1aa0\"\n\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name-version-id\",\n\t\t\t\t\t\t\t\t\t\"property-value\": \"d4d072dc-4e21-4a03-9524-628985819a8e\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"generic-vnf\": {\n\t\t\t\t\t\t\t\"in-maint\": false,\n\t\t\t\t\t\t\t\"is-closed-loop-disabled\": false,\n\t\t\t\t\t\t\t\"orchestration-status\": \"Created\",\n\t\t\t\t\t\t\t\"model-invariant-id\": \"033a32ed-aa65-4764-a736-36f2942f1aa0\",\n\t\t\t\t\t\t\t\"model-version-id\": \"1.0\",\n\t\t\t\t\t\t\t\"resource-version\": \"1485542422\",\n\t\t\t\t\t\t\t\"service-id\": \"b3f70641-bdb9-4030-825e-6abb73a1f929\",\n\t\t\t\t\t\t\t\"vnf-id\": \"594e2fe0-48b8-41ff-82e2-3d4bab69b192\",\n\t\t\t\t\t\t\t\"vnf-name\": \"Vnf_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8\",\n\t\t\t\t\t\t\t\"vnf-type\": \"8330e932-2a23-4943-8606/c15ce9e1-e914-4c8f-b8bb 1\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"inventory-response-items\": {\n\t\t\t\t\t\t\t\"inventory-response-item\": [{\n\t\t\t\t\t\t\t\t\t\"extra-properties\": {\n\t\t\t\t\t\t\t\t\t\t\"extra-property\": [{\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"8330e932-2a23-4943-8606\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"service\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-version\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"1\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"4fcbc1c0-7793-46d8-8aa1-fa1c2ed9ec7b\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name-version-id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"5c996219-b2e2-4c76-9b43-7e8672a33c1d\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"service-instance\": {\n\t\t\t\t\t\t\t\t\t\t\"model-invariant-id\": \"4fcbc1c0-7793-46d8-8aa1-fa1c2ed9ec7b\",\n\t\t\t\t\t\t\t\t\t\t\"model-version-id\": \"1.0\",\n\t\t\t\t\t\t\t\t\t\t\"resource-version\": \"1485542400\",\n\t\t\t\t\t\t\t\t\t\t\"service-instance-id\": \"cf8426a6-0b53-4e3d-bfa6-4b2f4d5913a5\",\n\t\t\t\t\t\t\t\t\t\t\"service-instance-name\": \"Service_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\"extra-properties\": {\n\t\t\t\t\t\t\t\t\t\t\"extra-property\": [{\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"C15ce9e1E9144c8fB8bb..base_vlb..module-0\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"resource\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-version\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"1\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"79ee24cd-fc9a-4f14-afae-5e1dd2ab2941\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name-version-id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"5484cabb-1a0d-4f29-a616-094a3f643d73\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"model-name\": \"C15ce9e1E9144c8fB8bb..base_vlb..module-0\",\n\t\t\t\t\t\t\t\t\t\"vf-module\": {\n\t\t\t\t\t\t\t\t\t\t\"heat-stack-id\": \"Vfmodule_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8/5845f37b-6cda-4e91-8ca3-f5572d226488\",\n\t\t\t\t\t\t\t\t\t\t\"is-base-vf-module\": true,\n\t\t\t\t\t\t\t\t\t\t\"orchestration-status\": \"active\",\n\t\t\t\t\t\t\t\t\t\t\"model-invariant-id\": \"79ee24cd-fc9a-4f14-afae-5e1dd2ab2941\",\n\t\t\t\t\t\t\t\t\t\t\"model-version-id\": \"1\",\n\t\t\t\t\t\t\t\t\t\t\"resource-version\": \"1485542667\",\n\t\t\t\t\t\t\t\t\t\t\"vf-module-id\": \"b0eff878-e2e1-4947-9597-39afdd0f51dd\",\n\t\t\t\t\t\t\t\t\t\t\"vf-module-name\": \"Vfmodule_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\"extra-properties\": {\n\t\t\t\t\t\t\t\t\t\t\"extra-property\": [{\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"C15ce9e1E9144c8fB8bb..dnsscaling..module-1\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"resource\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-version\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"1\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"f32568ec-2f1c-458a-864b-0593d53d141a\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name-version-id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"69615025-879d-4f0d-afe3-b7d1a7eeed1f\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"vf-module\": {\n\t\t\t\t\t\t\t\t\t\t\"is-base-vf-module\": false,\n\t\t\t\t\t\t\t\t\t\t\"model-invariant-id\": \"f32568ec-2f1c-458a-864b-0593d53d141a\",\n\t\t\t\t\t\t\t\t\t\t\"model-version-id\": \"1.0\",\n\t\t\t\t\t\t\t\t\t\t\"resource-version\": \"1485561752\",\n\t\t\t\t\t\t\t\t\t\t\"vf-module-id\": \"dummy\",\n\t\t\t\t\t\t\t\t\t\t\"vf-module-name\": \"dummy\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\"extra-properties\": {\n\t\t\t\t\t\t\t\t\t\t\"extra-property\": [{\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"C15ce9e1E9144c8fB8bb..dnsscaling..module-1\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"resource\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-version\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"1\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"f32568ec-2f1c-458a-864b-0593d53d141a\"\n\t\t\t\t\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-name\": \"model.model-name-version-id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"property-value\": \"69615025-879d-4f0d-afe3-b7d1a7eeed1f\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"vf-module\": {\n\t\t\t\t\t\t\t\t\t\t\"heat-stack-id\": \"vDNS_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8/f447ce51-14dd-4dcd-9957-68a047c79673\",\n\t\t\t\t\t\t\t\t\t\t\"is-base-vf-module\": false,\n\t\t\t\t\t\t\t\t\t\t\"orchestration-status\": \"active\",\n\t\t\t\t\t\t\t\t\t\t\"model-invariant-id\": \"f32568ec-2f1c-458a-864b-0593d53d141a\",\n\t\t\t\t\t\t\t\t\t\t\"model-version-id\": \"1.0\",\n\t\t\t\t\t\t\t\t\t\t\"resource-version\": \"1485562712\",\n\t\t\t\t\t\t\t\t\t\t\"vf-module-id\": \"8cd79e44-1fae-48c1-a160-609f90b46749\",\n\t\t\t\t\t\t\t\t\t\t\"vf-module-name\": \"vDNS_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}, {\n\t\t\t\t\t\t\"extra-properties\": {},\n\t\t\t\t\t\t\"inventory-response-items\": {\n\t\t\t\t\t\t\t\"inventory-response-item\": [{\n\t\t\t\t\t\t\t\t\t\"cloud-region\": {\n\t\t\t\t\t\t\t\t\t\t\"cloud-owner\": \"Rackspace\",\n\t\t\t\t\t\t\t\t\t\t\"cloud-region-id\": \"DFW\",\n\t\t\t\t\t\t\t\t\t\t\"cloud-region-version\": \"v1\",\n\t\t\t\t\t\t\t\t\t\t\"cloud-type\": \"SharedNode\",\n\t\t\t\t\t\t\t\t\t\t\"cloud-zone\": \"CloudZone\",\n\t\t\t\t\t\t\t\t\t\t\"owner-defined-type\": \"OwnerType\",\n\t\t\t\t\t\t\t\t\t\t\"resource-version\": \"1485465545\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"extra-properties\": {}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"tenant\": {\n\t\t\t\t\t\t\t\"resource-version\": \"1485465545\",\n\t\t\t\t\t\t\t\"tenant-id\": \"1015548\",\n\t\t\t\t\t\t\t\"tenant-name\": \"1015548\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"vserver\": {\n\t\t\t\t\"in-maint\": false,\n\t\t\t\t\"is-closed-loop-disabled\": false,\n\t\t\t\t\"prov-status\": \"ACTIVE\",\n\t\t\t\t\"resource-version\": \"1485546436\",\n\t\t\t\t\"vserver-id\": \"70f081eb-2a87-4c81-9296-4b93d7d145c6\",\n\t\t\t\t\"vserver-name\": \"vlb-lb-32c8\",\n\t\t\t\t\"vserver-name2\": \"vlb-lb-32c8\",\n\t\t\t\t\"vserver-selflink\": \"https://dfw.servers.api.rackspacecloud.com/v2/1015548/servers/70f081eb-2a87-4c81-9296-4b93d7d145c6\"\n\t\t\t}\n\t\t}\n\t]\n}";
+ {
+ // vll format - new
+ return "{\"inventory-response-item\":[{\"extra-properties\":{},\"inventory-response-items\":{\"inventory-response-item\":[{\"extra-properties\":{\"extra-property\":[{\"property-name\":\"model-ver.model-version-id\",\"property-value\":\"93a6166f-b3d5-4f06-b4ba-aed48d009ad9\"},{\"property-name\":\"model-ver.model-name\",\"property-value\":\"generic-vnf\"},{\"property-name\":\"model.model-type\",\"property-value\":\"widget\"},{\"property-name\":\"model.model-invariant-id\",\"property-value\":\"acc6edd8-a8d4-4b93-afaa-0994068be14c\"},{\"property-name\":\"model-ver.model-version\",\"property-value\":\"1.0\"}]},\"generic-vnf\":{\"in-maint\":false,\"is-closed-loop-disabled\":false,\"model-invariant-id\":\"acc6edd8-a8d4-4b93-afaa-0994068be14c\",\"model-version-id\":\"93a6166f-b3d5-4f06-b4ba-aed48d009ad9\",\"orchestration-status\":\"Created\",\"resource-version\":\"1507826325834\",\"service-id\":\"b3f70641-bdb9-4030-825e-6abb73a1f929\",\"vnf-id\":\"594e2fe0-48b8-41ff-82e2-3d4bab69b192\",\"vnf-name\":\"Vnf_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8\",\"vnf-type\":\"8330e932-2a23-4943-8606/c15ce9e1-e914-4c8f-b8bb 1\"},\"inventory-response-items\":{\"inventory-response-item\":[{\"extra-properties\":{\"extra-property\":[{\"property-name\":\"model-ver.model-version-id\",\"property-value\":\"46b92144-923a-4d20-b85a-3cbd847668a9\"},{\"property-name\":\"model-ver.model-name\",\"property-value\":\"service-instance\"},{\"property-name\":\"model.model-type\",\"property-value\":\"widget\"},{\"property-name\":\"model.model-invariant-id\",\"property-value\":\"82194af1-3c2c-485a-8f44-420e22a9eaa4\"},{\"property-name\":\"model-ver.model-version\",\"property-value\":\"1.0\"}]},\"model-name\":\"service-instance\",\"service-instance\":{\"model-invariant-id\":\"82194af1-3c2c-485a-8f44-420e22a9eaa4\",\"model-version-id\":\"46b92144-923a-4d20-b85a-3cbd847668a9\",\"resource-version\":\"1507827626200\",\"service-instance-id\":\"cf8426a6-0b53-4e3d-bfa6-4b2f4d5913a5\",\"service-instance-name\":\"Service_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8\"}},{\"extra-properties\":{\"extra-property\":[{\"property-name\":\"model-ver.model-version-id\",\"property-value\":\"93a6166f-b3d5-4f06-b4ba-aed48d009ad9\"},{\"property-name\":\"model-ver.model-name\",\"property-value\":\"generic-vnf\"},{\"property-name\":\"model.model-type\",\"property-value\":\"widget\"},{\"property-name\":\"model.model-invariant-id\",\"property-value\":\"acc6edd8-a8d4-4b93-afaa-0994068be14c\"},{\"property-name\":\"model-ver.model-version\",\"property-value\":\"1.0\"}]},\"model-name\":\"generic-vnf\",\"vf-module\":{\"heat-stack-id\":\"Vfmodule_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8/5845f37b-6cda-4e91-8ca3-f5572d226488\",\"is-base-vf-module\":true,\"model-invariant-id\":\"acc6edd8-a8d4-4b93-afaa-0994068be14c\",\"model-version-id\":\"93a6166f-b3d5-4f06-b4ba-aed48d009ad9\",\"orchestration-status\":\"active\",\"resource-version\":\"1507826326804\",\"vf-module-id\":\"b0eff878-e2e1-4947-9597-39afdd0f51dd\",\"vf-module-name\":\"Vfmodule_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8\"}}]},\"model-name\":\"generic-vnf\"},{\"extra-properties\":{},\"inventory-response-items\":{\"inventory-response-item\":[{\"cloud-region\":{\"cloud-owner\":\"Rackspace\",\"cloud-region-id\":\"DFW\",\"cloud-region-version\":\"v1\",\"cloud-type\":\"SharedNode\",\"cloud-zone\":\"CloudZone\",\"owner-defined-type\":\"OwnerType\",\"resource-version\":\"1507828410019\",\"sriov-automation\":false},\"extra-properties\":{}}]},\"tenant\":{\"resource-version\":\"1507828410764\",\"tenant-id\":\"1015548\",\"tenant-name\":\"1015548\"}}]},\"vserver\":{\"in-maint\":false,\"is-closed-loop-disabled\":false,\"prov-status\":\"ACTIVE\",\"resource-version\":\"1507828410832\",\"vserver-id\":\"70f081eb-2a87-4c81-9296-4b93d7d145c6\",\"vserver-name\":\"vlb-lb-32c8\",\"vserver-name2\":\"vlb-lb-32c8\",\"vserver-selflink\":\"https://aai.api.simpledemo.openecomp.org:8443/aai/v11/nodes/vservers?vserver-name=vlb-lb-32c8\"}}]}";
}
else
{
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
index e601ed43f..44501bf5e 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
@@ -587,9 +587,14 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
//
// What happens if its null?
//
- logger.warn("{}: {}: unexpected null operation request",
+ logger.warn("{}: {}: unexpected null operation request",
$params.getClosedLoopControlName(),
drools.getRule().getName());
+ if ("SO".equals($operation.policy.getActor())) {
+ retract($operation);
+ modify($manager) {finishOperation($operation)};
+ }
+
}
end