Add space to 'Tunnel XConn' 29/49429/3
authorArthur Martella <am153x@att.com>
Tue, 29 May 2018 21:41:52 +0000 (17:41 -0400)
committerArthur Martella <am153x@att.com>
Wed, 30 May 2018 14:46:33 +0000 (10:46 -0400)
Adding space to change TunnelXConn to Tunnel XConn
so that SO will match SDNC.

Change-Id: I2a752fd1c6b3ed115c8a2dafbd47e3ce24f49a57
Issue-ID: SO-650
Signed-off-by: Arthur Martella <am153x@att.com>
adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml

index 450ffd6..b249b58 100644 (file)
@@ -96,8 +96,8 @@ public class QueryAllottedResourceCustomization extends CatalogQuery {
                    put(valueMap, "MODEL_CUSTOMIZATION_UUID", o.getModelCustomizationUuid());
                    put(valueMap, "MODEL_INSTANCE_NAME",      o.getModelInstanceName());
                            put(valueMap, "TOSCA_NODE_TYPE",      arNull ? null : o.getAllottedResource().getToscaNodeType());
-                           put(valueMap, "ALLOTTED_RESOURCE_TYPE",     arNull ? null : o.getAllottedResource().getSubcategory());
-                           put(valueMap, "ALLOTTED_RESOURCE_ROLE",     o.getTargetNetworkRole());
+                           put(valueMap, "ALLOTTED_RESOURCE_TYPE",     o.getNfType());
+                           put(valueMap, "ALLOTTED_RESOURCE_ROLE",     o.getNfRole());
                            put(valueMap, "NF_TYPE",     o.getNfType());
                            put(valueMap, "NF_ROLE",     o.getNfRole());
                            put(valueMap, "NF_FUNCTION",     o.getNfFunction());
index ce117d3..e35e6a0 100644 (file)
@@ -422,7 +422,7 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
             VnfResource vr = it.next()
 
             String role = vr.getNfRole()
-            if (role == "BRG" || role == "TunnelXConn") {
+            if (role == "BRG" || role == "TunnelXConn" || role == "Tunnel XConn") {
                 it.remove()
             }
         }
@@ -456,7 +456,7 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
 
                     utils.log("DEBUG", " getting model info for AllottedResource # :" + allottedResource.toJsonStringNoRootName(), isDebugEnabled)
                     utils.log("DEBUG", " allottedResource.getAllottedResourceType() :" + allottedResource.getAllottedResourceType(), isDebugEnabled)
-                    if ("TunnelXConn".equalsIgnoreCase(allottedResource.getAllottedResourceType())) {
+                    if ("TunnelXConn".equalsIgnoreCase(allottedResource.getAllottedResourceType()) || "Tunnel XConn".equalsIgnoreCase(allottedResource.getAllottedResourceType())) {
                         //set create flag to true
                         execution.setVariable("createTXCAR", true)
                         ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
index aa16d3b..08edb88 100644 (file)
@@ -242,8 +242,8 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
                                        \r
                                        if(isBlank(type) || isBlank(id)) {\r
                                                \r
-                                       } else if(type == "TunnelXConn") {\r
-                                               utils.log("DEBUG","TunnelXConn AR found", isDebugEnabled)\r
+                                       } else if(type == "TunnelXConn" || type == "Tunnel XConn") {\r
+                                               utils.log("DEBUG","Tunnel XConn AR found", isDebugEnabled)\r
                                                TXC_found = true\r
                                                TXC_id = id\r
                                                \r
index a735121..a8401d7 100644 (file)
@@ -469,7 +469,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
                verify(mex).setVariable("createTXCAR", true)
                verify(mex).setVariable("allottedResourceModelInfoTXC", "modelB")
                verify(mex).setVariable("allottedResourceRoleTXC", "TXCr")
-               verify(mex).setVariable("allottedResourceTypeTXC", "TunnelXConn")
+               verify(mex).setVariable("allottedResourceTypeTXC", "Tunnel XConn")
                verify(mex).setVariable("parentServiceInstanceIdTXC", "homeB")
        }
                        
@@ -489,7 +489,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
                verify(mex, never()).setVariable("createTXCAR", true)
                verify(mex, never()).setVariable("allottedResourceModelInfoTXC", "modelB")
                verify(mex, never()).setVariable("allottedResourceRoleTXC", "TXCr")
-               verify(mex, never()).setVariable("allottedResourceTypeTXC", "TunnelXConn")
+               verify(mex, never()).setVariable("allottedResourceTypeTXC", "Tunnel XConn")
                verify(mex, never()).setVariable("parentServiceInstanceIdTXC", "homeB")
        }
                        
@@ -1087,7 +1087,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
        private ServiceDecomposition initFilterVnfs(ExecutionEntity mex) {
                List<VnfResource> vnflst = new LinkedList<>()
                vnflst.add(makeVnf("", "BRG"))
-               vnflst.add(makeVnf("2", "TunnelXConn"))
+               vnflst.add(makeVnf("2", "Tunnel XConn"))
                vnflst.add(makeVnf("3", ""))
                vnflst.add(makeVnf("4", "BRG"))
                vnflst.add(makeVnf("5", "other"))
@@ -1149,7 +1149,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
                HomingSolution home = mock(HomingSolution.class)
                
                when(ar.toJsonStringNoRootName()).thenReturn("json"+id)
-               when(ar.getAllottedResourceType()).thenReturn("TunnelXConn")
+               when(ar.getAllottedResourceType()).thenReturn("Tunnel XConn")
                when(ar.getModelInfo()).thenReturn(mod)
                when(ar.getAllottedResourceRole()).thenReturn("TXCr")
                when(ar.getHomingSolution()).thenReturn(home)
@@ -1186,7 +1186,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
                vnflst.add(makeVnf("A", "BRG"))
                vnflst.add(makeVnf("B", ""))
                vnflst.add(makeVnf("C", ""))
-               vnflst.add(makeVnf("D", "TunnelXConn"))
+               vnflst.add(makeVnf("D", "Tunnel XConn"))
                
                when(mex.getVariable(DBGFLAG)).thenReturn("true")
                when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
index bb7f4c2..f206344 100644 (file)
@@ -1,9 +1,9 @@
 <allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
    <id>ar-1</id>
    <orchestration-status>Active</orchestration-status>
-   <role>TunnelXConn</role>
-   <type>TunnelXConn</type>
-   <description>TunnelXConn</description>
+   <role>Tunnel XConn</role>
+   <type>Tunnel XConn</type>
+   <description>Tunnel XConn</description>
    <selflink/>
    <resource-version>1490627351232</resource-version>
    <relationship-list>
index 81fdcc7..e99dd9c 100644 (file)
@@ -63,8 +63,8 @@
                                "modelInstanceName"      : "Pri_IP_MUX_Demux 1"
                        },
                        "toscaNodeType"              : null,
-                       "allottedResourceType"              : "TunnelXConn",
-                       "allottedResourceRole"              : "TunnelXConn",
+                       "allottedResourceType"              : "Tunnel XConn",
+                       "allottedResourceRole"              : "Tunnel XConn",
                        "providingServiceModelInvariantUuid"              : null,
                        "nfFunction"              : null,
                        "nfType"              : null,
index 65cee9f..97992fc 100644 (file)
@@ -1,9 +1,9 @@
 <allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
    <id>ar-txcA</id>
    <orchestration-status>Active</orchestration-status>
-   <role>TunnelXConn</role>
-   <type>TunnelXConn</type>
-   <description>TunnelXConn</description>
+   <role>Tunnel XConn</role>
+   <type>Tunnel XConn</type>
+   <description>Tunnel XConn</description>
    <selflink/>
    <resource-version>1490627351232</resource-version>
    <relationship-list>
index bb7f4c2..f206344 100644 (file)
@@ -1,9 +1,9 @@
 <allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
    <id>ar-1</id>
    <orchestration-status>Active</orchestration-status>
-   <role>TunnelXConn</role>
-   <type>TunnelXConn</type>
-   <description>TunnelXConn</description>
+   <role>Tunnel XConn</role>
+   <type>Tunnel XConn</type>
+   <description>Tunnel XConn</description>
    <selflink/>
    <resource-version>1490627351232</resource-version>
    <relationship-list>
index bb7f4c2..f206344 100644 (file)
@@ -1,9 +1,9 @@
 <allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
    <id>ar-1</id>
    <orchestration-status>Active</orchestration-status>
-   <role>TunnelXConn</role>
-   <type>TunnelXConn</type>
-   <description>TunnelXConn</description>
+   <role>Tunnel XConn</role>
+   <type>Tunnel XConn</type>
+   <description>Tunnel XConn</description>
    <selflink/>
    <resource-version>1490627351232</resource-version>
    <relationship-list>