removed retired A&AI versions from codebase 16/75716/1
authorBenjamin, Max (mb388a) <mb388a@us.att.com>
Sat, 12 Jan 2019 02:48:00 +0000 (21:48 -0500)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Sat, 12 Jan 2019 02:48:15 +0000 (21:48 -0500)
removed retired A&AI versions from codebase

Change-Id: I3e0a185ad1020c91be2fa3df7a509fde2a83c4cd
Issue-ID: SO-1385
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy
bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java
common/src/main/java/org/onap/so/client/aai/AAIVersion.java
common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java

index 1fa10a5..55f68f6 100644 (file)
@@ -57,7 +57,7 @@ class CreateAAIVfModuleTest extends MsoGroovyTest{
        private static final String VNF_PERSONAL_MODEL_VER = "14"
        private static final String VF_MODULE_NAME = "modTestName"
        private static final String VF_MODULE_MODEL_NAME = "modModelNameTest"
-       private static final String DEFAULT_AAI_VERSION = "9"
+       private static final String DEFAULT_AAI_VERSION = "14"
        private static final String DEFAULT_AAI_NAMESPACE = "defaultTestNamespace"
 
     @Spy
index efabdb1..09ffc0e 100644 (file)
@@ -101,38 +101,14 @@ mso:
     default:
       aai:
         cloud-region:
-          version: '9'
+          version: '14'
         generic-vnf:
-          version: '9'
-        v8:
-          customer:
-            uri: /aai/v8/business/customers/customer
-          generic-query:
-            uri: /aai/v8/search/generic-query
-          l3-network:
-            uri: /aai/v8/network/l3-networks/l3-network
-          network-policy:
-            uri: /aai/v8/network/network-policies/network-policy
-          nodes-query:
-            uri: /aai/v8/search/nodes-query
-          route-table-reference:
-            uri: /aai/v8/network/route-table-references/route-table-reference
-          tenant:
-            uri: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/AAIAIC25/tenants/tenant
-          vce:
-            uri: /aai/v8/network/vces/vce
-          vpn-binding:
-            uri: /aai/v8/network/vpn-bindings/vpn-binding
-        v9:
-          cloud-region:
-            uri: /aai/v9/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner
-          generic-vnf:
-            uri: /aai/v9/network/generic-vnfs/generic-vnf
+          version: '14'
     global:
       default:
         aai:
           namespace: http://org.openecomp.aai.inventory/
-          version: '8'
+          version: '14'
     message:
       endpoint: http://localhost:${wiremock.server.port}/mso/WorkflowMesssage
     notification:
index 813421f..c11b297 100644 (file)
@@ -39,14 +39,13 @@ import org.onap.so.client.graphinventory.Format;
 
 public class AAIRestClientImpl implements AAIRestClientI {
 
-    private static final AAIVersion ENDPOINT_VERSION = AAIVersion.V10;
     private static final String PSERVER_VNF_QUERY = "pservers-fromVnf";
 
     @Override
     public List<Pserver> getPhysicalServerByVnfId(String vnfId) throws IOException {
         List<AAIResourceUri> startNodes = new ArrayList<>();
         startNodes.add(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
-        String jsonInput = new AAIQueryClient(ENDPOINT_VERSION)
+        String jsonInput = new AAIQueryClient()
                 .query(Format.RESOURCE, new CustomQuery(startNodes, PSERVER_VNF_QUERY));
 
         return this.getListOfPservers(jsonInput);
@@ -69,20 +68,20 @@ public class AAIRestClientImpl implements AAIRestClientI {
     public void updateMaintenceFlagVnfId(String vnfId, boolean inMaint, String transactionLoggingUuid) {
         GenericVnf genericVnf = new GenericVnf();
         genericVnf.setInMaint(inMaint);
-        new AAIResourcesClient(ENDPOINT_VERSION)
+        new AAIResourcesClient()
                 .update(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId), genericVnf);
 
     }
 
     @Override
     public GenericVnf getVnfByName(String vnfId) {
-        return new AAIResourcesClient(ENDPOINT_VERSION)
+        return new AAIResourcesClient()
                 .get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)).orElse(null);
     }
 
     @Override
     public Optional<Pnf> getPnfByName(String pnfId, String transactionLoggingUuid) {
-        Response response = new AAIResourcesClient(ENDPOINT_VERSION)
+        Response response = new AAIResourcesClient()
                 .getFullResponse(AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfId));
         if (response.getStatus() != 200) {
             return Optional.empty();
@@ -93,7 +92,7 @@ public class AAIRestClientImpl implements AAIRestClientI {
 
     @Override
     public void createPnf(String pnfId, String transactionLoggingUuid, Pnf pnf) {
-        new AAIResourcesClient(ENDPOINT_VERSION)
+        new AAIResourcesClient()
                 .createIfNotExists(AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfId), Optional.of(pnf));
     }
 }
index de418f3..d93d656 100644 (file)
@@ -23,13 +23,9 @@ package org.onap.so.client.aai;
 import org.onap.so.client.graphinventory.GraphInventoryVersion;
 
 public enum AAIVersion implements GraphInventoryVersion {
-       V8("v8"),
-       V9("v9"), 
-       V10("v10"), 
-       V11("v11"), 
-       V12("v12"),
        V13("v13"),
-       V14("v14");
+       V14("v14"),
+       V15("v15");
        
        public final static AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1];
        private final String value;
index b11003e..5951928 100644 (file)
@@ -53,7 +53,7 @@ public class SDNOValidatorImpl implements SDNOValidator {
        public boolean healthDiagnostic(String vnfId, UUID uuid, String requestingUserId) throws IOException, Exception {
                
                AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
-               AAIResourcesClient client = new AAIResourcesClient(AAIVersion.V10);
+               AAIResourcesClient client = new AAIResourcesClient();
                GenericVnf vnf = client.get(GenericVnf.class, uri).orElseThrow(() -> new NotFoundException(vnfId + " not found in A&AI"));
                
                SDNO requestDiagnostic = buildRequestDiagnostic(vnf, uuid, requestingUserId);