summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl
diff options
context:
space:
mode:
authorpramod.jamkhedkar <pramod@research.att.com>2019-08-28 11:39:15 -0400
committerpramod.jamkhedkar <pramod@research.att.com>2019-08-30 11:12:58 -0400
commit363398bece860e1c055adf812996b1bdfad6f8df (patch)
treebde76a972bb18ae0c443cf2e64a41a44034130a1 /models-interactions/model-impl
parenta930b0105c2e45a657427cfcb41fc0330d0c2e99 (diff)
Added VFModule count
Added the function VFModuleCount to AaiCqResponse class. It counts the number of vf modules. Also changed the same custom query response in AaiSimulator. Issue-ID: POLICY-1858 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com> Change-Id: If08de84f74d2bd9501b501b881cdd761089614dc
Diffstat (limited to 'models-interactions/model-impl')
-rw-r--r--models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java106
-rw-r--r--models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiCqResponseTest.java53
-rw-r--r--models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiCqResponse.json673
3 files changed, 93 insertions, 739 deletions
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
index dea11d563..ca0c1867f 100644
--- a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
@@ -55,7 +55,6 @@ public class AaiCqResponse {
private static JAXBContext jaxbContext;
private static Unmarshaller unmarshaller;
-
// JABX initial stuff
static {
Map<String, Object> properties = new HashMap<>();
@@ -63,8 +62,12 @@ public class AaiCqResponse {
properties.put(JAXBContextProperties.JSON_INCLUDE_ROOT, false);
// Define JAXB context
try {
- jaxbContext = JAXBContextFactory.createContext(new Class[] {Vserver.class, GenericVnf.class, VfModule.class,
- CloudRegion.class, ServiceInstance.class, Tenant.class, ModelVer.class}, properties);
+ jaxbContext =
+ JAXBContextFactory
+ .createContext(
+ new Class[] {Vserver.class, GenericVnf.class, VfModule.class,
+ CloudRegion.class, ServiceInstance.class, Tenant.class, ModelVer.class},
+ properties);
unmarshaller = jaxbContext.createUnmarshaller();
} catch (JAXBException e) {
LOGGER.error("Could not initialize JAXBContext", e);
@@ -75,11 +78,11 @@ public class AaiCqResponse {
@SerializedName("results")
private List<Object> inventoryResponseItems = new LinkedList<>();
-
/**
* Constructor creates a custom query response from a valid json string.
*
- * @param jsonString A&AI Custom Query response JSON string
+ * @param jsonString
+ * A&AI Custom Query response JSON string
*/
public AaiCqResponse(String jsonString) {
@@ -95,8 +98,8 @@ public class AaiCqResponse {
// Create the StreamSource by creating StringReader using the
// JSON input
- StreamSource json = new StreamSource(
- new StringReader(resultsArray.getJSONObject(i).getJSONObject("vserver").toString()));
+ StreamSource json = new StreamSource(new StringReader(
+ resultsArray.getJSONObject(i).getJSONObject("vserver").toString()));
// Getting the vserver pojo again from the json
Vserver vserver = this.getAaiObject(json, Vserver.class);
@@ -107,8 +110,8 @@ public class AaiCqResponse {
if (resultsArray.getJSONObject(i).has(GENERIC_VNF)) {
// Create the StreamSource by creating StringReader using the
// JSON input
- StreamSource json = new StreamSource(
- new StringReader(resultsArray.getJSONObject(i).getJSONObject(GENERIC_VNF).toString()));
+ StreamSource json = new StreamSource(new StringReader(
+ resultsArray.getJSONObject(i).getJSONObject(GENERIC_VNF).toString()));
// Getting the generic vnf pojo again from the json
GenericVnf genericVnf = this.getAaiObject(json, GenericVnf.class);
@@ -121,8 +124,8 @@ public class AaiCqResponse {
// Create the StreamSource by creating StringReader using the
// JSON input
- StreamSource json = new StreamSource(
- new StringReader(resultsArray.getJSONObject(i).getJSONObject("service-instance").toString()));
+ StreamSource json = new StreamSource(new StringReader(
+ resultsArray.getJSONObject(i).getJSONObject("service-instance").toString()));
// Getting the employee pojo again from the json
ServiceInstance serviceInstance = this.getAaiObject(json, ServiceInstance.class);
@@ -134,8 +137,8 @@ public class AaiCqResponse {
if (resultsArray.getJSONObject(i).has(VF_MODULE)) {
// Create the StreamSource by creating StringReader using the
// JSON input
- StreamSource json = new StreamSource(
- new StringReader(resultsArray.getJSONObject(i).getJSONObject(VF_MODULE).toString()));
+ StreamSource json = new StreamSource(new StringReader(
+ resultsArray.getJSONObject(i).getJSONObject(VF_MODULE).toString()));
// Getting the vf module pojo again from the json
VfModule vfModule = this.getAaiObject(json, VfModule.class);
@@ -147,8 +150,8 @@ public class AaiCqResponse {
if (resultsArray.getJSONObject(i).has("cloud-region")) {
// Create the StreamSource by creating StringReader using the
// JSON input
- StreamSource json = new StreamSource(
- new StringReader(resultsArray.getJSONObject(i).getJSONObject("cloud-region").toString()));
+ StreamSource json = new StreamSource(new StringReader(
+ resultsArray.getJSONObject(i).getJSONObject("cloud-region").toString()));
// Getting the cloud region pojo again from the json
CloudRegion cloudRegion = this.getAaiObject(json, CloudRegion.class);
@@ -160,8 +163,8 @@ public class AaiCqResponse {
if (resultsArray.getJSONObject(i).has("tenant")) {
// Create the StreamSource by creating StringReader using the
// JSON input
- StreamSource json = new StreamSource(
- new StringReader(resultsArray.getJSONObject(i).getJSONObject("tenant").toString()));
+ StreamSource json = new StreamSource(new StringReader(
+ resultsArray.getJSONObject(i).getJSONObject("tenant").toString()));
// Getting the tenant pojo again from the json
Tenant tenant = this.getAaiObject(json, Tenant.class);
@@ -173,8 +176,8 @@ public class AaiCqResponse {
if (resultsArray.getJSONObject(i).has("model-ver")) {
// Create the StreamSource by creating StringReader using the
// JSON input
- StreamSource json = new StreamSource(
- new StringReader(resultsArray.getJSONObject(i).getJSONObject("model-ver").toString()));
+ StreamSource json = new StreamSource(new StringReader(
+ resultsArray.getJSONObject(i).getJSONObject("model-ver").toString()));
// Getting the ModelVer pojo again from the json
ModelVer modelVer = this.getAaiObject(json, ModelVer.class);
@@ -184,12 +187,8 @@ public class AaiCqResponse {
}
-
-
}
-
-
private <T> T getAaiObject(StreamSource json, final Class<T> classOfResponse) {
try {
return unmarshaller.unmarshal(json, classOfResponse).getValue();
@@ -210,7 +209,8 @@ public class AaiCqResponse {
/**
* Get list of A&AI objects in the custom query.
*
- * @param classOfResponse Class of the type of A&AI objects to be returned
+ * @param classOfResponse
+ * Class of the type of A&AI objects to be returned
* @return List A&AI objects matching the class
*/
@SuppressWarnings("unchecked")
@@ -289,11 +289,11 @@ public class AaiCqResponse {
}
-
/**
* Returns a generic Vnf matching vnf name.
*
- * @param vnfName Name of the vnf to match
+ * @param vnfName
+ * Name of the vnf to match
* @return generic Vnf
*/
public GenericVnf getGenericVnfByVnfName(String vnfName) {
@@ -318,7 +318,8 @@ public class AaiCqResponse {
/**
* Returns a generic Vnf matching model invariant ID.
*
- * @param modelInvariantId Name of the vnf to match
+ * @param modelInvariantId
+ * Name of the vnf to match
* @return generic Vnf
*/
public GenericVnf getGenericVnfByModelInvariantId(String modelInvariantId) {
@@ -340,11 +341,11 @@ public class AaiCqResponse {
}
-
/**
* Returns a generic Vnf of a given VF Module ID.
*
- * @param vfModuleModelInvariantId of the vf module for which vnf is to be returned
+ * @param vfModuleModelInvariantId
+ * of the vf module for which vnf is to be returned
* @return generic Vnf
*/
public GenericVnf getGenericVnfByVfModuleModelInvariantId(String vfModuleModelInvariantId) {
@@ -354,7 +355,7 @@ public class AaiCqResponse {
// Iterate through all the vfModules of that generic Vnf
for (VfModule vfMod : genVnf.getVfModules().getVfModule()) {
if (vfMod.getModelInvariantId() != null
- && vfMod.getModelInvariantId().equals(vfModuleModelInvariantId)) {
+ && vfMod.getModelInvariantId().equals(vfModuleModelInvariantId)) {
return genVnf;
}
}
@@ -362,8 +363,6 @@ public class AaiCqResponse {
return null;
}
-
-
/**
* Get the generic vnf associated with the vserver in the custom query.
*
@@ -382,7 +381,8 @@ public class AaiCqResponse {
String genericVnfId = "";
List<RelationshipData> relationshipData = null;
- // Iterate through the list of relationships and get generic vnf relationship data
+ // Iterate through the list of relationships and get generic vnf
+ // relationship data
for (Relationship r : relations) {
// Get the name of generic-vnf related to this server
if (GENERIC_VNF.equals(r.getRelatedTo())) {
@@ -410,7 +410,6 @@ public class AaiCqResponse {
return genericVnf;
}
-
/**
* Get Vf Module associated with the vserver in the custom query.
*
@@ -430,7 +429,8 @@ public class AaiCqResponse {
String vfModuleId = "";
List<RelationshipData> relationshipData = null;
- // Iterate through the list of relationships and get vf module relationship data
+ // Iterate through the list of relationships and get vf module
+ // relationship data
for (Relationship r : relations) {
// Get relationship data of vfmodule related to this server
if (VF_MODULE.equals(r.getRelatedTo())) {
@@ -461,7 +461,6 @@ public class AaiCqResponse {
return vfModule;
}
-
/**
* Get vf modules in the custom query.
*
@@ -494,7 +493,6 @@ public class AaiCqResponse {
return vfModule;
}
-
/**
* Get Vf Module matching a specific VF model invariant ID.
*
@@ -504,7 +502,8 @@ public class AaiCqResponse {
VfModule vfModule = null;
for (VfModule vfMod : this.getAllVfModules()) {
- if (vfMod.getModelInvariantId() != null && vfModelInvariantId.equals(vfMod.getModelInvariantId())) {
+ if (vfMod.getModelInvariantId() != null
+ && vfModelInvariantId.equals(vfMod.getModelInvariantId())) {
vfModule = vfMod;
}
@@ -543,8 +542,6 @@ public class AaiCqResponse {
return modelVerList;
}
-
-
/**
* Get ModelVer matching a specific version id.
*
@@ -562,5 +559,32 @@ public class AaiCqResponse {
return modelVer;
}
-}
+ /**
+ * Get the count of vfModules matching customizationId, InvariantId and
+ * VersionId.
+ *
+ * @param custId
+ * ModelCustomizationId
+ * @param invId
+ * ModelInvariantId
+ * @param verId
+ * ModelVersionId
+ * @return Returns the count of vf modules
+ */
+ public int getVfModuleCount(String custId, String invId, String verId) {
+ List<VfModule> vfModuleList = this.getAllVfModules();
+ int count = 0;
+ for (VfModule vfModule : vfModuleList) {
+ if (vfModule.getModelCustomizationId() != null && vfModule.getModelInvariantId() != null
+ && vfModule.getModelVersionId() != null) {
+ if (vfModule.getModelCustomizationId().equals(custId)
+ && vfModule.getModelInvariantId().equals(invId)
+ && vfModule.getModelVersionId().equals(verId)) {
+ count = count + 1;
+ }
+ }
+ }
+ return count;
+ }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiCqResponseTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiCqResponseTest.java
index 8335ce80b..c128fb318 100644
--- a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiCqResponseTest.java
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiCqResponseTest.java
@@ -43,8 +43,8 @@ public class AaiCqResponseTest {
private static final String ETE_VFMODULE = "Vfmodule_Ete_vFWCLvFWSNK_7ba1fbde_0";
private static final String ETE_VNF = "Ete_vFWCLvFWSNK_7ba1fbde_0";
private static final Logger LOGGER = LoggerFactory.getLogger(AaiCqResponseTest.class);
- private static final String CQ_RESPONSE_SAMPLE = "src/test/resources/org/onap/policy/aai/AaiCqResponseFull.json";
-
+ private static final String CQ_RESPONSE_SAMPLE =
+ "src/test/resources/org/onap/policy/aai/AaiCqResponseFull.json";
@Test
public void testConstructor() throws Exception {
@@ -68,8 +68,9 @@ public class AaiCqResponseTest {
*/
String responseString = "";
- responseString = new String(Files
- .readAllBytes(new File("src/test/resources/org/onap/policy/aai/AaiMalformedCqResponse.json").toPath()));
+ responseString = new String(Files.readAllBytes(
+ new File("src/test/resources/org/onap/policy/aai/AaiMalformedCqResponse.json")
+ .toPath()));
AaiCqResponse aaiCqResponse;
aaiCqResponse = new AaiCqResponse(responseString);
@@ -77,7 +78,6 @@ public class AaiCqResponseTest {
assertNull(aaiObj);
}
-
}
@Test
@@ -108,7 +108,8 @@ public class AaiCqResponseTest {
aaiCqResponse = new AaiCqResponse(responseString);
ServiceInstance si = aaiCqResponse.getServiceInstance();
assertNotNull(si);
- assertEquals("Service_Ete_Name7ba1fbde-6187-464a-a62d-d9dd25bdf4e8", si.getServiceInstanceName());
+ assertEquals("Service_Ete_Name7ba1fbde-6187-464a-a62d-d9dd25bdf4e8",
+ si.getServiceInstanceName());
LOGGER.info(si.getServiceInstanceName());
}
@@ -140,8 +141,6 @@ public class AaiCqResponseTest {
LOGGER.info(tenant.getTenantId());
}
-
-
@Test
public void testGetGenericVnfs() throws Exception {
@@ -158,8 +157,6 @@ public class AaiCqResponseTest {
}
-
-
@Test
public void testGetDefaultGenericVnf() throws Exception {
@@ -189,7 +186,6 @@ public class AaiCqResponseTest {
LOGGER.info(genVnf.getVnfId());
}
-
@Test
public void testGetGenericVnfByModelInvariantId() throws Exception {
@@ -198,13 +194,13 @@ public class AaiCqResponseTest {
AaiCqResponse aaiCqResponse;
aaiCqResponse = new AaiCqResponse(responseString);
- GenericVnf genVnf = aaiCqResponse.getGenericVnfByModelInvariantId("9a243c47-fd5f-43d1-bd2a-f17bd12a61f2");
+ GenericVnf genVnf =
+ aaiCqResponse.getGenericVnfByModelInvariantId("9a243c47-fd5f-43d1-bd2a-f17bd12a61f2");
assertNotNull(genVnf);
assertEquals("9a243c47-fd5f-43d1-bd2a-f17bd12a61f2", genVnf.getModelInvariantId());
LOGGER.info(genVnf.getModelInvariantId());
}
-
@Test
public void testGetGenericVnfByVfModuleModelInvariantId() throws Exception {
@@ -213,15 +209,13 @@ public class AaiCqResponseTest {
AaiCqResponse aaiCqResponse;
aaiCqResponse = new AaiCqResponse(responseString);
- GenericVnf genVnf =
- aaiCqResponse.getGenericVnfByVfModuleModelInvariantId("e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e");
+ GenericVnf genVnf = aaiCqResponse
+ .getGenericVnfByVfModuleModelInvariantId("e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e");
assertNotNull(genVnf);
assertEquals(ETE_VNF, genVnf.getVnfName());
LOGGER.info(genVnf.getVnfName());
}
-
-
@Test
public void testGetAllVfModules() throws Exception {
@@ -238,7 +232,6 @@ public class AaiCqResponseTest {
}
-
@Test
public void testGetVfModuleByVfModuleName() throws Exception {
@@ -252,7 +245,6 @@ public class AaiCqResponseTest {
assertEquals(ETE_VFMODULE, vfModule.getVfModuleName());
LOGGER.info(vfModule.getVfModuleName());
-
}
@Test
@@ -263,12 +255,12 @@ public class AaiCqResponseTest {
AaiCqResponse aaiCqResponse;
aaiCqResponse = new AaiCqResponse(responseString);
- VfModule vfModule = aaiCqResponse.getVfModuleByVfModelInvariantId("e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e");
+ VfModule vfModule =
+ aaiCqResponse.getVfModuleByVfModelInvariantId("e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e");
assertNotNull(vfModule);
assertEquals(ETE_VFMODULE, vfModule.getVfModuleName());
LOGGER.info(vfModule.getVfModuleName());
-
}
@Test
@@ -324,18 +316,29 @@ public class AaiCqResponseTest {
AaiCqResponse aaiCqResponse;
aaiCqResponse = new AaiCqResponse(responseString);
- ModelVer modelVer = aaiCqResponse.getModelVerByVersionId("189a5070-3bd5-45ac-8a1d-c84ca40b277b");
+ ModelVer modelVer =
+ aaiCqResponse.getModelVerByVersionId("189a5070-3bd5-45ac-8a1d-c84ca40b277b");
assertNotNull(modelVer);
assertEquals("vFWCL_vFWSNK bbefb8ce-2bde", modelVer.getModelName());
LOGGER.info(modelVer.getModelName());
}
+ @Test
+ public void testGetVfModuleCount() throws Exception {
+ String responseString =
+ new String(Files.readAllBytes(new File(CQ_RESPONSE_SAMPLE).toPath()));
+ AaiCqResponse aaiCqResponse;
+ aaiCqResponse = new AaiCqResponse(responseString);
+ int count = aaiCqResponse.getVfModuleCount("47958575-138f-452a-8c8d-d89b595f8164",
+ "e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e", "94b18b1d-cc91-4f43-911a-e6348665f292");
+ assertEquals(1, count);
+ }
/**
- * Aai Cq sample response.
- *
- * @return String return response
+ * Provides sample CQ response.
+ *
+ * @return a CQ response
* @throws Exception file read exception
*/
public String getAaiCqResponse() throws Exception {
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiCqResponse.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiCqResponse.json
deleted file mode 100644
index 63d6f79ac..000000000
--- a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiCqResponse.json
+++ /dev/null
@@ -1,673 +0,0 @@
-{
- "results": [
- {
- "vserver": {
- "vserver-id": "e7f1db09-ff78-44fc-b256-69095c5556fb",
- "vserver-name": "vfw-vm-0201-2",
- "vserver-name2": "vfw-vm-0201-2",
- "prov-status": "ACTIVE",
- "vserver-selflink": "http://ecompctl1.research.att.com:8774/v2/3f2aaef74ecb4b19b35e26d0849fe9a2/servers/e7f1db09-ff78-44fc-b256-69095c5556fb",
- "in-maint": false,
- "is-closed-loop-disabled": false,
- "resource-version": "1549553422524",
- "relationship-list": {
- "relationship": [
- {
- "related-to": "generic-vnf",
- "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/17044ef4-e7f3-46a1-af03-e2aa562f23ac",
- "relationship-data": [
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "17044ef4-e7f3-46a1-af03-e2aa562f23ac"
- }
- ],
- "related-to-property": [
- {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "TestVM-Vnf-0201-1"
- }
- ]
- },
- {
- "related-to": "vnfc",
- "related-link": "/aai/v11/network/vnfcs/vnfc/vfw",
- "relationship-data": [
- {
- "relationship-key": "vnfc.vnfc-name",
- "relationship-value": "vfw"
- }
- ]
- },
- {
- "related-to": "vf-module",
- "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/17044ef4-e7f3-46a1-af03-e2aa562f23ac/vf-modules/vf-module/33f9e03d-2fbd-4e9c-8e73-ce6b12f0b3d2",
- "relationship-data": [
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "17044ef4-e7f3-46a1-af03-e2aa562f23ac"
- },
- {
- "relationship-key": "vf-module.vf-module-id",
- "relationship-value": "33f9e03d-2fbd-4e9c-8e73-ce6b12f0b3d2"
- }
- ]
- },
- {
- "related-to": "flavor",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/2",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "flavor.flavor-id",
- "relationship-value": "2"
- }
- ],
- "related-to-property": [
- {
- "property-key": "flavor.flavor-name",
- "property-value": "m1.small"
- }
- ]
- },
- {
- "related-to": "image",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/84be7136-301f-4f47-9585-3a2e0f9534af",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "image.image-id",
- "relationship-value": "84be7136-301f-4f47-9585-3a2e0f9534af"
- }
- ],
- "related-to-property": [
- {
- "property-key": "image.image-name",
- "property-value": "unknown"
- }
- ]
- }
- ]
- }
- }
- },
- {
- "generic-vnf": {
- "vnf-id": "7b202620-2936-4b0d-b09c-60b411f10f64",
- "vnf-name": "vLoadBalancerMS-Vnf-0211-1",
- "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0",
- "prov-status": "ACTIVE",
- "equipment-role": "vLB",
- "orchestration-status": "Active",
- "ipv4-oam-address": "10.0.150.1",
- "in-maint": true,
- "is-closed-loop-disabled": false,
- "resource-version": "1552311656338",
- "model-invariant-id": "724ab1cf-6120-49e8-b909-849963bed1d6",
- "model-version-id": "9d5944d8-2267-4799-824a-0f824e9a978d",
- "model-customization-id": "efcd576d-a05e-4798-bb68-79e7d9c80f4c",
- "nf-type": "ONAP-LOADBALANCER",
- "nf-function": "LOADBALANCER",
- "nf-role": "vLB",
- "nf-naming-code": "vlb",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/101b8fc1-1796-4db1-a4e7-fe39c6a51558/service-data/vnfs/vnf/7b202620-2936-4b0d-b09c-60b411f10f64/vnf-data/vnf-topology/",
- "relationship-list": {
- "relationship": [
- {
- "related-to": "service-instance",
- "related-link": "/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vLB/service-instances/service-instance/101b8fc1-1796-4db1-a4e7-fe39c6a51558",
- "relationship-data": [
- {
- "relationship-key": "customer.global-customer-id",
- "relationship-value": "Demonstration"
- },
- {
- "relationship-key": "service-subscription.service-type",
- "relationship-value": "vLB"
- },
- {
- "relationship-key": "service-instance.service-instance-id",
- "relationship-value": "101b8fc1-1796-4db1-a4e7-fe39c6a51558"
- }
- ],
- "related-to-property": [
- {
- "property-key": "service-instance.service-instance-name",
- "property-value": "vLoadBalancerMS-0211-1"
- }
- ]
- },
- {
- "related-to": "platform",
- "related-link": "/aai/v11/business/platforms/platform/Test-Platform",
- "relationship-data": [
- {
- "relationship-key": "platform.platform-name",
- "relationship-value": "Test-Platform"
- }
- ]
- },
- {
- "related-to": "line-of-business",
- "related-link": "/aai/v11/business/lines-of-business/line-of-business/Test-Business",
- "relationship-data": [
- {
- "relationship-key": "line-of-business.line-of-business-name",
- "relationship-value": "Test-Business"
- }
- ]
- },
- {
- "related-to": "vserver",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/58ca8df0-17b8-4aa2-8766-9c6c1a12cec8",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "3f2aaef74ecb4b19b35e26d0849fe9a2"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "58ca8df0-17b8-4aa2-8766-9c6c1a12cec8"
- }
- ],
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vdns-ms-0211-1"
- }
- ]
- },
- {
- "related-to": "vserver",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/6c3b3714-e36c-45af-9f16-7d3a73d99497",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "3f2aaef74ecb4b19b35e26d0849fe9a2"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "6c3b3714-e36c-45af-9f16-7d3a73d99497"
- }
- ],
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vlb-ms-0211-1"
- }
- ]
- },
- {
- "related-to": "availability-zone",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/nova",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "availability-zone.availability-zone-name",
- "relationship-value": "nova"
- }
- ]
- }
- ]
- },
- "vf-modules": {
- "vf-module": [
- {
- "vf-module-id": "e46c6636-9ce5-4b77-bb1b-455ce9edc892",
- "vf-module-name": "vLoadBalancerMS-0211-1",
- "heat-stack-id": "vLoadBalancerMS-0211-1/73360253-2dfe-46f6-bcd6-8662a81238ea",
- "orchestration-status": "Active",
- "is-base-vf-module": true,
- "resource-version": "1552311559802",
- "model-invariant-id": "d263fc6d-cfce-4e20-8337-e06f48b474e6",
- "model-version-id": "24c0aa10-3979-402c-ad98-20124751b551",
- "model-customization-id": "65382eb1-db84-466c-b9d7-4e0f1ba7105f",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/101b8fc1-1796-4db1-a4e7-fe39c6a51558/service-data/vnfs/vnf/7b202620-2936-4b0d-b09c-60b411f10f64/vnf-data/vf-modules/vf-module/e46c6636-9ce5-4b77-bb1b-455ce9edc892/vf-module-data/vf-module-topology/",
- "relationship-list": {
- "relationship": [
- {
- "related-to": "vserver",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/58ca8df0-17b8-4aa2-8766-9c6c1a12cec8",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "3f2aaef74ecb4b19b35e26d0849fe9a2"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "58ca8df0-17b8-4aa2-8766-9c6c1a12cec8"
- }
- ],
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vdns-ms-0211-1"
- }
- ]
- },
- {
- "related-to": "vserver",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/6c3b3714-e36c-45af-9f16-7d3a73d99497",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "3f2aaef74ecb4b19b35e26d0849fe9a2"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "6c3b3714-e36c-45af-9f16-7d3a73d99497"
- }
- ],
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vlb-ms-0211-1"
- }
- ]
- }
- ]
- }
- }
- ]
- }
- }
- },
- {
- "service-instance": {
- "service-instance-id": "101b8fc1-1796-4db1-a4e7-fe39c6a51558",
- "service-instance-name": "vLoadBalancerMS-0211-1",
- "environment-context": "General_Revenue-Bearing",
- "workload-context": "Production",
- "model-invariant-id": "1008a768-1b67-407e-88c6-58c82b34ef42",
- "model-version-id": "81f8c1cd-f664-4450-b3a4-be645613ab32",
- "resource-version": "1552311350334",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/101b8fc1-1796-4db1-a4e7-fe39c6a51558/service-data/service-topology/",
- "orchestration-status": "Active",
- "relationship-list": {
- "relationship": [
- {
- "related-to": "project",
- "related-link": "/aai/v11/business/projects/project/Test-Project",
- "relationship-data": [
- {
- "relationship-key": "project.project-name",
- "relationship-value": "Test-Project"
- }
- ]
- },
- {
- "related-to": "generic-vnf",
- "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/7b202620-2936-4b0d-b09c-60b411f10f64",
- "relationship-data": [
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "7b202620-2936-4b0d-b09c-60b411f10f64"
- }
- ],
- "related-to-property": [
- {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "vLoadBalancerMS-Vnf-0211-1"
- }
- ]
- },
- {
- "related-to": "owning-entity",
- "related-link": "/aai/v11/business/owning-entities/owning-entity/bb94a687-4f3b-40a3-914e-e98037d5ebd2",
- "relationship-data": [
- {
- "relationship-key": "owning-entity.owning-entity-id",
- "relationship-value": "bb94a687-4f3b-40a3-914e-e98037d5ebd2"
- }
- ]
- }
- ]
- }
- }
- },
- {
- "generic-vnf": {
- "vnf-id": "17044ef4-e7f3-46a1-af03-e2aa562f23ac",
- "vnf-name": "TestVM-Vnf-0201-1",
- "vnf-type": "TestVM/TestVM 0",
- "prov-status": "ACTIVE",
- "equipment-role": "",
- "orchestration-status": "Active",
- "ipv4-oam-address": "10.0.70.1",
- "in-maint": true,
- "is-closed-loop-disabled": false,
- "resource-version": "1549041636264",
- "model-invariant-id": "6a4d7971-0778-4655-9eab-9d6031c7ad57",
- "model-version-id": "fb6c673c-e5b6-4e0a-9baf-5e0089784de9",
- "model-customization-id": "706a3100-dbe5-442e-86c3-c7b823abbec2",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/d41f8217-d464-4458-bf0a-fba33a0f1b31/service-data/vnfs/vnf/17044ef4-e7f3-46a1-af03-e2aa562f23ac/vnf-data/vnf-topology/",
- "relationship-list": {
- "relationship": [
- {
- "related-to": "service-instance",
- "related-link": "/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/d41f8217-d464-4458-bf0a-fba33a0f1b31",
- "relationship-data": [
- {
- "relationship-key": "customer.global-customer-id",
- "relationship-value": "Demonstration"
- },
- {
- "relationship-key": "service-subscription.service-type",
- "relationship-value": "vFW"
- },
- {
- "relationship-key": "service-instance.service-instance-id",
- "relationship-value": "d41f8217-d464-4458-bf0a-fba33a0f1b31"
- }
- ],
- "related-to-property": [
- {
- "property-key": "service-instance.service-instance-name",
- "property-value": "TestVM-Service-0201-1"
- }
- ]
- },
- {
- "related-to": "platform",
- "related-link": "/aai/v11/business/platforms/platform/Test-Platform",
- "relationship-data": [
- {
- "relationship-key": "platform.platform-name",
- "relationship-value": "Test-Platform"
- }
- ]
- },
- {
- "related-to": "line-of-business",
- "related-link": "/aai/v11/business/lines-of-business/line-of-business/Test-Business",
- "relationship-data": [
- {
- "relationship-key": "line-of-business.line-of-business-name",
- "relationship-value": "Test-Business"
- }
- ]
- },
- {
- "related-to": "vserver",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/e7f1db09-ff78-44fc-b256-69095c5556fb",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "3f2aaef74ecb4b19b35e26d0849fe9a2"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "e7f1db09-ff78-44fc-b256-69095c5556fb"
- }
- ],
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vfw-vm-0201-2"
- }
- ]
- },
- {
- "related-to": "availability-zone",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionTwo/availability-zones/availability-zone/zone-1",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionTwo"
- },
- {
- "relationship-key": "availability-zone.availability-zone-name",
- "relationship-value": "zone-1"
- }
- ]
- }
- ]
- },
- "vf-modules": {
- "vf-module": [
- {
- "vf-module-id": "0afde97a-3e3f-4597-aec3-e5488c0f20b7",
- "vf-module-name": "TestVM-0201-1",
- "heat-stack-id": "TestVM-0201-1/aee4d7e5-b4a0-4261-b3cf-bb23348a3d99",
- "orchestration-status": "Active",
- "is-base-vf-module": true,
- "resource-version": "1549039401119",
- "model-invariant-id": "6af68fdb-6479-43e2-8989-938f06c994bd",
- "model-version-id": "16d1834e-d834-431f-b064-98c469c6505d",
- "model-customization-id": "29ffb122-22c8-48d2-b152-b52d9e81e910",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/d41f8217-d464-4458-bf0a-fba33a0f1b31/service-data/vnfs/vnf/17044ef4-e7f3-46a1-af03-e2aa562f23ac/vnf-data/vf-modules/vf-module/0afde97a-3e3f-4597-aec3-e5488c0f20b7/vf-module-data/vf-module-topology/"
- },
- {
- "vf-module-id": "33f9e03d-2fbd-4e9c-8e73-ce6b12f0b3d2",
- "vf-module-name": "TestVM-0201-2",
- "heat-stack-id": "TestVM-0201-2/1b9db6b8-620b-46f1-935a-8a61c294a98b",
- "orchestration-status": "Active",
- "is-base-vf-module": true,
- "resource-version": "1549041447373",
- "model-invariant-id": "6af68fdb-6479-43e2-8989-938f06c994bd",
- "model-version-id": "16d1834e-d834-431f-b064-98c469c6505d",
- "model-customization-id": "29ffb122-22c8-48d2-b152-b52d9e81e910",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/d41f8217-d464-4458-bf0a-fba33a0f1b31/service-data/vnfs/vnf/17044ef4-e7f3-46a1-af03-e2aa562f23ac/vnf-data/vf-modules/vf-module/33f9e03d-2fbd-4e9c-8e73-ce6b12f0b3d2/vf-module-data/vf-module-topology/",
- "relationship-list": {
- "relationship": [
- {
- "related-to": "vserver",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/e7f1db09-ff78-44fc-b256-69095c5556fb",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "3f2aaef74ecb4b19b35e26d0849fe9a2"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "e7f1db09-ff78-44fc-b256-69095c5556fb"
- }
- ],
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vfw-vm-0201-2"
- }
- ]
- }
- ]
- }
- }
- ]
- }
- }
- },
- {
- "vf-module": {
- "vf-module-id": "0afde97a-3e3f-4597-aec3-e5488c0f20b7",
- "vf-module-name": "TestVM-0201-1",
- "heat-stack-id": "TestVM-0201-1/aee4d7e5-b4a0-4261-b3cf-bb23348a3d99",
- "orchestration-status": "Active",
- "is-base-vf-module": true,
- "resource-version": "1549039401119",
- "model-invariant-id": "6af68fdb-6479-43e2-8989-938f06c994bd",
- "model-version-id": "16d1834e-d834-431f-b064-98c469c6505d",
- "model-customization-id": "29ffb122-22c8-48d2-b152-b52d9e81e910",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/d41f8217-d464-4458-bf0a-fba33a0f1b31/service-data/vnfs/vnf/17044ef4-e7f3-46a1-af03-e2aa562f23ac/vnf-data/vf-modules/vf-module/0afde97a-3e3f-4597-aec3-e5488c0f20b7/vf-module-data/vf-module-topology/"
- }
- },
- {
- "vf-module": {
- "vf-module-id": "33f9e03d-2fbd-4e9c-8e73-ce6b12f0b3d2",
- "vf-module-name": "TestVM-0201-2",
- "heat-stack-id": "TestVM-0201-2/1b9db6b8-620b-46f1-935a-8a61c294a98b",
- "orchestration-status": "Active",
- "is-base-vf-module": true,
- "resource-version": "1549041447373",
- "model-invariant-id": "6af68fdb-6479-43e2-8989-938f06c994bd",
- "model-version-id": "16d1834e-d834-431f-b064-98c469c6505d",
- "model-customization-id": "29ffb122-22c8-48d2-b152-b52d9e81e910",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/d41f8217-d464-4458-bf0a-fba33a0f1b31/service-data/vnfs/vnf/17044ef4-e7f3-46a1-af03-e2aa562f23ac/vnf-data/vf-modules/vf-module/33f9e03d-2fbd-4e9c-8e73-ce6b12f0b3d2/vf-module-data/vf-module-topology/",
- "relationship-list": {
- "relationship": [
- {
- "related-to": "vserver",
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/e7f1db09-ff78-44fc-b256-69095c5556fb",
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "3f2aaef74ecb4b19b35e26d0849fe9a2"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "e7f1db09-ff78-44fc-b256-69095c5556fb"
- }
- ],
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vfw-vm-0201-2"
- }
- ]
- }
- ]
- }
- }
- },
- {
- "tenant": {
- "tenant-id": "tenant1-16197-as988q",
- "tenant-name": "tenant-name-16197-as988q",
- "resource-version": "1550769793637",
- "vservers": {
- "vserver": [
- {
- "vserver-id": "vserver1-16197-as988q",
- "vserver-name": "vserverName",
- "vserver-name2": "vserverTE-name2-as988q",
- "prov-status": "ACTIVE",
- "vserver-selflink": "TRINITY vserverLink",
- "in-maint": false,
- "is-closed-loop-disabled": false,
- "resource-version": "1550769794551",
- "relationship-list": {
- "relationship": [
- {
- "related-to": "generic-vnf",
- "relationship-label": "tosca.relationships.HostedOn",
- "related-link": "/aai/v16/network/generic-vnfs/generic-vnf/VNF1-16197-as988q",
- "relationship-data": [
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "VNF1-16197-as988q"
- }
- ],
- "related-to-property": [
- {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "vnf1Name"
- }
- ]
- }
- ]
- }
- }
- ]
- }
- }
- },
- {
- "cloud-region": {
- "cloud-owner": "co-16197-01-as988q",
- "cloud-region-id": "cr-16197-01-as988q",
- "resource-version": "1550769792672",
- "orchestration-disabled": false,
- "in-maint": false,
- "tenants": {
- "tenant": [
- {
- "tenant-id": "tenant1-16197-as988q",
- "tenant-name": "tenant-name-16197-as988q",
- "resource-version": "1550769793637"
- }
- ]
- }
- }
- }
- ]
-}