summaryrefslogtreecommitdiffstats
path: root/controlloop
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop')
-rw-r--r--controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java22
-rw-r--r--controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java4
2 files changed, 14 insertions, 12 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 9e579809c..8f52608e2 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
@@ -225,18 +225,18 @@ public class SOActorServiceProvider implements Actor {
setVnfItemVnfType(vnfItemVnfType.substring(vnfItemVnfType.lastIndexOf("/")+1));
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);
+ setVnfItemModelName(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).propertyValue);
+ setVnfItemModelNameVersionId(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(4).propertyValue);
// serviceItem
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);
+ setServiceItemModelName(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).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);
-
+ setServiceItemModelNameVersionId(namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.modelVersionId);
+ setServiceItemModelVersion(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;
List<AAINQInventoryResponseItem> inventoryItems = namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems;
@@ -262,10 +262,10 @@ public class SOActorServiceProvider implements Actor {
// vfModuleItem - NOT the base module
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);
-
+ setVfModuleItemModelNameVersionId(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(1).propertyValue);
+ setVfModuleItemModelVersionId(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);
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 8ecc11466..6169184ad 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
@@ -60,7 +60,9 @@ public class AaiSimulatorJaxRs {
}
else {
// 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\"}}]}";
+ // new aai response from Brian 11/10/2017
+ return "{\"inventory-response-item\":[{\"vserver\":{\"vserver-id\":\"8b8997d2-9ec8-4593-aa53-fc956e13858f\",\"vserver-name\":\"zdfw1lb01lb01\",\"vserver-name2\":\"zdfw1lb01lb01\",\"prov-status\":\"ACTIVE\",\"vserver-selflink\":\"http://10.12.25.2:8774/v2.1/41d6d38489bd40b09ea8a6b6b852dcbd/servers/8b8997d2-9ec8-4593-aa53-fc956e13858f\",\"in-maint\":false,\"is-closed-loop-disabled\":false,\"resource-version\":\"1510152376305\"},\"extra-properties\":{},\"inventory-response-items\":{\"inventory-response-item\":[{\"model-name\":\"vLoadBalancer\",\"generic-vnf\":{\"vnf-id\":\"bb02635b-bda4-49c9-af38-362e21e1ade5\",\"vnf-name\":\"vLoadBalancer-1107\",\"vnf-type\":\"vLoadBalancer-1106/vLoadBalancer 0\",\"service-id\":\"66f157fc-4148-4880-95f5-e120677e98d1\",\"prov-status\":\"PREPROV\",\"orchestration-status\":\"Created\",\"in-maint\":false,\"is-closed-loop-disabled\":false,\"resource-version\":\"1510084829850\",\"model-invariant-id\":\"cee050ed-92a5-494f-ab04-234307a846dc\",\"model-version-id\":\"fd65becc-6b2c-4fe8-ace9-cc29db9a3da2\",\"model-customization-id\":\"1983c783-444f-4e79-af3a-85e5d49628f3\",\"nf-type\":\"\",\"nf-function\":\"\",\"nf-role\":\"\",\"nf-naming-code\":\"\"},\"extra-properties\":{\"extra-property\":[{\"property-name\":\"model-ver.model-version-id\",\"property-value\":\"fd65becc-6b2c-4fe8-ace9-cc29db9a3da2\"},{\"property-name\":\"model-ver.model-name\",\"property-value\":\"vLoadBalancer\"},{\"property-name\":\"model.model-type\",\"property-value\":\"resource\"},{\"property-name\":\"model.model-invariant-id\",\"property-value\":\"cee050ed-92a5-494f-ab04-234307a846dc\"},{\"property-name\":\"model-ver.model-version\",\"property-value\":\"1.0\"}]},\"inventory-response-items\":{\"inventory-response-item\":[{\"model-name\":\"vLoadBalancer-1106\",\"service-instance\":{\"service-instance-id\":\"3c2d03e3-f264-4544-ae83-322087adf945\",\"service-instance-name\":\"vLoadBalancer-1107\",\"model-invariant-id\":\"1321d60d-f7ff-4300-96c2-6bf0b3268b7a\",\"model-version-id\":\"732d4692-4b97-46f9-a996-0b3339e88c50\",\"resource-version\":\"1510084789548\"},\"extra-properties\":{\"extra-property\":[{\"property-name\":\"model-ver.model-version-id\",\"property-value\":\"732d4692-4b97-46f9-a996-0b3339e88c50\"},{\"property-name\":\"model-ver.model-name\",\"property-value\":\"vLoadBalancer-1106\"},{\"property-name\":\"model.model-type\",\"property-value\":\"service\"},{\"property-name\":\"model.model-invariant-id\",\"property-value\":\"1321d60d-f7ff-4300-96c2-6bf0b3268b7a\"},{\"property-name\":\"model-ver.model-version\",\"property-value\":\"1.0\"}]}},{\"model-name\":\"Vloadbalancer..base_vlb..module-0\",\"vf-module\":{\"vf-module-id\":\"33736edd-4814-414e-b8d7-fce2c90430c2\",\"vf-module-name\":\"vLoadBalancer-1107-1\",\"heat-stack-id\":\"vLoadBalancer-1107-1/0843d319-1678-4ade-be13-e443e7537bb9\",\"orchestration-status\":\"active\",\"is-base-vf-module\":true,\"resource-version\":\"1510085347667\",\"model-invariant-id\":\"6d760188-9a24-451a-b05b-e08b86cb94f2\",\"model-version-id\":\"93facad9-55f2-4fe0-9574-814c2bc2d071\",\"model-customization-id\":\"93fd5bd4-8051-4074-8530-c0c504604df5\",\"module-index\":0},\"extra-properties\":{\"extra-property\":[{\"property-name\":\"model-ver.model-version-id\",\"property-value\":\"93facad9-55f2-4fe0-9574-814c2bc2d071\"},{\"property-name\":\"model-ver.model-name\",\"property-value\":\"Vloadbalancer..base_vlb..module-0\"},{\"property-name\":\"model.model-type\",\"property-value\":\"resource\"},{\"property-name\":\"model.model-invariant-id\",\"property-value\":\"6d760188-9a24-451a-b05b-e08b86cb94f2\"},{\"property-name\":\"model-ver.model-version\",\"property-value\":\"1\"}]}}]}},{\"tenant\":{\"tenant-id\":\"41d6d38489bd40b09ea8a6b6b852dcbd\",\"tenant-name\":\"Integration-SB-00\",\"resource-version\":\"1509587770200\"},\"extra-properties\":{},\"inventory-response-items\":{\"inventory-response-item\":[{\"cloud-region\":{\"cloud-owner\":\"CloudOwner\",\"cloud-region-id\":\"RegionOne\",\"cloud-type\":\"SharedNode\",\"owner-defined-type\":\"OwnerType\",\"cloud-region-version\":\"v1\",\"cloud-zone\":\"CloudZone\",\"sriov-automation\":false,\"resource-version\":\"1509587770092\"},\"extra-properties\":{}}]}}]}}]}";
+
}
}
else