2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Modifications Copyright (c) 2019 Samsung
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.so.bpmn.servicedecomposition.tasks;
25 import java.io.IOException;
26 import java.io.ObjectOutputStream;
27 import java.util.ArrayList;
28 import java.util.Arrays;
29 import java.util.List;
31 import java.util.Optional;
32 import org.onap.aai.domain.yang.CloudRegion;
33 import org.onap.aai.domain.yang.Configuration;
34 import org.onap.aai.domain.yang.GenericVnf;
35 import org.onap.aai.domain.yang.GenericVnfs;
36 import org.onap.aai.domain.yang.InstanceGroup;
37 import org.onap.aai.domain.yang.L3Network;
38 import org.onap.aai.domain.yang.L3Networks;
39 import org.onap.aai.domain.yang.ServiceInstance;
40 import org.onap.aai.domain.yang.ServiceInstances;
41 import org.onap.aai.domain.yang.ServiceSubscription;
42 import org.onap.aai.domain.yang.VfModule;
43 import org.onap.aai.domain.yang.VolumeGroup;
44 import org.onap.aai.domain.yang.VolumeGroups;
45 import org.onap.aai.domain.yang.VpnBinding;
46 import org.onap.so.bpmn.common.InjectionHelper;
47 import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
48 import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
49 import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.MultipleObjectsFoundException;
50 import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.NoServiceInstanceFoundException;
51 import org.onap.so.client.aai.AAIObjectPlurals;
52 import org.onap.so.client.aai.AAIObjectType;
53 import org.onap.so.client.aai.entities.AAIResultWrapper;
54 import org.onap.so.client.aai.entities.uri.AAIResourceUri;
55 import org.onap.so.client.aai.entities.uri.AAIUriFactory;
56 import org.onap.so.client.graphinventory.entities.uri.Depth;
57 import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
58 import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
59 import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
60 import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
61 import org.onap.so.db.catalog.beans.Service;
62 import org.onap.so.db.catalog.beans.VfModuleCustomization;
63 import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
64 import org.onap.so.db.catalog.client.CatalogDbClient;
65 import org.onap.so.db.request.beans.InfraActiveRequests;
66 import org.onap.so.db.request.beans.RequestProcessingData;
67 import org.onap.so.db.request.client.RequestsDbClient;
68 import org.onap.so.serviceinstancebeans.CloudConfiguration;
69 import org.onap.so.serviceinstancebeans.ModelType;
70 import org.onap.so.serviceinstancebeans.RelatedInstance;
71 import org.onap.so.serviceinstancebeans.RelatedInstanceList;
72 import org.onap.so.serviceinstancebeans.RequestDetails;
73 import org.slf4j.Logger;
74 import org.slf4j.LoggerFactory;
75 import org.springframework.beans.factory.annotation.Autowired;
76 import org.springframework.stereotype.Component;
77 import com.fasterxml.jackson.core.JsonParseException;
78 import com.fasterxml.jackson.core.JsonProcessingException;
79 import com.fasterxml.jackson.databind.DeserializationFeature;
80 import com.fasterxml.jackson.databind.JsonMappingException;
81 import com.fasterxml.jackson.databind.ObjectMapper;
82 import com.fasterxml.jackson.databind.SerializationFeature;
84 @Component("BBInputSetupUtils")
85 public class BBInputSetupUtils {
87 private static final Logger logger = LoggerFactory.getLogger(BBInputSetupUtils.class);
88 private ObjectMapper objectMapper = new ObjectMapper();
89 private static final String REQUEST_ERROR = "Could not find request.";
90 private static final String DATA_LOAD_ERROR = "Could not process loading data from database";
91 private static final String DATA_PARSE_ERROR = "Could not parse data";
92 private static final String PROCESSING_DATA_NAME_EXECUTION_FLOWS = "flowExecutionPath";
95 protected CatalogDbClient catalogDbClient;
98 protected RequestsDbClient requestsDbClient;
101 protected InjectionHelper injectionHelper;
103 public RelatedInstance getRelatedInstanceByType(RequestDetails requestDetails, ModelType modelType) {
104 if (requestDetails.getRelatedInstanceList() != null) {
105 for (RelatedInstanceList relatedInstanceList : requestDetails.getRelatedInstanceList()) {
106 RelatedInstance relatedInstance = relatedInstanceList.getRelatedInstance();
107 if (relatedInstance != null && relatedInstance.getModelInfo() != null
108 && relatedInstance.getModelInfo().getModelType() != null
109 && relatedInstance.getModelInfo().getModelType().equals(modelType)) {
110 return relatedInstance;
117 public void updateInfraActiveRequestVnfId(InfraActiveRequests request, String vnfId) {
118 if (request != null) {
119 request.setVnfId(vnfId);
120 this.requestsDbClient.updateInfraActiveRequests(request);
122 logger.debug(REQUEST_ERROR);
126 public void updateInfraActiveRequestVfModuleId(InfraActiveRequests request, String vfModuleId) {
127 if (request != null) {
128 request.setVfModuleId(vfModuleId);
129 this.requestsDbClient.updateInfraActiveRequests(request);
131 logger.debug(REQUEST_ERROR);
135 public void updateInfraActiveRequestVolumeGroupId(InfraActiveRequests request, String volumeGroupId) {
136 if (request != null) {
137 request.setVolumeGroupId(volumeGroupId);
138 this.requestsDbClient.updateInfraActiveRequests(request);
140 logger.debug(REQUEST_ERROR);
144 public void updateInfraActiveRequestNetworkId(InfraActiveRequests request, String networkId) {
145 if (request != null) {
146 request.setNetworkId(networkId);
147 this.requestsDbClient.updateInfraActiveRequests(request);
149 logger.debug(REQUEST_ERROR);
153 public void persistFlowExecutionPath(String requestId, List<ExecuteBuildingBlock> flowsToExecute) {
155 if (requestId != null) {
156 List<String> flows = new ArrayList<>();
157 ObjectMapper om = new ObjectMapper();
159 for (ExecuteBuildingBlock ebb : flowsToExecute) {
160 flows.add(om.writeValueAsString(ebb));
162 } catch (JsonProcessingException e) {
163 logger.error(DATA_PARSE_ERROR, e);
166 this.requestsDbClient.persistProcessingData(flows.toString(), requestId);
168 logger.debug(REQUEST_ERROR);
172 public InfraActiveRequests loadInfraActiveRequestById(String requestId) {
174 return this.requestsDbClient.getInfraActiveRequestbyRequestId(requestId);
177 public InfraActiveRequests loadOriginalInfraActiveRequestById(String requestId) {
179 return this.requestsDbClient.getInfraActiveRequestbyRequestId(
180 this.requestsDbClient.getInfraActiveRequestbyRequestId(requestId).getOriginalRequestId());
183 public List<ExecuteBuildingBlock> loadOriginalFlowExecutionPath(String requestId) {
185 List<ExecuteBuildingBlock> asList = null;
186 if (requestId != null) {
188 InfraActiveRequests request = loadInfraActiveRequestById(requestId);
190 if (request.getOriginalRequestId() != null) {
192 RequestProcessingData requestProcessingData =
193 this.requestsDbClient.getRequestProcessingDataBySoRequestIdAndName(
194 request.getOriginalRequestId(), PROCESSING_DATA_NAME_EXECUTION_FLOWS);
196 ObjectMapper om = new ObjectMapper();
198 ExecuteBuildingBlock[] asArray =
199 om.readValue(requestProcessingData.getValue(), ExecuteBuildingBlock[].class);
200 asList = Arrays.asList(asArray);
201 } catch (Exception e) {
202 logger.error(DATA_LOAD_ERROR, e);
207 logger.debug(REQUEST_ERROR);
213 public Service getCatalogServiceByModelUUID(String modelUUID) {
214 return catalogDbClient.getServiceByID(modelUUID);
217 public Service getCatalogServiceByModelVersionAndModelInvariantUUID(String modelVersion,
218 String modelInvariantUUID) {
219 return catalogDbClient.getServiceByModelVersionAndModelInvariantUUID(modelVersion, modelInvariantUUID);
222 public CollectionNetworkResourceCustomization getCatalogCollectionNetworkResourceCustByID(String key) {
223 return catalogDbClient.getCollectionNetworkResourceCustomizationByID(key);
226 public NetworkCollectionResourceCustomization getCatalogNetworkCollectionResourceCustByID(
227 String collectionCustomizationId) {
228 return catalogDbClient.getNetworkCollectionResourceCustomizationByID(collectionCustomizationId);
231 public VfModuleCustomization getVfModuleCustomizationByModelCuztomizationUUID(String modelCustomizationUUID) {
232 return catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID(modelCustomizationUUID);
235 public CvnfcConfigurationCustomization getCvnfcConfigurationCustomization(String serviceModelUUID,
236 String vnfCustomizationUuid, String vfModuleCustomizationUuid, String cvnfcCustomizationUuid) {
237 return catalogDbClient.getCvnfcCustomization(serviceModelUUID, vnfCustomizationUuid, vfModuleCustomizationUuid,
238 cvnfcCustomizationUuid);
241 public List<VnfcInstanceGroupCustomization> getVnfcInstanceGroups(String modelCustomizationUUID) {
242 return catalogDbClient.getVnfcInstanceGroupsByVnfResourceCust(modelCustomizationUUID);
245 public Map<String, String> getURIKeysFromServiceInstance(String serviceInstanceId) {
246 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
247 return uri.getURIKeys();
250 protected RequestDetails getRequestDetails(String requestId) throws IOException {
251 if (requestId != null && !requestId.isEmpty()) {
252 InfraActiveRequests activeRequest = this.getInfraActiveRequest(requestId);
253 String requestBody = activeRequest.getRequestBody().replaceAll("\\\\", "");
254 objectMapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
255 objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
256 return objectMapper.readValue(requestBody, RequestDetails.class);
262 protected InfraActiveRequests getInfraActiveRequest(String requestId) {
263 if (requestId != null && !requestId.isEmpty()) {
264 return requestsDbClient.getInfraActiveRequestbyRequestId(requestId);
270 protected CloudRegion getCloudRegion(CloudConfiguration cloudConfiguration) {
271 if (cloudConfiguration != null) {
272 String cloudRegionId = cloudConfiguration.getLcpCloudRegionId();
273 String cloudOwner = cloudConfiguration.getCloudOwner();
274 if (cloudRegionId != null && cloudOwner != null && !cloudRegionId.isEmpty() && !cloudOwner.isEmpty()) {
275 return injectionHelper.getAaiClient().get(CloudRegion.class, AAIUriFactory
276 .createResourceUri(AAIObjectType.CLOUD_REGION, cloudOwner, cloudRegionId).depth(Depth.TWO))
287 protected InstanceGroup getAAIInstanceGroup(String instanceGroupId) {
288 return injectionHelper.getAaiClient().get(InstanceGroup.class,
289 AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroupId)).orElse(null);
292 public org.onap.aai.domain.yang.Customer getAAICustomer(String globalSubscriberId) {
293 return injectionHelper.getAaiClient().get(org.onap.aai.domain.yang.Customer.class,
294 AAIUriFactory.createResourceUri(AAIObjectType.CUSTOMER, globalSubscriberId)).orElse(null);
297 public ServiceSubscription getAAIServiceSubscription(String globalSubscriberId, String subscriptionServiceType) {
299 if (globalSubscriberId == null || globalSubscriberId.equals("") || subscriptionServiceType == null
300 || subscriptionServiceType.equals("")) {
303 return injectionHelper.getAaiClient().get(ServiceSubscription.class, AAIUriFactory
304 .createResourceUri(AAIObjectType.SERVICE_SUBSCRIPTION, globalSubscriberId, subscriptionServiceType))
310 public ServiceInstance getAAIServiceInstanceById(String serviceInstanceId) {
311 return injectionHelper.getAaiClient()
312 .get(ServiceInstance.class, AAIUriFactory
313 .createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId).depth(Depth.TWO))
317 protected ServiceInstance getAAIServiceInstanceByIdAndCustomer(String globalCustomerId, String serviceType,
318 String serviceInstanceId) {
319 return injectionHelper.getAaiClient().get(ServiceInstance.class, AAIUriFactory
320 .createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustomerId, serviceType, serviceInstanceId)
321 .depth(Depth.TWO)).orElse(null);
324 protected org.onap.aai.domain.yang.ServiceInstances getAAIServiceInstancesByName(String serviceInstanceName,
327 return injectionHelper.getAaiClient()
328 .get(org.onap.aai.domain.yang.ServiceInstances.class,
330 .createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, customer.getGlobalCustomerId(),
331 customer.getServiceSubscription().getServiceType())
332 .queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO))
334 logger.debug("No Service Instance matched by name");
339 public org.onap.aai.domain.yang.ServiceInstance getAAIServiceInstanceByName(String serviceInstanceName,
340 Customer customer) throws Exception {
341 org.onap.aai.domain.yang.ServiceInstance aaiServiceInstance = null;
342 org.onap.aai.domain.yang.ServiceInstances aaiServiceInstances = null;
343 aaiServiceInstances = getAAIServiceInstancesByName(serviceInstanceName, customer);
345 if (aaiServiceInstances == null) {
347 } else if (aaiServiceInstances.getServiceInstance().size() > 1) {
348 throw new Exception("Multiple Service Instances Returned");
350 aaiServiceInstance = aaiServiceInstances.getServiceInstance().get(0);
352 return aaiServiceInstance;
355 protected ServiceInstances getAAIServiceInstancesByName(String globalCustomerId, String serviceType,
356 String serviceInstanceName) {
358 return injectionHelper.getAaiClient()
359 .get(ServiceInstances.class,
361 .createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, globalCustomerId, serviceType)
362 .queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO))
364 logger.debug("No Service Instance matched by name");
369 public Optional<ServiceInstance> getAAIServiceInstanceByName(String globalCustomerId, String serviceType,
370 String serviceInstanceName) throws Exception {
371 ServiceInstance aaiServiceInstance = null;
372 ServiceInstances aaiServiceInstances = null;
373 aaiServiceInstances = getAAIServiceInstancesByName(globalCustomerId, serviceType, serviceInstanceName);
375 if (aaiServiceInstances == null) {
376 return Optional.empty();
377 } else if (aaiServiceInstances.getServiceInstance().size() > 1) {
378 throw new Exception("Multiple Service Instances Returned");
380 aaiServiceInstance = aaiServiceInstances.getServiceInstance().get(0);
382 return Optional.of(aaiServiceInstance);
385 public org.onap.so.db.catalog.beans.InstanceGroup getCatalogInstanceGroup(String modelUUID) {
386 return this.catalogDbClient.getInstanceGroupByModelUUID(modelUUID);
389 public List<CollectionResourceInstanceGroupCustomization> getCollectionResourceInstanceGroupCustomization(
390 String modelCustomizationUUID) {
391 return this.catalogDbClient
392 .getCollectionResourceInstanceGroupCustomizationByModelCustUUID(modelCustomizationUUID);
395 public AAIResultWrapper getAAIResourceDepthOne(AAIResourceUri aaiResourceUri) {
396 AAIResourceUri clonedUri = aaiResourceUri.clone();
397 return this.injectionHelper.getAaiClient().get(clonedUri.depth(Depth.ONE));
400 public AAIResultWrapper getAAIResourceDepthTwo(AAIResourceUri aaiResourceUri) {
401 AAIResourceUri clonedUri = aaiResourceUri.clone();
402 return this.injectionHelper.getAaiClient().get(clonedUri.depth(Depth.TWO));
405 public Configuration getAAIConfiguration(String configurationId) {
406 return this.injectionHelper.getAaiClient()
407 .get(Configuration.class,
408 AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId).depth(Depth.ONE))
410 logger.debug("No Configuration matched by id");
415 public GenericVnf getAAIGenericVnf(String vnfId) {
417 return this.injectionHelper.getAaiClient()
418 .get(GenericVnf.class,
419 AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE))
421 logger.debug("No Generic Vnf matched by id");
426 public VpnBinding getAAIVpnBinding(String vpnBindingId) {
428 return this.injectionHelper.getAaiClient()
429 .get(VpnBinding.class,
430 AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, vpnBindingId).depth(Depth.ONE))
432 logger.debug("No VpnBinding matched by id");
437 public VolumeGroup getAAIVolumeGroup(String cloudOwnerId, String cloudRegionId, String volumeGroupId) {
438 return this.injectionHelper.getAaiClient()
439 .get(VolumeGroup.class, AAIUriFactory
440 .createResourceUri(AAIObjectType.VOLUME_GROUP, cloudOwnerId, cloudRegionId, volumeGroupId)
443 logger.debug("No Generic Vnf matched by id");
448 public VfModule getAAIVfModule(String vnfId, String vfModuleId) {
449 return this.injectionHelper.getAaiClient()
451 AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId).depth(Depth.ONE))
453 logger.debug("No Generic Vnf matched by id");
458 public L3Network getAAIL3Network(String networkId) {
460 return this.injectionHelper.getAaiClient()
461 .get(L3Network.class,
462 AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ONE))
464 logger.debug("No Generic Vnf matched by id");
470 public Optional<ServiceInstance> getRelatedServiceInstanceFromInstanceGroup(String instanceGroupId)
472 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroupId);
473 uri.relatedTo(AAIObjectPlurals.SERVICE_INSTANCE);
474 Optional<ServiceInstances> serviceInstances = injectionHelper.getAaiClient().get(ServiceInstances.class, uri);
475 ServiceInstance serviceInstance = null;
476 if (!serviceInstances.isPresent()) {
477 logger.debug("No ServiceInstances were found");
478 return Optional.empty();
480 if (serviceInstances.get().getServiceInstance().isEmpty()) {
481 throw new NoServiceInstanceFoundException("No ServiceInstances Returned");
482 } else if (serviceInstances.get().getServiceInstance().size() > 1) {
483 throw new MultipleObjectsFoundException("Multiple ServiceInstances Returned");
485 serviceInstance = serviceInstances.get().getServiceInstance().get(0);
487 return Optional.of(serviceInstance);
491 public Optional<L3Network> getRelatedNetworkByNameFromServiceInstance(String serviceInstanceId, String networkName)
493 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
494 uri.relatedTo(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", networkName);
495 Optional<L3Networks> networks = injectionHelper.getAaiClient().get(L3Networks.class, uri);
496 L3Network network = null;
497 if (!networks.isPresent()) {
498 logger.debug("No Networks matched by name");
499 return Optional.empty();
501 if (networks.get().getL3Network().size() > 1) {
502 throw new Exception("Multiple Networks Returned");
504 network = networks.get().getL3Network().get(0);
506 return Optional.of(network);
510 public Optional<GenericVnf> getRelatedVnfByNameFromServiceInstance(String serviceInstanceId, String vnfName)
512 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
513 uri.relatedTo(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName);
514 Optional<GenericVnfs> vnfs = injectionHelper.getAaiClient().get(GenericVnfs.class, uri);
515 GenericVnf vnf = null;
516 if (!vnfs.isPresent()) {
517 logger.debug("No Vnfs matched by name");
518 return Optional.empty();
520 if (vnfs.get().getGenericVnf().size() > 1) {
521 throw new Exception("Multiple Vnfs Returned");
523 vnf = vnfs.get().getGenericVnf().get(0);
525 return Optional.of(vnf);
529 public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVnf(String vnfId, String volumeGroupName)
531 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
532 uri.relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName);
533 Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
534 VolumeGroup volumeGroup = null;
535 if (!volumeGroups.isPresent()) {
536 logger.debug("No VolumeGroups matched by name");
537 return Optional.empty();
539 if (volumeGroups.get().getVolumeGroup().size() > 1) {
540 throw new Exception("Multiple VolumeGroups Returned");
542 volumeGroup = volumeGroups.get().getVolumeGroup().get(0);
544 return Optional.of(volumeGroup);
548 public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVfModule(String vnfId, String vfModuleId,
549 String volumeGroupName) throws Exception {
550 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
551 uri.relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName);
552 Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
553 VolumeGroup volumeGroup = null;
554 if (!volumeGroups.isPresent()) {
555 logger.debug("No VolumeGroups matched by name");
556 return Optional.empty();
558 if (volumeGroups.get().getVolumeGroup().size() > 1) {
559 throw new Exception("Multiple VolumeGroups Returned");
561 volumeGroup = volumeGroups.get().getVolumeGroup().get(0);
563 return Optional.of(volumeGroup);
567 public Optional<org.onap.aai.domain.yang.VpnBinding> getAICVpnBindingFromNetwork(
568 org.onap.aai.domain.yang.L3Network aaiLocalNetwork) {
569 AAIResultWrapper networkWrapper = new AAIResultWrapper(aaiLocalNetwork);
570 if (networkWrapper.getRelationships().isPresent()
571 && !networkWrapper.getRelationships().get().getRelatedUris(AAIObjectType.VPN_BINDING).isEmpty()) {
572 return getAAIResourceDepthOne(
573 networkWrapper.getRelationships().get().getRelatedUris(AAIObjectType.VPN_BINDING).get(0))
574 .asBean(org.onap.aai.domain.yang.VpnBinding.class);
576 return Optional.empty();