aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java
diff options
context:
space:
mode:
authorBenjamin, Max <max.benjamin@att.com>2020-03-16 12:01:26 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-03-16 12:01:26 -0400
commita577f75663e5c8ccddee54337328425c5b2361d2 (patch)
tree3d666976eb291a0e1f558174bfa2341709ae6956 /adapters/mso-openstack-adapters/src/main/java
parent7e2f7db5b4007fe470a7ce5794c88d1844021410 (diff)
split single and plural graph inventory uris
split single and plural graph inventory uris updated all object references in MSO using graph inventory plurals corrected unit test stubbings added additional unit tests correct interfaces to return plural after related-to modified the way http aware uris are built reformated interfaces to no longer duplicate methods corrected issues with identity of unbuilt uris removed AAIUri references from groovy files fixed clone behavior on Uri objects Issue-ID: SO-2743 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I37aa2a13dcbf010b6c82ad73af3be5db5d9bd673
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditVServer.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditVServer.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditVServer.java
index 35008b6120..585e001f1a 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditVServer.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditVServer.java
@@ -24,9 +24,13 @@ import java.util.List;
import java.util.Optional;
import java.util.Set;
import org.onap.aai.domain.yang.LInterface;
+import org.onap.aai.domain.yang.VfModule;
+import org.onap.aai.domain.yang.VfModules;
import org.onap.aai.domain.yang.Vserver;
import org.onap.so.client.aai.AAIObjectPlurals;
import org.onap.so.client.aai.AAIObjectType;
+import org.onap.so.client.aai.entities.AAIResultWrapper;
+import org.onap.so.client.aai.entities.uri.AAIPluralResourceUri;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
@@ -53,11 +57,12 @@ public class AuditVServer extends AbstractAudit {
public Optional<AAIObjectAuditList> auditVserversThroughRelationships(String genericVnfId, String vfModuleName) {
AAIObjectAuditList auditList = new AAIObjectAuditList();
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, genericVnfId)
+ AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, genericVnfId)
.queryParam("vf-module-name", vfModuleName);
- if (getAaiClient().get(uri).getRelationships().isPresent()) {
+ Optional<AAIResultWrapper> wrapper = getAaiClient().getFirstWrapper(VfModules.class, VfModule.class, uri);
+ if (wrapper.isPresent() && wrapper.get().getRelationships().isPresent()) {
List<AAIResourceUri> relatedVservers =
- getAaiClient().get(uri).getRelationships().get().getRelatedUris(AAIObjectType.VSERVER);
+ wrapper.get().getRelationships().get().getRelatedUris(AAIObjectType.VSERVER);
if (!relatedVservers.isEmpty()) {
relatedVservers.forEach(vserverUri -> {
Optional<Vserver> vserver = getAaiClient().get(vserverUri).asBean(Vserver.class);