summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src')
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js2
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html6
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AAIServiceIntegrativeTest.java1
-rw-r--r--vid-app-common/src/test/resources/responses/aai/l3-networks-by-cloud-region-and-tenantId.json300
4 files changed, 305 insertions, 4 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
index 3b5384e14..a7f7e9128 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
@@ -50,7 +50,7 @@ var vfModuleActionModalController = function(COMPONENT, FIELD, $scope, $uibModal
DataService.setCloudRegionTenantList(response);
$scope.lcpAndTenant = response;
$scope.isFeatureFlagCloudOwner = featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST);
- $scope.lcpRegionList = _.uniqBy(response, 'cloudRegionId');
+ $scope.lcpRegionList = _.uniqBy(response, 'cloudRegionOptionId');
$scope.vendorInCloudOwnerRegex = /^[^-]*-/;
});
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html
index eb67e6ed9..3fbe07e83 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html
@@ -58,11 +58,11 @@
data-tests-id="lcpRegion" data-ng-model="regionSelection.lcpRegion"
data-ng-change="regionSelection.tenant = null; regionSelection.legacyRegion = null;">
<option class="lcp-region-placeholder" value="" selected>Select LCP Region</option>
- <option ng-repeat="option in lcpRegionList" value="{{option.cloudRegionId}}"
+ <option ng-repeat="option in lcpRegionList" value="{{option.cloudRegionOptionId}}"
data-ng-if="option.isPermitted && !isFeatureFlagCloudOwner">{{option.cloudRegionId}}
</option>
- <option ng-repeat="option in lcpRegionList" value="{{option.cloudRegionId}}"
+ <option ng-repeat="option in lcpRegionList" value="{{option.cloudRegionOptionId}}"
data-ng-if="option.isPermitted && isFeatureFlagCloudOwner">
{{option.cloudRegionId}} ({{removeVendorFromCloudOwner(option.cloudOwner).toUpperCase()}})
</option>
@@ -81,7 +81,7 @@
data-tests-id="tenant" data-ng-model="regionSelection.tenant">
<option class="tenant-placeholder" value="" selected>Select Tenant Name</option>
<option ng-repeat="option in lcpAndTenant" class="tenantOption" value="{{option.tenantId}}"
- data-ng-if="option.isPermitted && option.cloudRegionId === regionSelection.lcpRegion">{{option.tenantName}}
+ data-ng-if="option.isPermitted && option.cloudRegionOptionId === regionSelection.lcpRegion">{{option.tenantName}}
</option>
</select>
</div>
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AAIServiceIntegrativeTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AAIServiceIntegrativeTest.java
index 28c844cda..a159efd30 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AAIServiceIntegrativeTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AAIServiceIntegrativeTest.java
@@ -160,6 +160,7 @@ public class AAIServiceIntegrativeTest extends TestWithAaiClient {
aaiServiceWithoutMocks.getVpnListByVpnType("aaa");
}
+ @Test
public void getNetworkListTest_successResponse() {
String rawResponse = TestUtils.readFileAsString("/responses/aai/l3-networks-by-cloud-region-and-tenantId.json");
final ResponseWithRequestInfo responseWithRequestInfo = mockedResponseWithRequestInfo(Response.Status.OK,
diff --git a/vid-app-common/src/test/resources/responses/aai/l3-networks-by-cloud-region-and-tenantId.json b/vid-app-common/src/test/resources/responses/aai/l3-networks-by-cloud-region-and-tenantId.json
new file mode 100644
index 000000000..01ed853b5
--- /dev/null
+++ b/vid-app-common/src/test/resources/responses/aai/l3-networks-by-cloud-region-and-tenantId.json
@@ -0,0 +1,300 @@
+{
+ "results": [
+ {
+ "l3-network": {
+ "network-id": "CC-l3network_1",
+ "is-bound-to-vpn": false,
+ "resource-version": "1556206041065",
+ "is-provider-network": false,
+ "is-shared-network": false,
+ "is-external-network": false,
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v17/cloud-infrastructure/cloud-regions/cloud-region/cloud-owner-CC-ANAI-528/cloud-region-id-CC-ANAI-528/tenants/tenant/tenant-id-CC-ANAI-528T1",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "cloud-owner-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "cloud-region-id-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "tenant-id-CC-ANAI-528T1"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "tenant-name-CC-ANAI-528T1"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "l3-network": {
+ "network-id": "CC-l3network_3",
+ "network-name": "DLLSTXRNDS3",
+ "network-role": "Backup",
+ "is-bound-to-vpn": true,
+ "resource-version": "1556139217403",
+ "is-provider-network": false,
+ "is-shared-network": false,
+ "is-external-network": false,
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v17/cloud-infrastructure/cloud-regions/cloud-region/cloud-owner-CC-ANAI-528/cloud-region-id-CC-ANAI-528/tenants/tenant/tenant-id-CC-ANAI-528T1",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "cloud-owner-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "cloud-region-id-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "tenant-id-CC-ANAI-528T1"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "tenant-name-CC-ANAI-528T1"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v17/cloud-infrastructure/cloud-regions/cloud-region/cloud-owner-CC-ANAI-528/cloud-region-id-CC-ANAI-528/tenants/tenant/tenant-id-CC-ANAI-528-T2",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "cloud-owner-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "cloud-region-id-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "tenant-id-CC-ANAI-528-T2"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "tenant-name-CC-ANAI-528T2"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v17/cloud-infrastructure/cloud-regions/cloud-region/cloud-owner-CC-ANAI-528/cloud-region-id-CC-ANAI-528/tenants/tenant/tenant-id-CC-ANAI-528T3",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "cloud-owner-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "cloud-region-id-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "tenant-id-CC-ANAI-528T3"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "tenant-name-CC-ANAI-528T3"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "l3-network": {
+ "network-id": "l3network2-550-as988q",
+ "network-name": "CHICGIL01VDBE01_SubIntNtwk043",
+ "network-type": "K6VD",
+ "network-role": "X92XE0j",
+ "network-technology": "ZYbPEnCjX6Oqd",
+ "neutron-network-id": "fpFvDje",
+ "is-bound-to-vpn": false,
+ "service-id": "NJnzYaRlz0Test",
+ "network-role-instance": 162,
+ "resource-version": "1556823012443",
+ "orchestration-status": "active",
+ "heat-stack-id": "0GmDeg",
+ "mso-catalog-key": "la5ylhZ5g0D",
+ "contrail-network-fqdn": "EaeexDk47",
+ "model-customization-id": "wgmn6PrJ5",
+ "widget-model-id": "e0yNr",
+ "widget-model-version": "yKpry3J0VVLn",
+ "physical-network-name": "wq6OKbZMTY",
+ "is-provider-network": false,
+ "is-shared-network": false,
+ "is-external-network": false,
+ "selflink": "9xtMu4EPuTi",
+ "operational-status": "W8aj",
+ "is-trunked": true,
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v17/cloud-infrastructure/cloud-regions/cloud-region/cloud-owner-CC-ANAI-528/cloud-region-id-CC-ANAI-528/tenants/tenant/tenant-id-CC-ANAI-528T1",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "cloud-owner-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "cloud-region-id-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "tenant-id-CC-ANAI-528T1"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "tenant-name-CC-ANAI-528T1"
+ }
+ ]
+ },
+ {
+ "related-to": "configuration",
+ "relationship-label": "org.onap.relationships.inventory.PartOf",
+ "related-link": "/aai/v17/network/configurations/configuration/configuration2-550-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "configuration.configuration-id",
+ "relationship-value": "configuration2-550-as988q"
+ }
+ ]
+ },
+ {
+ "related-to": "configuration",
+ "relationship-label": "org.onap.relationships.inventory.PartOf",
+ "related-link": "/aai/v17/network/configurations/configuration/configuration1-550-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "configuration.configuration-id",
+ "relationship-value": "configuration1-550-as988q"
+ }
+ ]
+ },
+ {
+ "related-to": "vpn-binding",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v17/network/vpn-bindings/vpn-binding/VPNbinding3-550-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "VPNbinding3-550-as988q"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "SZ2A5L_VPNTest"
+ },
+ {
+ "property-key": "vpn-binding.vpn-type",
+ "property-value": "1903e94v"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "l3-network": {
+ "network-id": "CC-l3network_2",
+ "network-name": "DLLSTXRNDS2",
+ "network-role": "Primary",
+ "is-bound-to-vpn": true,
+ "resource-version": "1556136783141",
+ "is-provider-network": true,
+ "is-shared-network": true,
+ "is-external-network": true,
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v17/cloud-infrastructure/cloud-regions/cloud-region/cloud-owner-CC-ANAI-528/cloud-region-id-CC-ANAI-528/tenants/tenant/tenant-id-CC-ANAI-528T1",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "cloud-owner-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "cloud-region-id-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "tenant-id-CC-ANAI-528T1"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "tenant-name-CC-ANAI-528T1"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v17/cloud-infrastructure/cloud-regions/cloud-region/cloud-owner-CC-ANAI-528/cloud-region-id-CC-ANAI-528/tenants/tenant/tenant-id-CC-ANAI-528-T2",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "cloud-owner-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "cloud-region-id-CC-ANAI-528"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "tenant-id-CC-ANAI-528-T2"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "tenant-name-CC-ANAI-528T2"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+} \ No newline at end of file