aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp
diff options
context:
space:
mode:
authorBancala, Ben (bb3476) <bb3476@att.com>2018-05-03 11:50:13 -0400
committerRob Daugherty <rd472p@att.com>2018-05-04 17:31:05 +0000
commit18463785dabe925f7e76f21f28fa7551c7d559e1 (patch)
tree5c321f814871c384f0f3975ea1462f6dd53e10cc /bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp
parent3ee4ec41ac18e51a16eafa767e090502b1a33fb5 (diff)
fixed bug in createvnfinfra bpmn
Change-Id: I3e27ec0d1487eb68e8c54d27508b58233bf49808 Issue-ID: SO-602 Signed-off-by: Bancala, Ben (bb3476) <bb3476@att.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/aai/AAICreateResources.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/aai/AAICreateResources.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/aai/AAICreateResources.java
index 93ba0ae5a4..3d05f76b03 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/aai/AAICreateResources.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/aai/AAICreateResources.java
@@ -24,8 +24,10 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
+import org.onap.aai.domain.yang.v12.GenericVnf;
import org.openecomp.mso.client.aai.AAIObjectType;
import org.openecomp.mso.client.aai.AAIResourcesClient;
+import org.openecomp.mso.client.aai.entities.AAIResultWrapper;
import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
@@ -81,4 +83,16 @@ public class AAICreateResources {
aaiRC.createIfNotExists(serviceInstanceURI, Optional.empty());
}
+ public Optional<GenericVnf> getVnfInstance(String vnfId){
+ try{
+ AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+ AAIResourcesClient aaiRC = new AAIResourcesClient();
+ AAIResultWrapper aaiResponse = aaiRC.get(vnfURI);
+ Optional<GenericVnf> vnf = aaiResponse.asBean(GenericVnf.class);
+ return vnf;
+ } catch (Exception ex){
+ return Optional.empty();
+ }
+ }
+
}