summaryrefslogtreecommitdiffstats
path: root/test/placement-tests
diff options
context:
space:
mode:
authorAnkitkumar Patel <ankit@research.att.com>2018-02-11 17:51:13 -0500
committerAnkitkumar Patel <ankit@research.att.com>2018-02-11 17:52:51 -0500
commit0b855c08fd98fb8fa0f4bc40d8df430c897b4bad (patch)
treeefdd3c7ab31be64080dd71951a64d13f0ba493de /test/placement-tests
parentbb8471cae394aa6ff0af8ba3e5354f3b121c56fc (diff)
Re-org folders, onboard test folder, test config
Reorganized the folder structure. Onboarded testcases. Added test config. Issue-ID: OPTFRA-74 Change-Id: I97882a162a405a18ffd287495039e15ae9d0ad7b Signed-off-by: Ankitkumar Patel <ankit@research.att.com>
Diffstat (limited to 'test/placement-tests')
-rw-r--r--test/placement-tests/request.json87
-rw-r--r--test/placement-tests/request_mso.json63
-rw-r--r--test/placement-tests/request_mso_subs_name_blank.json63
-rw-r--r--test/placement-tests/request_mso_subs_name_default.json63
-rw-r--r--test/placement-tests/request_mso_subs_name_none.json62
-rw-r--r--test/placement-tests/request_mso_subs_name_null.json63
-rw-r--r--test/placement-tests/request_vCPE.json105
-rw-r--r--test/placement-tests/scopePolicies.json21
-rw-r--r--test/placement-tests/testScoperequest.json144
-rw-r--r--test/placement-tests/test_by_scope.yaml20
-rw-r--r--test/placement-tests/vnfGroupPolicies.txt197
11 files changed, 888 insertions, 0 deletions
diff --git a/test/placement-tests/request.json b/test/placement-tests/request.json
new file mode 100644
index 0000000..2fd425c
--- /dev/null
+++ b/test/placement-tests/request.json
@@ -0,0 +1,87 @@
+{
+ "requestInfo": {
+ "transactionId": "xxx-xxx-xxxx",
+ "requestId": "yyy-yyy-yyyy",
+ "callbackUrl": "https://test.url.com:5000/callback/",
+ "sourceId": "so",
+ "optimizers": ["placement"],
+ "numSolutions": 1,
+ "timeout": 600
+ },
+ "placementInfo": {
+ "serviceModelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "fad5f4d5-1c94-4890-927d-9cec6e82997f",
+ "modelVersionId": "6e13c5e1-f172-436c-9cc4-0d64c94eb7f4",
+ "modelName": "vCPE",
+ "modelVersion": "1.0"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "SUB12_0325_UD_0833",
+ "subscriberName": "SUB_12_0325_UD_0833",
+ "subscriberCommonSiteId": "DALTX0101"
+ },
+ "demandInfo": {
+ "placementDemand": [{
+ "resourceInstanceType": "allotted",
+ "serviceResourceId": "61d563e8-e714-4393-8f99-cc480144a05e",
+ "resourceModuleName": "vGMuxInfra",
+ "exclusionCandidateInfo": [{
+ "candidateType": "cloud",
+ "candidates": ["MDT54NJ", "BDM78NJ"]
+ }, {
+ "candidateType": "service",
+ "candidates": ["RT76U8F789", "PO098HJG"]
+ }
+ ],
+ "requiredCandidateInfo": [{
+ "candidateType": "cloud",
+ "candidates": ["DHU87NY"]
+ }, {
+ "candidateType": "service",
+ "candidates": ["YHT675YH"]
+ }
+ ],
+ "resourceModelInfo": {
+ "modelCustomizationId": "",
+ "modelInvariantId": "h59988ce-3d81-4e07-81b5-53d3aa821134",
+ "modelName": "",
+ "modelVersion": "2.0",
+ "modelVersionId": "51d563e8-e714-4393-8f99-cc480144a05e",
+ "modelType": "allotted"
+ },
+ "tenantId": "",
+ "tenantName": ""
+ }, {
+ "resourceInstanceType": "allotted",
+ "serviceResourceId": "71d563e8-e714-4393-8f99-cc480144a05e",
+ "resourceModuleName": "vG",
+ "resourceModelInfo": {
+ "modelCustomizationId": "",
+ "modelInvariantId": "a59988ce-3d81-4e07-81b5-53d3aa821134",
+ "modelName": "",
+ "modelVersion": "2.0",
+ "modelVersionId": "91d563e8-e714-4393-8f99-cc480144a05e",
+ "modelType": "allotted"
+ },
+ "tenantId": "",
+ "tenantName": ""
+ }
+ ],
+ "licenseDemand": []
+ },
+ "policyId": [
+ ""
+ ],
+ "serviceInstanceId": "1234-fsdf-23sdf-24kjnk",
+ "requestParameters": {
+
+ "commonSiteId": "DALTX0101",
+ "vendorName": "xyz",
+ "e2eVpnKey": "200",
+ "vcpeHostName": "USOSTCDALTX0101UJZZ11"
+
+ }
+
+ }
+} \ No newline at end of file
diff --git a/test/placement-tests/request_mso.json b/test/placement-tests/request_mso.json
new file mode 100644
index 0000000..2d854cb
--- /dev/null
+++ b/test/placement-tests/request_mso.json
@@ -0,0 +1,63 @@
+{
+ "requestInfo": {
+ "transactionId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "requestId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "callbackUrl": "http://127.0.0.1:7001",
+ "sourceId": "mso",
+ "optimizer": [
+ "placement",
+ "license"
+ ],
+ "numSolutions": 1,
+ "timeout": 600
+ },
+ "placementInfo": {
+ "serviceModelInfo": {
+ "modelType": "",
+ "modelInvariantId": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
+ "modelVersionId": "b8c45108-68df-48c5-8d58-c8dd4de833bb",
+ "modelName": "ADIOD vMX vPE_BV Service 488",
+ "modelVersion": "1.0"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "21014aa2-526b-11e6-beb8-9e71128cae77",
+ "subscriberName": "Avteet_Chayal",
+ "subscriberCommonSiteId": "MDTWNJ2B17"
+ },
+ "demandInfo": {
+ "placementDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ },
+ "tenantId": "",
+ "tenantName": ""
+ }
+ ],
+ "licenseDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ }
+ }
+ ]
+ },
+ "policyId": [],
+ "serviceInstanceId": "28014cbe-b334-4d5c-839d-980157929b0b",
+ "orderInfo": "{\"requestParameters\": {\"aLaCarte\":false,\"usePreload\":true,\"subscriptionServiceType\":\"VPE\",\"alaCarteSet\":true,\"rebuildVolumeGroups\":false,\"userParams\":[{\"name\":\"2017488_adiodvpe0_vnf_config_template_version\",\"value\":\"17.2\"},{\"name\":\"2017488_adiodvpe0_bandwidth_units\",\"value\":\"Gbps\"},{\"name\":\"2017488_adiodvpe0_bandwidth\",\"value\":\"10\"},{\"name\":\"2017488_adiodvpe0_AIC_CLLI\",\"value\":\"MDTWNJ2B17\"},{\"name\":\"2017488_adiodvpe0_vnf_instance_name\",\"value\":\"mtnj309me6\"}],\"autoBuildVfModules\":false,\"cascadeDelete\":false}}"
+ }
+}
diff --git a/test/placement-tests/request_mso_subs_name_blank.json b/test/placement-tests/request_mso_subs_name_blank.json
new file mode 100644
index 0000000..3195786
--- /dev/null
+++ b/test/placement-tests/request_mso_subs_name_blank.json
@@ -0,0 +1,63 @@
+{
+ "requestInfo": {
+ "transactionId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "requestId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "callbackUrl": "http://127.0.0.1:7001",
+ "sourceId": "mso",
+ "optimizer": [
+ "placement",
+ "license"
+ ],
+ "numSolutions": 1,
+ "timeout": 600
+ },
+ "placementInfo": {
+ "serviceModelInfo": {
+ "modelType": "",
+ "modelInvariantId": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
+ "modelVersionId": "b8c45108-68df-48c5-8d58-c8dd4de833bb",
+ "modelName": "ADIOD vMX vPE_BV Service 488",
+ "modelVersion": "1.0"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "21014aa2-526b-11e6-beb8-9e71128cae77",
+ "subscriberName": "",
+ "subscriberCommonSiteId": "MDTWNJ2B17"
+ },
+ "demandInfo": {
+ "placementDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ },
+ "tenantId": "",
+ "tenantName": ""
+ }
+ ],
+ "licenseDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ }
+ }
+ ]
+ },
+ "policyId": [],
+ "serviceInstanceId": "28014cbe-b334-4d5c-839d-980157929b0b",
+ "orderInfo": "{\"requestParameters\": {\"aLaCarte\":false,\"usePreload\":true,\"subscriptionServiceType\":\"VPE\",\"alaCarteSet\":true,\"rebuildVolumeGroups\":false,\"userParams\":[{\"name\":\"2017488_adiodvpe0_vnf_config_template_version\",\"value\":\"17.2\"},{\"name\":\"2017488_adiodvpe0_bandwidth_units\",\"value\":\"Gbps\"},{\"name\":\"2017488_adiodvpe0_bandwidth\",\"value\":\"10\"},{\"name\":\"2017488_adiodvpe0_AIC_CLLI\",\"value\":\"MDTWNJ2B17\"},{\"name\":\"2017488_adiodvpe0_vnf_instance_name\",\"value\":\"mtnj309me6\"}],\"autoBuildVfModules\":false,\"cascadeDelete\":false}}"
+ }
+}
diff --git a/test/placement-tests/request_mso_subs_name_default.json b/test/placement-tests/request_mso_subs_name_default.json
new file mode 100644
index 0000000..86e2f82
--- /dev/null
+++ b/test/placement-tests/request_mso_subs_name_default.json
@@ -0,0 +1,63 @@
+{
+ "requestInfo": {
+ "transactionId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "requestId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "callbackUrl": "http://127.0.0.1:7001",
+ "sourceId": "mso",
+ "optimizer": [
+ "placement",
+ "license"
+ ],
+ "numSolutions": 1,
+ "timeout": 600
+ },
+ "placementInfo": {
+ "serviceModelInfo": {
+ "modelType": "",
+ "modelInvariantId": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
+ "modelVersionId": "b8c45108-68df-48c5-8d58-c8dd4de833bb",
+ "modelName": "ADIOD vMX vPE_BV Service 488",
+ "modelVersion": "1.0"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "21014aa2-526b-11e6-beb8-9e71128cae77",
+ "subscriberName": "default",
+ "subscriberCommonSiteId": "MDTWNJ2B17"
+ },
+ "demandInfo": {
+ "placementDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ },
+ "tenantId": "",
+ "tenantName": ""
+ }
+ ],
+ "licenseDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ }
+ }
+ ]
+ },
+ "policyId": [],
+ "serviceInstanceId": "28014cbe-b334-4d5c-839d-980157929b0b",
+ "orderInfo": "{\"requestParameters\": {\"aLaCarte\":false,\"usePreload\":true,\"subscriptionServiceType\":\"VPE\",\"alaCarteSet\":true,\"rebuildVolumeGroups\":false,\"userParams\":[{\"name\":\"2017488_adiodvpe0_vnf_config_template_version\",\"value\":\"17.2\"},{\"name\":\"2017488_adiodvpe0_bandwidth_units\",\"value\":\"Gbps\"},{\"name\":\"2017488_adiodvpe0_bandwidth\",\"value\":\"10\"},{\"name\":\"2017488_adiodvpe0_AIC_CLLI\",\"value\":\"MDTWNJ2B17\"},{\"name\":\"2017488_adiodvpe0_vnf_instance_name\",\"value\":\"mtnj309me6\"}],\"autoBuildVfModules\":false,\"cascadeDelete\":false}}"
+ }
+}
diff --git a/test/placement-tests/request_mso_subs_name_none.json b/test/placement-tests/request_mso_subs_name_none.json
new file mode 100644
index 0000000..214e011
--- /dev/null
+++ b/test/placement-tests/request_mso_subs_name_none.json
@@ -0,0 +1,62 @@
+{
+ "requestInfo": {
+ "transactionId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "requestId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "callbackUrl": "http://127.0.0.1:7001",
+ "sourceId": "mso",
+ "optimizer": [
+ "placement",
+ "license"
+ ],
+ "numSolutions": 1,
+ "timeout": 600
+ },
+ "placementInfo": {
+ "serviceModelInfo": {
+ "modelType": "",
+ "modelInvariantId": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
+ "modelVersionId": "b8c45108-68df-48c5-8d58-c8dd4de833bb",
+ "modelName": "ADIOD vMX vPE_BV Service 488",
+ "modelVersion": "1.0"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "21014aa2-526b-11e6-beb8-9e71128cae77",
+ "subscriberCommonSiteId": "MDTWNJ2B17"
+ },
+ "demandInfo": {
+ "placementDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ },
+ "tenantId": "",
+ "tenantName": ""
+ }
+ ],
+ "licenseDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ }
+ }
+ ]
+ },
+ "policyId": [],
+ "serviceInstanceId": "28014cbe-b334-4d5c-839d-980157929b0b",
+ "orderInfo": "{\"requestParameters\": {\"aLaCarte\":false,\"usePreload\":true,\"subscriptionServiceType\":\"VPE\",\"alaCarteSet\":true,\"rebuildVolumeGroups\":false,\"userParams\":[{\"name\":\"2017488_adiodvpe0_vnf_config_template_version\",\"value\":\"17.2\"},{\"name\":\"2017488_adiodvpe0_bandwidth_units\",\"value\":\"Gbps\"},{\"name\":\"2017488_adiodvpe0_bandwidth\",\"value\":\"10\"},{\"name\":\"2017488_adiodvpe0_AIC_CLLI\",\"value\":\"MDTWNJ2B17\"},{\"name\":\"2017488_adiodvpe0_vnf_instance_name\",\"value\":\"mtnj309me6\"}],\"autoBuildVfModules\":false,\"cascadeDelete\":false}}"
+ }
+}
diff --git a/test/placement-tests/request_mso_subs_name_null.json b/test/placement-tests/request_mso_subs_name_null.json
new file mode 100644
index 0000000..df7ae8f
--- /dev/null
+++ b/test/placement-tests/request_mso_subs_name_null.json
@@ -0,0 +1,63 @@
+{
+ "requestInfo": {
+ "transactionId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "requestId": "1b98ee53-3fbd-48ca-9b85-302792bf5918",
+ "callbackUrl": "http://127.0.0.1:7001",
+ "sourceId": "mso",
+ "optimizer": [
+ "placement",
+ "license"
+ ],
+ "numSolutions": 1,
+ "timeout": 600
+ },
+ "placementInfo": {
+ "serviceModelInfo": {
+ "modelType": "",
+ "modelInvariantId": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
+ "modelVersionId": "b8c45108-68df-48c5-8d58-c8dd4de833bb",
+ "modelName": "ADIOD vMX vPE_BV Service 488",
+ "modelVersion": "1.0"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "21014aa2-526b-11e6-beb8-9e71128cae77",
+ "subscriberName": "null",
+ "subscriberCommonSiteId": "MDTWNJ2B17"
+ },
+ "demandInfo": {
+ "placementDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ },
+ "tenantId": "",
+ "tenantName": ""
+ }
+ ],
+ "licenseDemand": [{
+ "resourceInstanceType": "VNF",
+ "serviceResourceId": "6ea4128a-ba41-4872-a1f8-2748d0e1c361",
+ "resourceModuleName": "2017-488_ADIOD-vPE 0",
+ "resourceModelInfo": {
+ "modelCustomizationId": "06ed941b-1d83-4132-8a1d-1874f4f4b89b",
+ "modelInvariantId": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+ "modelName": "2017-488_ADIOD-vPE",
+ "modelVersion": "1.0",
+ "modelVersionId": "7cd2d399-2bcb-4ecf-bd32-c36cdca7aa03",
+ "modelType": ""
+ }
+ }
+ ]
+ },
+ "policyId": [],
+ "serviceInstanceId": "28014cbe-b334-4d5c-839d-980157929b0b",
+ "orderInfo": "{\"requestParameters\": {\"aLaCarte\":false,\"usePreload\":true,\"subscriptionServiceType\":\"VPE\",\"alaCarteSet\":true,\"rebuildVolumeGroups\":false,\"userParams\":[{\"name\":\"2017488_adiodvpe0_vnf_config_template_version\",\"value\":\"17.2\"},{\"name\":\"2017488_adiodvpe0_bandwidth_units\",\"value\":\"Gbps\"},{\"name\":\"2017488_adiodvpe0_bandwidth\",\"value\":\"10\"},{\"name\":\"2017488_adiodvpe0_AIC_CLLI\",\"value\":\"MDTWNJ2B17\"},{\"name\":\"2017488_adiodvpe0_vnf_instance_name\",\"value\":\"mtnj309me6\"}],\"autoBuildVfModules\":false,\"cascadeDelete\":false}}"
+ }
+}
diff --git a/test/placement-tests/request_vCPE.json b/test/placement-tests/request_vCPE.json
new file mode 100644
index 0000000..03e32d9
--- /dev/null
+++ b/test/placement-tests/request_vCPE.json
@@ -0,0 +1,105 @@
+{
+ "requestInfo": {
+ "transactionId": "xxx-xxx-xxxx",
+ "requestId": "yyy-yyy-yyyy",
+ "callbackUrl": "https://so:5000/callbackUrl",
+ "sourceId": "SO",
+ "requestType": "create",
+ "numSolutions": 1,
+ "optimizers": ["placement"],
+ "timeout": 600
+ },
+ "requestParameters": {
+ "customerLatitude": 32.897480,
+ "customerLongitude": -97.040443,
+ "customerName": "xyz"
+ },
+ "placementDemands": [
+ {
+ "resourceModuleName": "vGMuxInfra",
+ "serviceResourceId": "vGMuxInfra-xx",
+ "tenantId": "vGMuxInfra-tenant",
+ "resourceModelInfo": {
+ "modelInvariantId": "vGMuxInfra-modelInvariantId",
+ "modelVersionId": "vGMuxInfra-versionId",
+ "modelName": "vGMuxInfra-model",
+ "modelType": "resource",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vGMuxInfra-customeModelName"
+ },
+ "existingCandidates": {
+ "identifierType": "service_instance_id",
+ "identifiers": ["87257b49-9602-4ca1-9817-094e52bc873b"]
+ },
+ "excludedCandidates": {
+ "identifierType": "service_instance_id",
+ "identifiers": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d"]
+ },
+ "requiredCandidates": {
+ "identifierType": "service_instance_id",
+ "identifiers": ["7e6c3e57-62cd-44f6-aa88-d0896998f7ec"]
+ }
+ },
+ {
+ "resourceModuleName": "vG",
+ "serviceResourceId": "71d563e8-e714-4393-8f99-cc480144a05e",
+ "tenantId": "vG-tenant",
+ "resourceModelInfo": {
+ "modelInvariantId": "vG-modelInvariantId",
+ "modelVersionId": "vG-versionId",
+ "modelName": "vG-model",
+ "modelType": "resource",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vG-customeModelName"
+ },
+ "existingCandidates": {
+ "identifierType": "service_instance_id",
+ "identifiers": ["21d5f3e8-e714-4383-8f99-cc480144505a"]
+ },
+ "excludedCandidates": {
+ "identifierType": "service_instance_id",
+ "identifiers": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d"]
+ },
+ "requiredCandidates": {
+ "identifierType": "cloud_region_id",
+ "identifiers": ["TXAUS219"]
+ }
+ }
+ ],
+ "serviceInfo": {
+ "serviceInstanceId": "d61b2543-5914-4b8f-8e81-81e38575b8ec",
+ "serviceModelInfo": {
+ "modelInvariantId": "vCPE-invariantId",
+ "modelVersionId": "vCPE-versionId",
+ "modelName": "vCPE-model",
+ "modelType": "service",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vCPE-customeModelName"
+ }
+ },
+ "licenseDemands": [
+ {
+ "resourceModuleName": "vGMuxInfra",
+ "serviceResourceId": "vGMuxInfra-xx",
+ "tenantId": "vGMuxInfra-tenant",
+ "resourceModelInfo": {
+ "modelInvariantId": "vGMuxInfra-modelInvariantId",
+ "modelVersionId": "vGMuxInfra-versionId",
+ "modelName": "vGMuxInfra-model",
+ "modelType": "resource",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vGMuxInfra-customeModelName"
+ },
+ "existingLicenses": {
+ "entitlementPoolUUID": [
+ "87257b49-9602-4ca1-9817-094e52bc873b",
+ "43257b49-9602-4fe5-9337-094e52bc9435"
+ ],
+ "licenseKeyGroupUUID": [
+ "87257b49-9602-4ca1-9817-094e52bc873b",
+ "43257b49-9602-4fe5-9337-094e52bc9435"
+ ]
+ }
+ }
+ ]
+}
diff --git a/test/placement-tests/scopePolicies.json b/test/placement-tests/scopePolicies.json
new file mode 100644
index 0000000..123c8e2
--- /dev/null
+++ b/test/placement-tests/scopePolicies.json
@@ -0,0 +1,21 @@
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"ResourceRegionPolicy\",\"policyName\":\"bg4702.ResourceRegionPolicy_vhnportal_v1\",\"description\":\"ResourceRegionPolicy@CreatedBy:mh7921\",\"templateVersion\":\"1802V01\",\"version\":\"1802V01\",\"priority\":\"1\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vhnPortalResourceRegion\",\"policyScope\":{\"serviceType\":[\"DHV\"],\"geoRegion\":[\"US\",\"INTERNATIONAL\"],\"subscriberRole\":[\"FFA Homing\"],\"networkType\":[\"ip\"],\"resourceInstanceType\":[\"Primary Service_Admin\",\"Secondary Service_Admin\"]},\"resourceRegionProperty\":{\"request\":\"{\\\"dhv_service_instance\\\": {\\\"get_param\\\": \\\"SERVICE_INST\\\"}, \\\"service_type\\\": \\\"vHNPortal\\\", \\\"e2evpnkey\\\": {\\\"get_param\\\": \\\"E2EVPNKEY\\\"}}\",\"controller\":\"SDN-C\"},\"type\":\"region_fit\",\"resourceInstanceType\":[\"Primary Service_Admin\",\"Secondary Service_Admin\"]}}",
+ "policyName": "bg4702.Config_MS_ResourceRegionPolicy_vhnportal_v1.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "serviceType": "DHV",
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "geoRegion": "US,INTERNATIONAL",
+ "service": "ResourceRegionPolicy",
+ "subscriberRole": "FFA Homing",
+ "type": "region_fit",
+ "networkType": "ip",
+ "resourceInstanceType": "Primary Service_Admin,Secondary Service_Admin"
+ },
+ "responseAttributes": {},
+ "property": null
+ } \ No newline at end of file
diff --git a/test/placement-tests/testScoperequest.json b/test/placement-tests/testScoperequest.json
new file mode 100644
index 0000000..36f0c17
--- /dev/null
+++ b/test/placement-tests/testScoperequest.json
@@ -0,0 +1,144 @@
+{
+ "placementInfo": {
+ "serviceModelInfo": {
+ "modelVersion": "1.0",
+ "modelName": "vCPE",
+ "modelInvariantId": "250c90b4-42f9-4cd9-9270-fd33a0676f92",
+ "modelVersionId": "c233e7f3-bd70-4a2c-a88f-4f5743109e8d",
+ "modelType": "service"
+ },
+ "orderInfo":" { \"requestParameters\": { \"e2eVpnKey\": \"VPNL61657\", \"dhvVendorName\": \"VELOCLOUD\", \"dhvIPSec2TransportBandwidthUp\": \"10\", \"vpnList\": [ { \"vpnInfo\": { \"pvcId\": \"5952413\", \"vpnId\": \"61657\" } } ], \"dhvSiteEffectiveTransportBandwidth\": \"10\", \"ucpeHostName\": \"US292IORLFL0102UJZZ01\", \"commonSiteId\": \"90101124\", \"dhvIPSec2TransportBandwidthDown\": \"10\", \"vnfList\": [ { \"vnfInfo\": { \"vnfType\": \"HN\", \"veloCloudNominalThroughput\": \"100\", \"vnfHostName\": \"US292IORLFL0102UVHN01\", \"vnfPartNumber\": \"DHV-VNF-VC-10M\", \"vnfManagementOption\": \"ATT\", \"vnfSoftwareVersion\": \"2.4.1\" } } ] } }",
+ "serviceInstanceId": "4701bd3c-b722-4d07-abc0-183ea398fac5",
+ "demandInfo": {
+ "placementDemand": [
+ {
+ "tenantName": "",
+ "tenantId": "",
+ "serviceResourceId": "a297f69d-4d68-4d1f-8b06-be61bddf9e7f",
+ "resourceInstanceType": "vVIGaaS",
+ "resourceModuleName": "Primary Tunnel_XConn for DHV Testing_1 0",
+ "resourceModelInfo": {
+ "modelVersion": "1.0",
+ "modelName": "Tunnel_XConn for DHV Testing_1",
+ "modelInvariantId": "b2ac0b6a-c157-4f27-a226-4fc6c1d5b08c",
+ "modelCustomizationId": "8ade4a5f-a446-4b14-9d12-3ccdd80ef55c",
+ "modelVersionId": "c3c3531a-a0c6-498f-8512-03793f7772fa",
+ "modelType": "allottedResource"
+ }
+ },
+ {
+ "tenantName": "",
+ "tenantId": "",
+ "serviceResourceId": "73190cfb-e9de-4185-8f18-cb339df6b92a",
+ "resourceInstanceType": "vVIGaaS",
+ "resourceModuleName": "Secondary Tunnel_XConn for DHV Testing_1 1",
+ "resourceModelInfo": {
+ "modelVersion": "1.0",
+ "modelName": "Tunnel_XConn for DHV Testing_1",
+ "modelInvariantId": "b2ac0b6a-c157-4f27-a226-4fc6c1d5b08c",
+ "modelCustomizationId": "32b80123-84ea-4bda-82d9-4c70e812b450",
+ "modelVersionId": "c3c3531a-a0c6-498f-8512-03793f7772fa",
+ "modelType": "allottedResource"
+ }
+ },
+ {
+ "tenantName": "",
+ "tenantId": "",
+ "serviceResourceId": "f8489f98-db3d-4e84-9ec7-7f7b17b9857f",
+ "resourceInstanceType": "vHNPortalaaS",
+ "resourceModuleName": "Primary Service_Admin for DHV Test_1 0",
+ "resourceModelInfo": {
+ "modelVersion": "1.0",
+ "modelName": "Service_Admin for DHV Test_1",
+ "modelInvariantId": "a8031455-34bc-4608-b731-973c258822d2",
+ "modelCustomizationId": "bace7e9f-c0e7-4479-93df-aa10d387038b",
+ "modelVersionId": "0e830d97-39fc-4310-a11d-ebab6c71b35e",
+ "modelType": "allottedResource"
+ }
+ },
+ {
+ "tenantName": "",
+ "tenantId": "",
+ "serviceResourceId": "8a8973d4-3a91-4fe6-a846-6f4c282f9005",
+ "resourceInstanceType": "vHNPortalaaS",
+ "resourceModuleName": "Secondary Service_Admin for DHV Test_1 1",
+ "resourceModelInfo": {
+ "modelVersion": "1.0",
+ "modelName": "Service_Admin for DHV Test_1",
+ "modelInvariantId": "a8031455-34bc-4608-b731-973c258822d2",
+ "modelCustomizationId": "cb6d359d-8f83-41b6-b0cc-fb3cdf978e25",
+ "modelVersionId": "0e830d97-39fc-4310-a11d-ebab6c71b35e",
+ "modelType": "allottedResource"
+ }
+ },
+ {
+ "tenantName": "",
+ "tenantId": "",
+ "serviceResourceId": "3f2b0c6d-6867-4369-b597-d929305da414",
+ "resourceInstanceType": "vHNGWaaS",
+ "resourceModuleName": "Primary IP_Mux_Demux updated_1 0",
+ "resourceModelInfo": {
+ "modelVersion": "1.0",
+ "modelName": "IP_Mux_Demux updated_1",
+ "modelInvariantId": "72ad23e8-575d-4bc1-a88d-bb63ca66b85f",
+ "modelCustomizationId": "925db703-945a-4b14-aafa-607c99c32f46",
+ "modelVersionId": "cb760674-1c09-4316-837f-1ee1e816c26f",
+ "modelType": "allottedResource"
+ }
+ },
+ {
+ "tenantName": "",
+ "tenantId": "",
+ "serviceResourceId": "caea369e-90e6-4bf0-9aa4-c80ffb10c77e",
+ "resourceInstanceType": "vHNGWaaS",
+ "resourceModuleName": "Secondary IP_Mux_Demux updated_1 1",
+ "resourceModelInfo": {
+ "modelVersion": "1.0",
+ "modelName": "IP_Mux_Demux updated_1",
+ "modelInvariantId": "72ad23e8-575d-4bc1-a88d-bb63ca66b85f",
+ "modelCustomizationId": "5f5793d7-843c-4f8e-b01d-35ece0b17ead",
+ "modelVersionId": "cb760674-1c09-4316-837f-1ee1e816c26f",
+ "modelType": "allottedResource"
+ }
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "subscriberCommonSiteId": null,
+ "globalSubscriberId": "300NCQ",
+ "subscriberName": "Test Customer"
+ },
+ "policyId": [
+ "SNIRO.DistanceToLocationPolicy_vhngw",
+ "SNIRO.VNFPolicy_vhngatewayprimary1_v1",
+ "SNIRO.ResourceInstancePolicy_hngateway",
+ "SNIRO.ResourceRegionPolicy_hngateway_v1",
+ "SNIRO.VNFPolicy_vhngatewaysecondary1_v1",
+ "SNIRO.ZonePolicy_vhngw",
+ "SNIRO.PlacementOptimizationPolicy_dhv_v3",
+ "SNIRO.VNFPolicy_vhnportal_primary1_v1",
+ "SNIRO.ResourceInstancePolicy_vhnportal_v3",
+ "SNIRO.ResourceRegionPolicy_vhnportal_v1",
+ "SNIRO.VNFPolicy_vhnportalsecondary1_v1",
+ "SNIRO.ZonePolicy_vhnportal",
+ "SNIRO.DistanceToLocationPolicy_vvig",
+ "SNIRO.InventoryGroupPolicy_vvig",
+ "SNIRO.VNFPolicy_vvigprimary1_v1",
+ "SNIRO.ResourceInstancePolicy_vvig",
+ "SNIRO.VNFPolicy_vvigsecondary1_v1"
+ ]
+ },
+ "requestInfo": {
+ "transactionId": "264e9db9-6d59-4888-9c90-51245d7c811f",
+ "sourceId": "mso",
+ "requestType": "initial",
+ "callbackUrl": "http://127.0.0.1:7001",
+ "requestId": "264e9db9-6d59-4888-9c90-51245d7c811f",
+ "optimizer": [
+ "placement",
+ "license"
+ ],
+ "numSolutions": 1,
+ "timeout": 1800
+ }
+}
diff --git a/test/placement-tests/test_by_scope.yaml b/test/placement-tests/test_by_scope.yaml
new file mode 100644
index 0000000..0b53e5f
--- /dev/null
+++ b/test/placement-tests/test_by_scope.yaml
@@ -0,0 +1,20 @@
+policy_info:
+ placement:
+ policy_fetch: by_scope
+ policy_scope:
+ default_scope: XXX_1802
+ scope_vcpe: oof_beijing
+ service_name: placementInfo.serviceModelInfo.modelName
+ policy_subscriber: SubscriberPolicy
+ subscriber_name: placementInfo.subscriberInfo.subscriberName
+ policy_type_vcpe:
+ - CloudAttributePolicy
+ - DistanceToLocationPolicy
+ - instanceReservationPolicy
+ - PlacementOptimizationPolicy
+ - ResourceInstancePolicy
+ - VNFPolicy
+ - ZonePolicy
+ default: # if no explicit service related information is needed
+ policy_fetch: by_name
+ policy_scope: none
diff --git a/test/placement-tests/vnfGroupPolicies.txt b/test/placement-tests/vnfGroupPolicies.txt
new file mode 100644
index 0000000..16aca6c
--- /dev/null
+++ b/test/placement-tests/vnfGroupPolicies.txt
@@ -0,0 +1,197 @@
+[
+ {
+ "content": {
+ "identity": "vhngateway-pri-sec-1",
+ "policyScope": {
+ "geoRegion": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "networkType": [
+ "ip"
+ ],
+ "resourceInstanceType": [
+ "Primary IP_Mux_Demux",
+ "Secondary IP_Mux_Demux"
+ ],
+ "serviceType": [
+ "DHV"
+ ],
+ "subscriberRole": [
+ "FFA Homing"
+ ]
+ },
+ "property": [
+ {
+ "attributes": {
+ "equipmentRole": "",
+ "globalCustomerId": "",
+ "modelInvariantId": "",
+ "modelVersionId": "",
+ "operationalStatus": "out-of-service-path",
+ "orchestrationStatus": [
+ "Activate",
+ "Activated"
+ ]
+ },
+ "inventoryProvider": "aai",
+ "inventoryType": "cloud"
+ },
+ {
+ "attributes": {
+ "equipmentRole": "",
+ "globalCustomerId": "21014aa2-526b-11e6-beb8-9e71128cae77",
+ "modelInvariantId": "",
+ "modelVersionId": "",
+ "operationalStatus": "out-of-service-path",
+ "orchestrationStatus": [
+ "Activate",
+ "Activated"
+ ]
+ },
+ "inventoryProvider": "aai",
+ "inventoryType": "service"
+ }
+ ],
+ "resourceInstanceType": [
+ "Primary IP_Mux_Demux",
+ "Secondary IP_Mux_Demux"
+ ],
+ "type": "vnfPolicy"
+ },
+ "description": "VNFPolicy@CreatedBy:mh7921",
+ "guard": "False",
+ "policyName": "bg4702.VNFPolicy_vhngatewayprimary_v1",
+ "priority": "1",
+ "riskLevel": "3",
+ "riskType": "test",
+ "service": "VNFPolicy",
+ "templateVersion": "1802V01",
+ "version": "1802V01"
+ },
+ {
+ "content": {
+ "identity": "vhnportal-pri-sec-1",
+ "policyScope": {
+ "geoRegion": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "networkType": [
+ "ip"
+ ],
+ "resourceInstanceType": [
+ "Primary Service_Admin",
+ "Secondary Service_Admin"
+ ],
+ "serviceType": [
+ "DHV"
+ ],
+ "subscriberRole": [
+ "FFA Homing"
+ ]
+ },
+ "property": [
+ {
+ "attributes": {
+ "equipmentRole": "",
+ "globalCustomerId": "",
+ "modelInvariantId": "",
+ "modelVersionId": "",
+ "operationalStatus": "out-of-service-path",
+ "orchestrationStatus": [
+ "Activate",
+ "Activated"
+ ]
+ },
+ "inventoryProvider": "aai",
+ "inventoryType": "cloud"
+ },
+ {
+ "attributes": {
+ "equipmentRole": "",
+ "globalCustomerId": "21014aa2-526b-11e6-beb8-9e71128cae77",
+ "modelInvariantId": "",
+ "modelVersionId": "",
+ "operationalStatus": "out-of-service-path",
+ "orchestrationStatus": [
+ "Activate",
+ "Activated"
+ ]
+ },
+ "inventoryProvider": "aai",
+ "inventoryType": "service"
+ }
+ ],
+ "resourceInstanceType": [
+ "Primary Service_Admin",
+ "Secondary Service_Admin"
+ ],
+ "type": "vnfPolicy"
+ },
+ "description": "VNFPolicy@CreatedBy:mh7921",
+ "guard": "False",
+ "policyName": "bg4702.VNFPolicy_vhnportal_primary_v1",
+ "priority": "1",
+ "riskLevel": "3",
+ "riskType": "test",
+ "service": "VNFPolicy",
+ "templateVersion": "1802V01",
+ "version": "1802V01"
+ },
+ {
+ "content": {
+ "identity": "vvig-pri-sec-1",
+ "policyScope": {
+ "geoRegion": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "networkType": [
+ "ip"
+ ],
+ "resourceInstanceType": [
+ "Primary Tunnel_XConn",
+ "Secondary Tunnel_XConn"
+ ],
+ "serviceType": [
+ "DHV"
+ ],
+ "subscriberRole": [
+ "FFA Homing"
+ ]
+ },
+ "property": [
+ {
+ "attributes": {
+ "equipmentRole": "",
+ "globalCustomerId": "21014aa2-526b-11e6-beb8-9e71128cae77",
+ "modelInvariantId": "",
+ "modelVersionId": "",
+ "operationalStatus": "out-of-service-path",
+ "orchestrationStatus": [
+ "Activate",
+ "Activated"
+ ]
+ },
+ "inventoryProvider": "aai",
+ "inventoryType": "service"
+ }
+ ],
+ "resourceInstanceType": [
+ "Primary Tunnel_XConn",
+ "Secondary Tunnel_XConn"
+ ],
+ "type": "vnfPolicy"
+ },
+ "description": "VNFPolicy@CreatedBy:mh7921",
+ "guard": "False",
+ "policyName": "bg4702.VNFPolicy_vvig1_v1",
+ "priority": "1",
+ "riskLevel": "3",
+ "riskType": "test",
+ "service": "VNFPolicy",
+ "templateVersion": "1802V01",
+ "version": "1802V01"
+ }
+] \ No newline at end of file