aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTait,Trevor(rt0435) <rtait@amdocs.com>2018-08-17 14:05:30 -0400
committerTait,Trevor(rt0435) <rtait@amdocs.com>2018-08-17 14:34:13 -0400
commita6bb3bf3afa5a36096ed4ae7c8a15b035b94aa21 (patch)
tree397144113946a3ab75db1817d7c29f497c896956
parent92a058213a7ff50520e7ba5d388df46d30cb2ebd (diff)
Make Resources configurable
Issue-ID: LOG-401 Change-Id: Iba325509cea2405a9e2ca2fd190bde58f9a0c054 Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
-rw-r--r--config/application.properties2
-rw-r--r--config/networkdiscoveryspec.json25
-rw-r--r--pom.xml15
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/NdctxbConfiguration.java102
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java236
-rw-r--r--src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/test/NetworkDiscoveryRspInfoTest.java1
-rw-r--r--src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/unittest/service/NetworkDiscoveryContextBuilderTest.java11
-rw-r--r--src/test/resources/SD_response.json1346
8 files changed, 726 insertions, 1012 deletions
diff --git a/config/application.properties b/config/application.properties
index d731df3..556c240 100644
--- a/config/application.properties
+++ b/config/application.properties
@@ -18,9 +18,11 @@ server.tomcat.max-idle-time=60000
# Network Discovery Context Builder REST Service
networkDiscoveryCtxBuilder.httpProtocol=http
+networkDiscoveryCtxBuilder.port=8080
# Basic Authorization credentials for Network Discovery Context Builder REST Service
networkDiscoveryCtxBuilder.userId=admin
networkDiscoveryCtxBuilder.password=OBF:1u2a1toa1w8v1tok1u30
+networkDiscoveryCtxBuilder.resourceList=vnfcs,vservers,l3-networks
# Service Decomposition REST Client Configuration
serviceDecomposition.httpProtocol=http
diff --git a/config/networkdiscoveryspec.json b/config/networkdiscoveryspec.json
new file mode 100644
index 0000000..093b81e
--- /dev/null
+++ b/config/networkdiscoveryspec.json
@@ -0,0 +1,25 @@
+[
+ {
+ "operation": "shift",
+ "spec": {
+ "service-instance-name": "service-instance-name",
+ "uuid": "uuid",
+ "service-instance-id": "service-instance-id",
+ "model-invariant-id": "model-invariant-id",
+ "generic-vnfs": {
+ "*": {
+ "vservers": {
+ "*": {
+ "vserver-id": "generic-vnfs[&3].vservers[&1].uuid"
+ }
+ },
+ "l3-networks": {
+ "*": {
+ "network-id": "generic-vnfs[&3].l3-networks[&1].uuid"
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
diff --git a/pom.xml b/pom.xml
index d144886..5df5872 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,14 +121,19 @@ limitations under the License.
<artifactId>jersey-client</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.aai</groupId>
- <artifactId>rest-client</artifactId>
- <version>1.2.2-SNAPSHOT</version>
- </dependency>
- <dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.bazaarvoice.jolt</groupId>
+ <artifactId>jolt-core</artifactId>
+ <version>0.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.bazaarvoice.jolt</groupId>
+ <artifactId>json-utils</artifactId>
+ <version>0.1.0</version>
+ </dependency>
<!-- Test dependencies -->
<dependency>
diff --git a/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/NdctxbConfiguration.java b/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/NdctxbConfiguration.java
index fa4d95f..ec5fb8d 100644
--- a/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/NdctxbConfiguration.java
+++ b/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/NdctxbConfiguration.java
@@ -20,7 +20,6 @@ package org.onap.pomba.contextbuilder.networkdiscovery;
import java.net.InetAddress;
import java.util.Base64;
-
import org.eclipse.jetty.util.security.Password;
import org.onap.pomba.contextbuilder.networkdiscovery.exception.DiscoveryException;
import org.slf4j.Logger;
@@ -33,7 +32,13 @@ import org.springframework.stereotype.Component;
public class NdctxbConfiguration {
private static Logger log = LoggerFactory.getLogger(NdctxbConfiguration.class);
- // Network Discover Configuration values
+ // Network Discovery Context Builder Configuration values
+
+ @Value("${networkDiscoveryCtxBuilder.httpProtocol}")
+ private String httpNetworkDiscoveryCtxBuilderProtocol;
+
+ @Value("${networkDiscoveryCtxBuilder.port}")
+ private String networkDiscoveryCtxBuilderPort;
@Value("${networkDiscoveryCtxBuilder.userId:admin}")
private String networkDiscoveryCtxBuilderUserId;
@@ -41,6 +46,10 @@ public class NdctxbConfiguration {
@Value("${networkDiscoveryCtxBuilder.password:OBF:1u2a1toa1w8v1tok1u30}")
private String networkDiscoveryCtxBuilderPassword;
+ @Value("${networkDiscoveryCtxBuilder.resourceList:vnfcs}")
+ private String networkDiscoveryCtxBuilderResourceList;
+
+
// Service Decomposition Configuration values
@Value("${serviceDecomposition.host:127.0.0.1}")
@@ -61,6 +70,30 @@ public class NdctxbConfiguration {
@Value("${serviceDecomposition.password:OBF:1u2a1toa1w8v1tok1u30}")
private String serviceDecompositionPassword;
+ // Network Discovery Micro Service Configuration values
+
+ @Value("${networkDiscoveryMicroService.host}")
+ private String networkDiscoveryMicroServiceHost;
+
+ @Value("${networkDiscoveryMicroService.port}")
+ private String networkDiscoveryMicroServicePort;
+
+ @Value("${networkDiscoveryMicroService.httpProtocol}")
+ private String httpNetworkDiscoveryMicroServiceProtocol;
+
+ @Value("${networkDiscoveryMicroService.networkDiscoveryPath}")
+ private String networkDiscoveryMicroServicePath;
+
+ @Value("${networkDiscoveryMicroService.responseTimeOutInMilliseconds}")
+ private String networkDiscoveryResponseTimeOutInMilliseconds;
+
+ @Value("${networkDiscoveryMicroService.userId:admin}")
+ private String networkDiscoveryMicroServiceUserId;
+
+ @Value("${networkDiscoveryMicroService.password:OBF:1u2a1toa1w8v1tok1u30}")
+ private String networkDiscoveryMicroServicePassword;
+
+
@Bean(name = "serviceDecompositionBaseUrl")
public String getURL() {
String url = this.serviceDecompositionHttpProtocol + "://" + this.serviceDecompositionHost + ":"
@@ -81,21 +114,26 @@ public class NdctxbConfiguration {
return ("Basic " + Base64.getEncoder().encodeToString(auth.getBytes()));
}
- /* Network Discovery related */
- @Value("${networkDiscoveryMicroService.host}")
- private String networkDiscoveryMicroServiceHost;
-
- @Value("${networkDiscoveryMicroService.port}")
- private String networkDiscoveryMicroServicePort;
+ @Bean(name = "networkDiscoveryCtxBuilderBaseUrl")
+ public String getNetworkDiscoveryCtxBuilderBaseUrl() throws DiscoveryException {
+ String url = null;
+ try {
+ String localIp = InetAddress.getLocalHost().getHostAddress();
+ url = this.httpNetworkDiscoveryCtxBuilderProtocol + "://" + localIp + ":"
+ + this.networkDiscoveryCtxBuilderPort;
+ } catch (Exception e) {
+ log.error("Unable to obtain localIp: " + e.getMessage());
+ throw new DiscoveryException(e.getMessage(), e);
+ }
- @Value("${networkDiscoveryMicroService.httpProtocol}")
- private String httpNetworkDiscoveryMicroServiceProtocol;
+ return url;
+ }
- @Value("${networkDiscoveryMicroService.networkDiscoveryPath}")
- private String networkDiscoveryMicroServicePath;
+ @Bean(name = "networkDiscoveryCtxBuilderResources")
+ public String getNetworkDiscoveryCtxBuilderResourcs() {
+ return this.networkDiscoveryCtxBuilderResourceList;
+ }
- @Value("${networkDiscoveryMicroService.responseTimeOutInMilliseconds}")
- private String networkDiscoveryResponseTimeOutInMilliseconds;
@Bean(name = "networkDiscoveryMicroServiceBaseUrl")
public String getNetworkDiscoveryURL() {
@@ -104,7 +142,7 @@ public class NdctxbConfiguration {
return url;
}
- @Bean(name = "ndResponseTimeOutInMilliseconds")
+ @Bean(name = "networkDiscoveryResponseTimeOutInMilliseconds")
public long getNdResponseTimeOutInMilliseconds() {
long timeoutV = Integer.parseUnsignedInt(this.networkDiscoveryResponseTimeOutInMilliseconds);
return timeoutV;
@@ -116,40 +154,6 @@ public class NdctxbConfiguration {
return hostNPort;
}
- /* Network Discovery Context Builder related */
- @Value("${server.port:8080}")
- private int networkDiscoveryCtxBuilderPort;
-
- @Value("${networkDiscoveryCtxBuilder.httpProtocol}")
- private String httpNetworkDiscoveryCtxBuilderProtocol;
-
- @Bean(name = "networkDiscoveryCtxBuilderPort")
- public String getNetworkDiscoveryCtxBuilderPort() {
- return Integer.toString(networkDiscoveryCtxBuilderPort);
- }
-
- @Bean(name = "networkDiscoveryCtxBuilderBaseUrl")
- public String getNetworkDiscoveryCtxBuilderBaseUrl() throws DiscoveryException {
- String url = null;
- try {
- String localIp = InetAddress.getLocalHost().getHostAddress();
- url = this.httpNetworkDiscoveryCtxBuilderProtocol + "://" + localIp + ":"
- + getNetworkDiscoveryCtxBuilderPort();
- } catch (Exception e) {
- log.error("Unable to obtain localIp: " + e.getMessage());
- throw new DiscoveryException(e.getMessage(), e);
- }
-
- return url;
- }
-
- // Network Discovery Configuration values
- @Value("${networkDiscoveryMicroService.userId:admin}")
- private String networkDiscoveryMicroServiceUserId;
-
- @Value("${networkDiscoveryMicroService.password:OBF:1u2a1toa1w8v1tok1u30}")
- private String networkDiscoveryMicroServicePassword;
-
@Bean(name = "networkDiscoveryMicroServiceBasicAuthorization")
public String getNetworkDiscoveryMicroServiceBasicAuth() {
String auth = this.networkDiscoveryMicroServiceUserId + ":"
diff --git a/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java b/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java
index 77f3686..d73cfa6 100644
--- a/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java
+++ b/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java
@@ -17,6 +17,8 @@
*/
package org.onap.pomba.contextbuilder.networkdiscovery.service;
+import com.bazaarvoice.jolt.Chainr;
+import com.bazaarvoice.jolt.JsonUtils;
import java.net.InetAddress;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -29,20 +31,14 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.ReentrantLock;
-
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.client.Client;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-
import org.json.JSONArray;
import org.json.JSONObject;
import org.onap.pomba.common.datatypes.ModelContext;
-import org.onap.pomba.common.datatypes.Service;
-import org.onap.pomba.common.datatypes.VF;
-import org.onap.pomba.common.datatypes.VFModule;
-import org.onap.pomba.common.datatypes.VNFC;
import org.onap.pomba.contextbuilder.networkdiscovery.exception.DiscoveryException;
import org.onap.pomba.contextbuilder.networkdiscovery.model.NetworkDiscoveryRspInfo;
import org.onap.pomba.contextbuilder.networkdiscovery.service.rs.RestService;
@@ -102,28 +98,32 @@ public class SpringServiceImpl implements SpringService {
public static final String MDC_FROM_NETWORK_DISCOVERY_MICRO_SERVICE_STATUS_SUCCESS = "SUCCESS";
private static final String ENTITY_GENERIC_VNFS = "generic-vnfs";
- private static final String ENTITY_L3_NETWORK = "l3-network";
- private static final String ENTITY_L3_NETWORKS = "l3-networks";
- private static final String ENTITY_MODEL_INVARIANT_ID = "model-invariant-id";
- private static final String ENTITY_NETWORK_ID = "network-id";
- private static final String ENTITY_NETWORK_NAME = "network-name";
- private static final String ENTITY_SERVICE_INSTANCE_ID = "service-instance-id";
- private static final String ENTITY_SERVICE_INSTANCE_NAME = "service-instance-name";
- private static final String ENTITY_VF_MODULE = "vf-module";
- private static final String ENTITY_VF_MODULES = "vf-modules";
- private static final String ENTITY_VF_MODULE_ID = "vf-module-id";
- private static final String ENTITY_VNF_ID = "vnf-id";
- private static final String ENTITY_VNF_NAME = "vnf-name";
- private static final String ENTITY_VNF_TYPE = "vnf-type";
- private static final String ENTITY_VSERVER = "vserver";
- private static final String ENTITY_VSERVERS = "vservers";
- private static final String ENTITY_VSERVER_NAME = "vserver-name";
- private static final String ENTITY_VSERVER_ID = "vserver-id";
+ private static final String ENTITY_UUID = "uuid";
private static UUID instanceUUID = UUID.randomUUID();
private static Map<String, NetworkDiscoveryRspInfo> networkDiscoveryInfoList = new HashMap<>();
private static final AtomicLong uniqueSeq = new AtomicLong();
+ private class Resource {
+
+ private String resourceType;
+ private String resourceId;
+
+ public String getResourceType() {
+ return this.resourceType;
+ }
+ public void setResourceType(String resourceType) {
+ this.resourceType = resourceType;
+ }
+ public String getResourceId() {
+ return this.resourceId;
+ }
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+ }
+
+
@Autowired
private String serviceDecompositionBaseUrl;
@@ -134,6 +134,9 @@ public class SpringServiceImpl implements SpringService {
private String networkDiscoveryCtxBuilderBasicAuthorization;
@Autowired
+ private String networkDiscoveryCtxBuilderResources;
+
+ @Autowired
private String serviceDecompositionBasicAuthorization;
@Autowired
@@ -143,7 +146,7 @@ public class SpringServiceImpl implements SpringService {
private String networkDiscoveryCtxBuilderBaseUrl;
@Autowired
- private long ndResponseTimeOutInMilliseconds;
+ private long networkDiscoveryResponseTimeOutInMilliseconds;
@Autowired
private String networkDiscoveryMicroServiceHostAndPort;
@@ -164,22 +167,23 @@ public class SpringServiceImpl implements SpringService {
RestUtil.validateServiceInstanceId(serviceInstanceId);
RestUtil.validatePartnerName(partnerName);
validateBasicAuth(authorization);
- ModelContext serviceDecompCtx = getServiceDeomposition(serviceInstanceId, partnerName, requestId);
+ ModelContext serviceDecompCtx = new ModelContext();
+ List<Resource> resourceList = getServiceDeomposition(serviceInstanceId, partnerName, requestId);
- CountDownLatch latchSignal = createCountDownLatch(serviceDecompCtx);
+ CountDownLatch latchSignal = createCountDownLatch(resourceList);
if (latchSignal == null) {
// Nothing to send
return serviceDecompCtx;
}
- List<String> sentRequestIdList = sendNetworkDiscoveryRequest(serviceDecompCtx, serviceInstanceId,
+ List<String> sentRequestIdList = sendNetworkDiscoveryRequest(resourceList, serviceInstanceId, requestId,
partnerName, latchSignal);
int numOfMsgSent = sentRequestIdList.size();
if ((numOfMsgSent > 0) && (latchSignal != null)) {
// The main task waits for four threads
- if (false == latchSignal.await(ndResponseTimeOutInMilliseconds, TimeUnit.MILLISECONDS)) {
+ if (false == latchSignal.await(networkDiscoveryResponseTimeOutInMilliseconds, TimeUnit.MILLISECONDS)) {
// When it comes here, it is due to time out.
log.info("Wait for Latch Signal time out " + serviceInstanceId);
}
@@ -222,7 +226,7 @@ public class SpringServiceImpl implements SpringService {
/**
* Given a service instance ID, GET the resources from Service Decompostion.
*/
- private ModelContext getServiceDeomposition(String serviceInstanceId, String partnerName, String requestId)
+ private List<Resource> getServiceDeomposition(String serviceInstanceId, String partnerName, String requestId)
throws DiscoveryException {
if (serviceInstanceId == null) {
return null;
@@ -238,7 +242,6 @@ public class SpringServiceImpl implements SpringService {
.header("X-ONAP-RequestID", requestId).get();
String reply = null;
- JSONObject jObject = null;
if (response.getStatus() != 200) {
MDC.put(MDC_RESPONSE_CODE, String.valueOf(response.getStatus()));
MDC.put(MDC_STATUS_CODE, "ERROR");
@@ -251,9 +254,15 @@ public class SpringServiceImpl implements SpringService {
log.info("GET Response from ServiceDecompositionMircoService GetContext for serviceInstanceId:"
+ serviceInstanceId + ", message body: " + reply);
- jObject = new JSONObject(reply);
}
- return parseServiceDecomposition(jObject);
+
+ List<Object> jsonSpec = JsonUtils.filepathToList("config/networkdiscoveryspec.json");
+ Object jsonInput = JsonUtils.jsonToObject(reply);
+ Chainr chainr = Chainr.fromSpec(jsonSpec);
+ Object transObject = chainr.transform(jsonInput);
+ System.out.println(JsonUtils.toPrettyJsonString(transObject));
+ JSONObject transJobject = new JSONObject(JsonUtils.toPrettyJsonString(transObject));
+ return parseServiceDecomposition(transJobject);
} catch (Exception x) {
throw new DiscoveryException(x.getMessage(), x);
}
@@ -268,108 +277,30 @@ public class SpringServiceImpl implements SpringService {
return serviceDecompositionBasicAuthorization;
}
- private ModelContext parseServiceDecomposition(JSONObject jObject) {
-
- ModelContext response = new ModelContext();
- // Get Service Instance Data
- Service service = new Service();
-
- if (jObject.has(ENTITY_SERVICE_INSTANCE_NAME)) {
- service.setName(jObject.getString(ENTITY_SERVICE_INSTANCE_NAME));
- }
-
- if (jObject.has(ENTITY_SERVICE_INSTANCE_ID)) {
- service.setUuid(jObject.getString(ENTITY_SERVICE_INSTANCE_ID));
- }
-
- if (jObject.has(ENTITY_MODEL_INVARIANT_ID)) {
- service.setInvariantUuid(jObject.getString(ENTITY_MODEL_INVARIANT_ID));
- }
-
- response.setService(service);
+ private List<Resource> parseServiceDecomposition(JSONObject jObject) {
+ List<Resource> response = new ArrayList<Resource>();
// Find generic-vnfs
if (jObject.has(ENTITY_GENERIC_VNFS)) {
JSONArray genericVnfs = jObject.getJSONArray(ENTITY_GENERIC_VNFS);
for (int i = 0; i < genericVnfs.length(); i++) {
- VF vf = new VF();
JSONObject genericVnfInst = genericVnfs.getJSONObject(i);
-
- if (genericVnfInst.has(ENTITY_VNF_NAME)) {
- vf.setName(genericVnfInst.getString(ENTITY_VNF_NAME));
- }
- if (genericVnfInst.has(ENTITY_VNF_TYPE)) {
- vf.setType(genericVnfInst.getString(ENTITY_VNF_TYPE));
- }
- if (genericVnfInst.has(ENTITY_VNF_ID)) {
- vf.setUuid(genericVnfInst.getString(ENTITY_VNF_ID));
- }
-
- if (genericVnfInst.has(ENTITY_MODEL_INVARIANT_ID)) {
- vf.setInvariantUuid(genericVnfInst.getString(ENTITY_MODEL_INVARIANT_ID));
- }
-
- // find vf-modules
- if (genericVnfInst.has(ENTITY_VF_MODULES)) {
- JSONObject vfModules = genericVnfInst.getJSONObject(ENTITY_VF_MODULES);
- if (vfModules.has(ENTITY_VF_MODULE)) {
- JSONArray vfModuleList = vfModules.getJSONArray(ENTITY_VF_MODULE);
- for (int j = 0; j < vfModuleList.length(); j++) {
- VFModule vfModule = new VFModule();
- JSONObject vfModuleInst = vfModuleList.getJSONObject(j);
- if (vfModuleInst.has(ENTITY_VF_MODULE_ID)) {
- vfModule.setUuid(vfModuleInst.getString(ENTITY_VF_MODULE_ID));
+ // Find resources
+ String[] resources = networkDiscoveryCtxBuilderResources.split(",");
+ for (int j = 0; j< resources.length; j++) {
+ if (genericVnfInst.has(resources[j])) {
+ JSONArray resourceList = genericVnfInst.getJSONArray(resources[j]);
+ for (int k = 0; k < resourceList.length(); k++) {
+ Resource resource = new Resource();
+ JSONObject resourceInst = resourceList.getJSONObject(k);
+ if (resourceInst.has(ENTITY_UUID)) {
+ resource.setResourceId(resourceInst.getString(ENTITY_UUID));
}
- if (vfModuleInst.has(ENTITY_MODEL_INVARIANT_ID)) {
- vfModule.setInvariantUuid(vfModuleInst.getString(ENTITY_MODEL_INVARIANT_ID));
- }
- vf.addVfModule(vfModule);
- }
- }
- }
-
- // Find vservers
- if (genericVnfInst.has(ENTITY_VSERVERS)) {
- JSONArray vservers = genericVnfInst.getJSONArray(ENTITY_VSERVERS);
- for (int j = 0; j < vservers.length(); j++) {
- VNFC vserver = new VNFC();
- JSONObject vserversInst = vservers.getJSONObject(j);
- if (vserversInst.has(ENTITY_VSERVER_NAME)) {
- vserver.setName(vserversInst.getString(ENTITY_VSERVER_NAME));
- }
- if (vserversInst.has(ENTITY_VSERVER_ID)) {
- vserver.setUuid(vserversInst.getString(ENTITY_VSERVER_ID));
- }
- if (vserversInst.has(ENTITY_MODEL_INVARIANT_ID)) {
- vserver.setInvariantUuid(vserversInst.getString(ENTITY_MODEL_INVARIANT_ID));
- }
- // Store vserver type to NfcNameCode
- vserver.setNfcNamingCode(ENTITY_VSERVER);
- vf.addVnfc(vserver);
- }
- }
-
- // Find l3 networks
- if (genericVnfInst.has(ENTITY_L3_NETWORKS)) {
- JSONArray l3Networks = genericVnfInst.getJSONArray(ENTITY_L3_NETWORKS);
- for (int j = 0; j < l3Networks.length(); j++) {
- VNFC l3Network = new VNFC();
- JSONObject l3NetworkInst = l3Networks.getJSONObject(j);
- if (l3NetworkInst.has(ENTITY_NETWORK_NAME)) {
- l3Network.setName(l3NetworkInst.getString(ENTITY_NETWORK_NAME));
+ resource.setResourceType(resources[j]);
+ response.add(resource);
}
- if (l3NetworkInst.has(ENTITY_NETWORK_ID)) {
- l3Network.setUuid(l3NetworkInst.getString(ENTITY_NETWORK_ID));
- }
- if (l3NetworkInst.has(ENTITY_MODEL_INVARIANT_ID)) {
- l3Network.setInvariantUuid(l3NetworkInst.getString(ENTITY_MODEL_INVARIANT_ID));
- }
- // Store l3-network type to NfcNameCode
- l3Network.setNfcNamingCode(ENTITY_L3_NETWORK);
- vf.addVnfc(l3Network);
}
}
- response.addVf(vf);
}
}
@@ -481,11 +412,11 @@ public class SpringServiceImpl implements SpringService {
return serviceDecompCtx;
}
- private CountDownLatch createCountDownLatch(ModelContext serviceDecompCtx) {
+ private CountDownLatch createCountDownLatch(List<Resource> resourceList) {
// Obtain the possible total count of messages to NetworkDiscovery
// for CountDownLatch.
- int latch_count = sizeOfMsgToNetworkDiscovery(serviceDecompCtx);
+ int latch_count = resourceList.size();
if (latch_count > 0) {
// Let us create task that is going to
// wait for all threads before it starts
@@ -497,33 +428,26 @@ public class SpringServiceImpl implements SpringService {
}
/* Return list of requestIds sent to network-discovery microService. */
- private List<String> sendNetworkDiscoveryRequest(ModelContext serviceDecompCtx, String serviceInstanceId,
+ private List<String> sendNetworkDiscoveryRequest(List<Resource> resourceList, String serviceInstanceId, String parent_requestId,
String partner_name, CountDownLatch latchSignal) throws DiscoveryException {
- List<String> relatedRequestIdList = new ArrayList<>();
-
- String parent_requestId = MDC.get(MDC_REQUEST_ID);
-
- List<VF> vfList = serviceDecompCtx.getVf();
-
- for (VF entryVF : vfList) {
-
- List<VNFC> vnfcList = entryVF.getVnfc();
- for (VNFC entryVnfc : vnfcList) {
- String resourceId = entryVnfc.getUuid();
- String resourceType = entryVnfc.getNfcNamingCode();
- // The old_requestId is inheritated from ServiceDecomposition.
- // Before we send a
- // message to NetworkDiscoveryMicroService for each Vserver, we
- // need to generate
- // a new request for identification, based on the old ID.
- String requestId = parent_requestId + NETWORK_DISCOVERY_RSP_REQUESTID_SPLITTER
- + uniqueSeq.incrementAndGet();
+ List<String> relatedRequestIdList = new ArrayList<>();
- if (true == sendNetworkDiscoveryRequestToSpecificServer(partner_name, parent_requestId, requestId,
- resourceId, resourceType, latchSignal)) {
- relatedRequestIdList.add(requestId);
- }
+ for (Resource resource : resourceList) {
+ String resourceId = resource.getResourceId();
+ String resourceType = resource.getResourceType();
+
+ // The old_requestId is inherited from ServiceDecomposition.
+ // Before we send a
+ // message to NetworkDiscoveryMicroService for each Resource, we
+ // need to generate
+ // a new request for identification, based on the old ID.
+ String requestId = parent_requestId + NETWORK_DISCOVERY_RSP_REQUESTID_SPLITTER
+ + uniqueSeq.incrementAndGet();
+
+ if (true == sendNetworkDiscoveryRequestToSpecificServer(partner_name, parent_requestId, requestId,
+ resourceId, resourceType, latchSignal)) {
+ relatedRequestIdList.add(requestId);
}
}
@@ -539,18 +463,6 @@ public class SpringServiceImpl implements SpringService {
return relatedRequestIdList;
}
- /* Return number of messages sent to network-discovery microService. */
- private int sizeOfMsgToNetworkDiscovery(ModelContext serviceDecompCtx) {
- int msg_count = 0;
-
- List<VF> vfList = serviceDecompCtx.getVf();
- for (VF entryVF : vfList) {
- List<VNFC> vnfcList = entryVF.getVnfc();
- msg_count = msg_count + vnfcList.size();
- }
- return msg_count;
- }
-
// Return true when message is sent to network-discovery microService,
// otherwise, return false.
private boolean sendNetworkDiscoveryRequestToSpecificServer(String partner_name, String parent_requestId,
diff --git a/src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/test/NetworkDiscoveryRspInfoTest.java b/src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/test/NetworkDiscoveryRspInfoTest.java
index ac5979a..af2ba01 100644
--- a/src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/test/NetworkDiscoveryRspInfoTest.java
+++ b/src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/test/NetworkDiscoveryRspInfoTest.java
@@ -15,6 +15,7 @@
* limitations under the License.
* ============LICENSE_END=====================================================
*/
+
package org.onap.pomba.contextbuilder.networkdiscovery.test;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/unittest/service/NetworkDiscoveryContextBuilderTest.java b/src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/unittest/service/NetworkDiscoveryContextBuilderTest.java
index f5ba694..77e37ca 100644
--- a/src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/unittest/service/NetworkDiscoveryContextBuilderTest.java
+++ b/src/test/java/org/onap/pomba/contextbuilder/networkdiscovery/unittest/service/NetworkDiscoveryContextBuilderTest.java
@@ -25,6 +25,10 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
+import com.github.jknack.handlebars.internal.Files;
+import com.github.tomakehurst.wiremock.client.WireMock;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+import com.github.tomakehurst.wiremock.matching.UrlPattern;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -35,11 +39,9 @@ import java.util.Arrays;
import java.util.Base64;
import java.util.List;
import java.util.UUID;
-
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -62,11 +64,6 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
-import com.github.jknack.handlebars.internal.Files;
-import com.github.tomakehurst.wiremock.client.WireMock;
-import com.github.tomakehurst.wiremock.junit.WireMockRule;
-import com.github.tomakehurst.wiremock.matching.UrlPattern;
-
@RunWith(SpringJUnit4ClassRunner.class)
@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class })
@WebAppConfiguration
diff --git a/src/test/resources/SD_response.json b/src/test/resources/SD_response.json
index a736dca..d4db960 100644
--- a/src/test/resources/SD_response.json
+++ b/src/test/resources/SD_response.json
@@ -1,789 +1,557 @@
-{
- "relationship-list": {"relationship": [
- {
- "related-to": "generic-vnf",
- "relationship-data": [ {
- "relationship-value": "6700c313-fbb7-4cf9-ac70-0293ec56df68",
- "relationship-key": "generic-vnf.vnf-id"
- }],
- "related-link": "/aai/v13/network/generic-vnfs/generic-vnf/6700c313-fbb7-4cf9-ac70-0293ec56df68",
- "related-to-property": [ {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "PacketGenerator-1"
- }]
- },
- {
- "related-to": "generic-vnf",
- "relationship-data": [ {
- "relationship-value": "8a9ddb25-2e79-449c-a40d-5011bac0da39",
- "relationship-key": "generic-vnf.vnf-id"
- }],
- "related-link": "/aai/v13/network/generic-vnfs/generic-vnf/8a9ddb25-2e79-449c-a40d-5011bac0da39",
- "related-to-property": [ {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "Firewall-1"
- }]
- }
- ]},
- "model-version-id": "d3d6cf83-d03a-43cc-99ff-206d40bb9a72",
- "service-instance-id": "c6456519-6acf-4adb-997c-3c363dd4caaf",
- "resource-version": "1527637758480",
- "generic-vnfs": [
- {
- "nf-role": "",
- "service-id": "8ea56b0d-459d-4668-b363-c9567432d8b7",
- "relationship-list": {"relationship": [
- {
- "related-to": "service-instance",
- "relationship-data": [
- {
- "relationship-value": "Demonstration",
- "relationship-key": "customer.global-customer-id"
- },
- {
- "relationship-value": "vFWCL",
- "relationship-key": "service-subscription.service-type"
- },
- {
- "relationship-value": "c6456519-6acf-4adb-997c-3c363dd4caaf",
- "relationship-key": "service-instance.service-instance-id"
- }
- ],
- "related-link": "/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL/service-instances/service-instance/c6456519-6acf-4adb-997c-3c363dd4caaf",
- "related-to-property": [ {
- "property-key": "service-instance.service-instance-name",
- "property-value": "Firewall1"
- }]
- },
- {
- "related-to": "vserver",
- "relationship-data": [
- {
- "relationship-value": "CloudOwner",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "RegionOne",
- "relationship-key": "cloud-region.cloud-region-id"
- },
- {
- "relationship-value": "b49b830686654191bb1e952a74b014ad",
- "relationship-key": "tenant.tenant-id"
- },
- {
- "relationship-value": "b494cd6e-b9f3-45e0-afe7-e1d1a5f5d74a",
- "relationship-key": "vserver.vserver-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/b49b830686654191bb1e952a74b014ad/vservers/vserver/b494cd6e-b9f3-45e0-afe7-e1d1a5f5d74a"
- }
- ]},
- "vnf-id": "6700c313-fbb7-4cf9-ac70-0293ec56df68",
- "nf-type": "",
- "prov-status": "PREPROV",
- "vnf-type": "vFW-vSINK-service/vPKG 0",
- "orchestration-status": "Created",
- "nf-naming-code": "",
- "in-maint": false,
- "nf-function": "",
- "model-version-id": "a5565bf4-d55a-4964-8fbc-6a7674a2e676",
- "resource-version": "1527638176989",
- "model-customization-id": "4cc1e555-361f-4d69-ae21-9f371ea9f40c",
- "vf-modules": {"vf-module": [ {
- "vf-module-name": "vPacketGen-VNF-1128-3",
- "model-version-id": "d6d4a002-a584-4640-bdce-a50e9bce552b",
- "heat-stack-id": "vPacketGen-VNF-1128-3/df34f5d6-ed39-4184-b785-51c37cfa8ac2",
- "resource-version": "1527641224058",
- "model-customization-id": "49c8f521-e5ee-4095-bb87-4090166e49ab",
- "is-base-vf-module": true,
- "vf-module-id": "0f792076-f5b3-4251-9fcc-c4d5afae0eb1",
- "module-index": 0,
- "model-invariant-id": "2a8844a8-f5f7-46dd-a732-472c6972a28e",
- "orchestration-status": "active"
- }]},
- "vserver": [ {
- "relationship-list": {"relationship": [
- {
- "related-to": "generic-vnf",
- "relationship-data": [ {
- "relationship-value": "8a9ddb25-2e79-449c-a40d-5011bac0da39",
- "relationship-key": "generic-vnf.vnf-id"
- }],
- "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/8a9ddb25-2e79-449c-a40d-5011bac0da39",
- "related-to-property": [ {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "Firewall-1"
- }]
- },
- {
- "related-to": "flavor",
- "relationship-data": [
- {
- "relationship-value": "CloudOwner",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "RegionOne",
- "relationship-key": "cloud-region.cloud-region-id"
- },
- {
- "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39",
- "relationship-key": "flavor.flavor-id"
- }
- ],
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
- "related-to-property": [ {
- "property-key": "flavor.flavor-name",
- "property-value": "m1.medium"
- }]
- },
- {
- "related-to": "image",
- "relationship-data": [
- {
- "relationship-value": "CloudOwner",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "RegionOne",
- "relationship-key": "cloud-region.cloud-region-id"
- },
- {
- "relationship-value": "42fd42f8-cf81-4f4c-a552-d4b124f83b0b",
- "relationship-key": "image.image-id"
- }
- ],
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/42fd42f8-cf81-4f4c-a552-d4b124f83b0b",
- "related-to-property": [ {
- "property-key": "image.image-name",
- "property-value": "unknown"
- }]
- }
- ]},
- "in-maint": false,
- "resource-version": "1528481820321",
- "vserver-name": "Firewall-0",
- "prov-status": "ACTIVE",
- "vserver-id": "b494cd6e-b9f3-45e0-afe7-e1d1a5f5d74a",
- "vserver-name2": "Firewall-0",
- "vserver-selflink": "http://10.12.25.2:8774/v2.1/b49b830686654191bb1e952a74b014ad/servers/b494cd6e-b9f3-45e0-afe7-e1d1a5f5d74a",
- "is-closed-loop-disabled": false
- }],
- "model-invariant-id": "99f1fd3f-845c-48f5-a0ba-11fbde6ae557",
- "vnf-name": "PacketGenerator-1",
- "is-closed-loop-disabled": false
- },
- {
- "nf-role": "",
- "service-id": "8ea56b0d-459d-4668-b363-c9567432d8b7",
- "relationship-list": {"relationship": [
- {
- "related-to": "service-instance",
- "relationship-data": [
- {
- "relationship-value": "Demonstration",
- "relationship-key": "customer.global-customer-id"
- },
- {
- "relationship-value": "vFWCL",
- "relationship-key": "service-subscription.service-type"
- },
- {
- "relationship-value": "c6456519-6acf-4adb-997c-3c363dd4caaf",
- "relationship-key": "service-instance.service-instance-id"
- }
- ],
- "related-link": "/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL/service-instances/service-instance/c6456519-6acf-4adb-997c-3c363dd4caaf",
- "related-to-property": [ {
- "property-key": "service-instance.service-instance-name",
- "property-value": "Firewall1"
- }]
- },
- {
- "related-to": "l3-network",
- "relationship-data": [ {
- "relationship-value": "HNP1d77c-1094-41ec-b7f3-94bb30951870",
- "relationship-key": "l3-network.network-id"
- }],
- "related-link": "/aai/v13/network/l3-networks/l3-network/HNP1d77c-1094-41ec-b7f3-94bb30951870",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [ {
- "property-key": "l3-network.network-name",
- "property-value": "HNPORTALOAM.OAM"
- }]
- },
- {
- "related-to": "l3-network",
- "relationship-data": [ {
- "relationship-value": "HNP1d77c-1094-41ec-b7f3-94bb30951872",
- "relationship-key": "l3-network.network-id"
- }],
- "related-link": "/aai/v13/network/l3-networks/l3-network/HNP1d77c-1094-41ec-b7f3-94bb30951872",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [ {
- "property-key": "l3-network.network-name",
- "property-value": "HNPORTAL_SRIOV_2"
- }]
- }
- ]},
- "vnf-id": "8a9ddb25-2e79-449c-a40d-5011bac0da39",
- "nf-type": "",
- "prov-status": "PREPROV",
- "vnf-type": "vFW-vSINK-service/vFWvSINK 0",
- "orchestration-status": "Created",
- "nf-naming-code": "",
- "in-maint": false,
- "nf-function": "",
- "model-version-id": "e2d52f32-a952-46f5-800c-c250903625d6",
- "resource-version": "1527637940029",
- "model-customization-id": "3b822416-475d-4e1c-aac3-2544b0a0fdfc",
- "vf-modules": {"vf-module": [ {
- "vf-module-name": "vFW_SINC_Module-2",
- "model-version-id": "4e3d28cf-d654-41af-a47b-04b4bd0ac58e",
- "heat-stack-id": "vFW_SINC_Module-2/41c4533a-748d-4cf4-a8d3-eccdd0aeb0d4",
- "resource-version": "1527638439198",
- "model-customization-id": "cc51ab7d-9b03-4bd6-9104-09df0c7c7907",
- "is-base-vf-module": true,
- "vf-module-id": "1563b649-9e05-4288-b7d9-e3639a54ace6",
- "module-index": 0,
- "model-invariant-id": "74bc1518-282d-4148-860f-8892b6369456",
- "orchestration-status": "active"
- }]},
- "l3-network": [
- {
- "network-role": "HNPORTALOAM.OAM",
- "network-technology": "ovs",
- "service-id": "V7611HNP-1222-48f1-8085-94aef0c6ef3d51870",
- "network-id": "HNP1d77c-1222-41ec-b7f3-94bb30951870",
- "neutron-network-id": "491c7cef-a3f4-4990-883e-b0af397466d0",
- "is-external-network": false,
- "is-bound-to-vpn": false,
- "is-provider-network": false,
- "network-type": "OVS_PROVIDER_VLAN",
- "orchestration-status": "active",
- "network-role-instance": 0,
- "resource-version": "1526558298075",
- "network-name": "HNPORTALOAM.OAM",
- "is-shared-network": false
- },
- {
- "network-role": "role-2",
- "physical-network-name": "",
- "network-technology": "Contrail",
- "service-id": "",
- "relationship-list": {"relationship": [
- {
- "related-to": "vf-module",
- "relationship-data": [
- {
- "relationship-value": "vnf-id-1",
- "relationship-key": "generic-vnf.vnf-id"
- },
- {
- "relationship-value": "vf-module-1",
- "relationship-key": "vf-module.vf-module-id"
- }
- ],
- "related-link": "/aai/v13/network/generic-vnfs/generic-vnf/vnf-id-1/vf-modules/vf-module/vf-module-1",
- "relationship-label": "org.onap.relationships.inventory.DependsOn"
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "clb1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/clb1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "anmca",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/anmca",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "mor1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mor1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "LNN1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/LNN1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "RLG1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/RLG1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "STL1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/STL1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "milit",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/milit",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "NWO1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/NWO1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "Docs_Ottawa4",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/Docs_Ottawa4",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "bng1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/bng1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "SNFC",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/SNFC",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "FRO1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/FRO1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "generic-vnf",
- "relationship-data": [ {
- "relationship-value": "vnf-id-1",
- "relationship-key": "generic-vnf.vnf-id"
- }],
- "related-link": "/aai/v13/network/generic-vnfs/generic-vnf/vnf-id-1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [ {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "zclb1nf-code-166"
- }]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "Docs_Ottawa5",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/Docs_Ottawa5",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "TOJ1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/TOJ1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "TOR1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/TOR1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "LIV1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/LIV1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "AMS1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AMS1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "CLB1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/CLB1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "KNV1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/KNV1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "SNT1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/SNT1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "REN1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/REN1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "JCS1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/JCS1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "BTR1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/BTR1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "IPL1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/IPL1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "brl1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/brl1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "SDG2",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/SDG2",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "SDG3",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/SDG3",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "SDG1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/SDG1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- },
- {
- "related-to": "cloud-region",
- "relationship-data": [
- {
- "relationship-value": "att-aic",
- "relationship-key": "cloud-region.cloud-owner"
- },
- {
- "relationship-value": "alt1",
- "relationship-key": "cloud-region.cloud-region-id"
- }
- ],
- "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/alt1",
- "relationship-label": "org.onap.relationships.inventory.Uses",
- "related-to-property": [{"property-key": "cloud-region.owner-defined-type"}]
- }
- ]},
- "network-id": "HNP1d77c-1094-41ec-b7f3-94bb30951872",
- "is-external-network": false,
- "is-bound-to-vpn": false,
- "is-provider-network": false,
- "network-type": "Tenant_Layer_3",
- "orchestration-status": "active",
- "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/lmr-dev-service-instance-1/service-data/networks/network/7fda3d47-bf58-4d72-a8a9-6e67ed5e28cb",
- "resource-version": "1489409337521",
- "model-customization-id": "f8d1d77c-5875-41ec-b7f3-94bb30936807",
- "network-name": "oam-net",
- "is-shared-network": false,
- "model-invariant-id": "aaa"
- }
- ],
- "model-invariant-id": "59dd4d63-8f21-406c-98c0-3b057bb86820",
- "vnf-name": "Firewall-1",
- "is-closed-loop-disabled": false
- }
- ],
- "model-invariant-id": "0c5a20de-87ad-442c-9190-f38ab0a6bb7f",
- "service-instance-name": "Firewall1"
-}
+{
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "relationship-data": [
+ {
+ "relationship-value": "6700c313-fbb7-4cf9-ac70-0293ec56df68",
+ "relationship-key": "generic-vnf.vnf-id"
+ }
+ ],
+ "related-link": "/aai/v13/network/generic-vnfs/generic-vnf/6700c313-fbb7-4cf9-ac70-0293ec56df68",
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "PacketGenerator-1"
+ }
+ ]
+ },
+ {
+ "related-to": "generic-vnf",
+ "relationship-data": [
+ {
+ "relationship-value": "6700c313-fbb7-4cf9-ac70-0293ec56df69",
+ "relationship-key": "generic-vnf.vnf-id"
+ }
+ ],
+ "related-link": "/aai/v13/network/generic-vnfs/generic-vnf/6700c313-fbb7-4cf9-ac70-0293ec56df69",
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "PacketGenerator-2"
+ }
+ ]
+ }
+ ]
+ },
+ "model-version-id": "d3d6cf83-d03a-43cc-99ff-206d40bb9a72",
+ "service-instance-id": "c6456519-6acf-4adb-997c-3c363dd4caaf",
+ "resource-version": "1527637758480",
+ "generic-vnfs": [
+ {
+ "nf-role": "",
+ "service-id": "8ea56b0d-459d-4668-b363-c9567432d8b7",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-data": [
+ {
+ "relationship-value": "Demonstration",
+ "relationship-key": "customer.global-customer-id"
+ },
+ {
+ "relationship-value": "vFWCL",
+ "relationship-key": "service-subscription.service-type"
+ },
+ {
+ "relationship-value": "c6456519-6acf-4adb-997c-3c363dd4caaf",
+ "relationship-key": "service-instance.service-instance-id"
+ }
+ ],
+ "related-link": "/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL/service-instances/service-instance/c6456519-6acf-4adb-997c-3c363dd4caaf",
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "Firewall1"
+ }
+ ]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-data": [
+ {
+ "relationship-value": "HNP1d77c-1094-41ec-b7f3-94bb30951870",
+ "relationship-key": "l3-network.network-id"
+ }
+ ],
+ "related-link": "/aai/v13/network/l3-networks/l3-network/HNP1d77c-1094-41ec-b7f3-94bb30951870",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-to-property": [
+ {
+ "property-key": "l3-network.network-name",
+ "property-value": "HNPORTALOAM.OAM"
+ }
+ ]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "b49b830686654191bb1e952a74b014ad",
+ "relationship-key": "tenant.tenant-id"
+ },
+ {
+ "relationship-value": "25fb07ab-0478-465e-a021-6384ac299671",
+ "relationship-key": "vserver.vserver-id"
+ }
+ ],
+ "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/b49b830686654191bb1e952a74b014ad/vservers/vserver/25fb07ab-0478-465e-a021-6384ac299671"
+ },
+ {
+ "related-to": "vserver",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "b49b830686654191bb1e952a74b014ad",
+ "relationship-key": "tenant.tenant-id"
+ },
+ {
+ "relationship-value": "25fb07ab-0478-465e-a021-6384ac299672",
+ "relationship-key": "vserver.vserver-id"
+ }
+ ],
+ "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/b49b830686654191bb1e952a74b014ad/vservers/vserver/25fb07ab-0478-465e-a021-6384ac299672"
+ }
+ ]
+ },
+ "vnf-id": "6700c313-fbb7-4cf9-ac70-0293ec56df68",
+ "nf-type": "",
+ "l3-networks": [
+ {
+ "network-role": "HNPORTALOAM.OAM",
+ "network-technology": "ovs",
+ "service-id": "V7611HNP-1222-48f1-8085-94aef0c6ef3d51870",
+ "network-id": "HNP1d77c-1222-41ec-b7f3-94bb30951870",
+ "neutron-network-id": "491c7cef-a3f4-4990-883e-b0af397466d0",
+ "is-external-network": false,
+ "is-bound-to-vpn": false,
+ "is-provider-network": false,
+ "network-type": "OVS_PROVIDER_VLAN",
+ "orchestration-status": "active",
+ "network-role-instance": 0,
+ "resource-version": "1526558298075",
+ "network-name": "HNPORTALOAM.OAM",
+ "is-shared-network": false
+ }
+ ],
+ "prov-status": "PREPROV",
+ "vnf-type": "vFW-vSINK-service/vPKG 0",
+ "orchestration-status": "Created",
+ "nf-naming-code": "",
+ "in-maint": false,
+ "nf-function": "",
+ "model-version-id": "a5565bf4-d55a-4964-8fbc-6a7674a2e676",
+ "vservers": [
+ {
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "relationship-data": [
+ {
+ "relationship-value": "8a9ddb25-2e79-449c-a40d-5011bac0da39",
+ "relationship-key": "generic-vnf.vnf-id"
+ }
+ ],
+ "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/8a9ddb25-2e79-449c-a40d-5011bac0da39",
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "Firewall-1"
+ }
+ ]
+ },
+ {
+ "related-to": "flavor",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39",
+ "relationship-key": "flavor.flavor-id"
+ }
+ ],
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
+ "related-to-property": [
+ {
+ "property-key": "flavor.flavor-name",
+ "property-value": "m1.medium"
+ }
+ ]
+ },
+ {
+ "related-to": "image",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "42fd42f8-cf81-4f4c-a552-d4b124f83b0b",
+ "relationship-key": "image.image-id"
+ }
+ ],
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/42fd42f8-cf81-4f4c-a552-d4b124f83b0b",
+ "related-to-property": [
+ {
+ "property-key": "image.image-name",
+ "property-value": "unknown"
+ }
+ ]
+ }
+ ]
+ },
+ "in-maint": false,
+ "resource-version": "1528481820321",
+ "vserver-name": "Firewall-0",
+ "prov-status": "ACTIVE",
+ "vserver-id": "25fb07ab-0478-465e-a021-6384ac299671",
+ "vserver-name2": "Firewall-0",
+ "vserver-selflink": "http://10.12.25.2:8774/v2.1/b49b830686654191bb1e952a74b014ad/servers/25fb07ab-0478-465e-a021-6384ac299671",
+ "is-closed-loop-disabled": false
+ },
+ {
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "relationship-data": [
+ {
+ "relationship-value": "8a9ddb25-2e79-449c-a40d-5011bac0da39",
+ "relationship-key": "generic-vnf.vnf-id"
+ }
+ ],
+ "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/8a9ddb25-2e79-449c-a40d-5011bac0da39",
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "Firewall-1"
+ }
+ ]
+ },
+ {
+ "related-to": "flavor",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39",
+ "relationship-key": "flavor.flavor-id"
+ }
+ ],
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
+ "related-to-property": [
+ {
+ "property-key": "flavor.flavor-name",
+ "property-value": "m1.medium"
+ }
+ ]
+ },
+ {
+ "related-to": "image",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "42fd42f8-cf81-4f4c-a552-d4b124f83b0b",
+ "relationship-key": "image.image-id"
+ }
+ ],
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/42fd42f8-cf81-4f4c-a552-d4b124f83b0b",
+ "related-to-property": [
+ {
+ "property-key": "image.image-name",
+ "property-value": "unknown"
+ }
+ ]
+ }
+ ]
+ },
+ "in-maint": false,
+ "resource-version": "1528481820321",
+ "vserver-name": "Firewall-0",
+ "prov-status": "ACTIVE",
+ "vserver-id": "25fb07ab-0478-465e-a021-6384ac299672",
+ "vserver-name2": "Firewall-0",
+ "vserver-selflink": "http://10.12.25.2:8774/v2.1/b49b830686654191bb1e952a74b014ad/servers/25fb07ab-0478-465e-a021-6384ac299672",
+ "is-closed-loop-disabled": false
+ }
+ ],
+ "resource-version": "1527638176989",
+ "model-customization-id": "4cc1e555-361f-4d69-ae21-9f371ea9f40c",
+ "vf-modules": {
+ "vf-module": [
+ {
+ "vf-module-name": "vPacketGen-VNF-1128-3",
+ "model-version-id": "d6d4a002-a584-4640-bdce-a50e9bce552b",
+ "heat-stack-id": "vPacketGen-VNF-1128-3/df34f5d6-ed39-4184-b785-51c37cfa8ac2",
+ "resource-version": "1527641224058",
+ "model-customization-id": "49c8f521-e5ee-4095-bb87-4090166e49ab",
+ "is-base-vf-module": true,
+ "vf-module-id": "0f792076-f5b3-4251-9fcc-c4d5afae0eb1",
+ "module-index": 0,
+ "model-invariant-id": "2a8844a8-f5f7-46dd-a732-472c6972a28e",
+ "orchestration-status": "active"
+ }
+ ]
+ },
+ "vserver": [
+ {
+ "vserver-name": "Firewall-1",
+ "vserver-id": "25fb07ab-0478-465e-a021-6384ac299671",
+ "model-invariant-id": "0c5a20de-87ad-442c-9190-f38ab0a6bb7f"
+ }
+ ],
+ "model-invariant-id": "99f1fd3f-845c-48f5-a0ba-11fbde6ae557",
+ "vnf-name": "PacketGenerator-1",
+ "is-closed-loop-disabled": false
+ },
+ {
+ "nf-role": "",
+ "service-id": "8ea56b0d-459d-4668-b363-c9567432d8b9",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-data": [
+ {
+ "relationship-value": "Demonstration",
+ "relationship-key": "customer.global-customer-id"
+ },
+ {
+ "relationship-value": "vFWCL",
+ "relationship-key": "service-subscription.service-type"
+ },
+ {
+ "relationship-value": "c6456519-6acf-4adb-997c-3c363dd4caaf",
+ "relationship-key": "service-instance.service-instance-id"
+ }
+ ],
+ "related-link": "/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL/service-instances/service-instance/c6456519-6acf-4adb-997c-3c363dd4caaf",
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "Firewall1"
+ }
+ ]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-data": [
+ {
+ "relationship-value": "HNP1d77c-1094-41ec-b7f3-94bb30951870",
+ "relationship-key": "l3-network.network-id"
+ }
+ ],
+ "related-link": "/aai/v13/network/l3-networks/l3-network/HNP1d77c-1094-41ec-b7f3-94bb30951871",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-to-property": [
+ {
+ "property-key": "l3-network.network-name",
+ "property-value": "HNPORTALOAM.OAM"
+ }
+ ]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "b49b830686654191bb1e952a74b014ad",
+ "relationship-key": "tenant.tenant-id"
+ },
+ {
+ "relationship-value": "25fb07ab-0478-465e-a021-6384ac299671",
+ "relationship-key": "vserver.vserver-id"
+ }
+ ],
+ "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/b49b830686654191bb1e952a74b014ad/vservers/vserver/b494cd6e-b9f3-45e0-afe7-e1d1a5f5d74b"
+ }
+ ]
+ },
+ "vnf-id": "6700c313-fbb7-4cf9-ac70-0293ec56df69",
+ "nf-type": "",
+ "l3-networks": [
+ {
+ "network-role": "HNPORTALOAM.OAM",
+ "network-technology": "ovs",
+ "service-id": "V7611HNP-1222-48f1-8085-94aef0c6ef3d51870",
+ "network-id": "HNP1d77c-1222-41ec-b7f3-94bb30951870",
+ "neutron-network-id": "491c7cef-a3f4-4990-883e-b0af397466d0",
+ "is-external-network": false,
+ "is-bound-to-vpn": false,
+ "is-provider-network": false,
+ "network-type": "OVS_PROVIDER_VLAN",
+ "orchestration-status": "active",
+ "network-role-instance": 0,
+ "resource-version": "1526558298075",
+ "network-name": "HNPORTALOAM.OAM",
+ "is-shared-network": false
+ }
+ ],
+ "prov-status": "PREPROV",
+ "vnf-type": "vFW-vSINK-service/vPKG 0",
+ "orchestration-status": "Created",
+ "nf-naming-code": "",
+ "in-maint": false,
+ "nf-function": "",
+ "model-version-id": "a5565bf4-d55a-4964-8fbc-6a7674a2e676",
+ "vservers": [
+ {
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "relationship-data": [
+ {
+ "relationship-value": "8a9ddb25-2e79-449c-a40d-5011bac0da39",
+ "relationship-key": "generic-vnf.vnf-id"
+ }
+ ],
+ "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/8a9ddb25-2e79-449c-a40d-5011bac0da39",
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "Firewall-1"
+ }
+ ]
+ },
+ {
+ "related-to": "flavor",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39",
+ "relationship-key": "flavor.flavor-id"
+ }
+ ],
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
+ "related-to-property": [
+ {
+ "property-key": "flavor.flavor-name",
+ "property-value": "m1.medium"
+ }
+ ]
+ },
+ {
+ "related-to": "image",
+ "relationship-data": [
+ {
+ "relationship-value": "CloudOwner",
+ "relationship-key": "cloud-region.cloud-owner"
+ },
+ {
+ "relationship-value": "RegionOne",
+ "relationship-key": "cloud-region.cloud-region-id"
+ },
+ {
+ "relationship-value": "42fd42f8-cf81-4f4c-a552-d4b124f83b0b",
+ "relationship-key": "image.image-id"
+ }
+ ],
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/42fd42f8-cf81-4f4c-a552-d4b124f83b0b",
+ "related-to-property": [
+ {
+ "property-key": "image.image-name",
+ "property-value": "unknown"
+ }
+ ]
+ }
+ ]
+ },
+ "in-maint": false,
+ "resource-version": "1528481820321",
+ "vserver-name": "Firewall-0",
+ "prov-status": "ACTIVE",
+ "vserver-id": "b494cd6e-b9f3-45e0-afe7-e1d1a5f5d74b",
+ "vserver-name2": "Firewall-0",
+ "vserver-selflink": "http://10.12.25.2:8774/v2.1/b49b830686654191bb1e952a74b014ad/servers/25fb07ab-0478-465e-a021-6384ac299671",
+ "is-closed-loop-disabled": false
+ }
+ ],
+ "resource-version": "1527638176989",
+ "model-customization-id": "4cc1e555-361f-4d69-ae21-9f371ea9f40c",
+ "vf-modules": {
+ "vf-module": [
+ {
+ "vf-module-name": "vPacketGen-VNF-1128-3",
+ "model-version-id": "d6d4a002-a584-4640-bdce-a50e9bce552b",
+ "heat-stack-id": "vPacketGen-VNF-1128-3/df34f5d6-ed39-4184-b785-51c37cfa8ac2",
+ "resource-version": "1527641224058",
+ "model-customization-id": "49c8f521-e5ee-4095-bb87-4090166e49ab",
+ "is-base-vf-module": true,
+ "vf-module-id": "0f792076-f5b3-4251-9fcc-c4d5afae0eb1",
+ "module-index": 0,
+ "model-invariant-id": "2a8844a8-f5f7-46dd-a732-472c6972a28e",
+ "orchestration-status": "active"
+ }
+ ]
+ },
+ "vserver": [
+ {
+ "vserver-name": "Firewall-1",
+ "vserver-id": "25fb07ab-0478-465e-a021-6384ac299672",
+ "model-invariant-id": "0c5a20de-87ad-442c-9190-f38ab0a6bb7f"
+ }
+ ],
+ "model-invariant-id": "99f1fd3f-845c-48f5-a0ba-11fbde6ae557",
+ "vnf-name": "PacketGenerator-2",
+ "is-closed-loop-disabled": false
+ }
+ ],
+ "model-invariant-id": "0c5a20de-87ad-442c-9190-f38ab0a6bb7f",
+ "service-instance-name": "Firewall1"
+} \ No newline at end of file