aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/optf-has/has/data
diff options
context:
space:
mode:
authorLeonardo Bellini <leonardo.bellini@att.com>2018-03-27 05:42:06 -0500
committerLeonardo Bellini <leonardo.bellini@att.com>2018-03-27 05:46:02 -0500
commit853238d1b2e02ba573b5185ebb2c83c48e3b3333 (patch)
tree3c86fbb1db87c8999a13b07cfee753e2a47c2bc6 /test/csit/tests/optf-has/has/data
parent28db3d66f98afb2376e6d51d78b379811b9187ec (diff)
complete test cases for M4
Issue-ID: OPTFRA-204 Change-Id: I0010ecae5f64fbe0b3c0be5cb9ebc52d9a426254 Signed-off-by: Leonardo Bellini <leonardo.bellini@att.com>
Diffstat (limited to 'test/csit/tests/optf-has/has/data')
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json49
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json.orig49
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json.service51
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_short_distance_constraint.json49
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_wrong_version.json202
-rw-r--r--test/csit/tests/optf-has/has/data/plan_without_demand_section.json120
6 files changed, 262 insertions, 258 deletions
diff --git a/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json b/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json
new file mode 100644
index 000000000..3e6d26791
--- /dev/null
+++ b/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json
@@ -0,0 +1,49 @@
+{
+ "name":"onap template with short distance constraint",
+ "template":{
+ "homing_template_version":"2017-10-10",
+ "parameters":{
+ "service_name":"Residential vCPE",
+ "service_id":"vcpe_service_id",
+ "customer_lat":25.395968,
+ "customer_long":-51.135344,
+ "physical_location":"DLLSTX233",
+ "REQUIRED_MEM":4,
+ "REQUIRED_DISK":100,
+ "pnf_id":"some_pnf_id"
+ },
+ "locations":{
+ "customer_loc":{
+ "latitude":{
+ "get_param":"customer_lat"
+ },
+ "longitude":{
+ "get_param":"customer_long"
+ }
+ }
+ },
+ "demands":{
+ "vG":[
+ {
+ "inventory_provider":"aai",
+ "inventory_type":"cloud"
+ }
+ ]
+ },
+ "constraints":{
+ "distance-vg":{
+ "type":"distance_to_location",
+ "demands":[
+ "vG"
+ ],
+ "properties":{
+ "distance":"< 1 km",
+ "location":"customer_loc"
+ }
+ }
+ },
+ "optimization":{
+
+ }
+ }
+}
diff --git a/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json.orig b/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json.orig
new file mode 100644
index 000000000..be410086c
--- /dev/null
+++ b/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json.orig
@@ -0,0 +1,49 @@
+{
+ "name":"onap template with long distance constraint",
+ "template":{
+ "homing_template_version":"2017-10-10",
+ "parameters":{
+ "service_name":"Residential vCPE",
+ "service_id":"vcpe_service_id",
+ "customer_lat":45.395968,
+ "customer_long":-71.135344,
+ "physical_location":"DLLSTX233",
+ "REQUIRED_MEM":4,
+ "REQUIRED_DISK":100,
+ "pnf_id":"some_pnf_id"
+ },
+ "locations":{
+ "customer_loc":{
+ "latitude":{
+ "get_param":"customer_lat"
+ },
+ "longitude":{
+ "get_param":"customer_long"
+ }
+ }
+ },
+ "demands":{
+ "vG":[
+ {
+ "inventory_provider":"aai",
+ "inventory_type":"cloud"
+ }
+ ]
+ },
+ "constraints":{
+ "distance-vg":{
+ "type":"distance_to_location",
+ "demands":[
+ "vG"
+ ],
+ "properties":{
+ "distance":"> 100 km",
+ "location":"customer_loc"
+ }
+ }
+ },
+ "optimization":{
+
+ }
+ }
+}
diff --git a/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json.service b/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json.service
new file mode 100644
index 000000000..b0d6478fc
--- /dev/null
+++ b/test/csit/tests/optf-has/has/data/plan_with_long_distance_constraint.json.service
@@ -0,0 +1,51 @@
+{
+ "name":"onap template with long distance constraint",
+ "template":{
+ "homing_template_version":"2017-10-10",
+ "parameters":{
+ "service_name":"Residential vCPE",
+ "service_id":"vcpe_service_id",
+ "customer_lat":45.395968,
+ "customer_long":-71.135344,
+ "physical_location":"DLLSTX233",
+ "REQUIRED_MEM":4,
+ "REQUIRED_DISK":100,
+ "pnf_id":"some_pnf_id"
+ },
+ "locations":{
+ "customer_loc":{
+ "latitude":{
+ "get_param":"customer_lat"
+ },
+ "longitude":{
+ "get_param":"customer_long"
+ }
+ }
+ },
+ "demands":{
+ "vG":[
+ {
+ "inventory_provider":"aai",
+ "inventory_type":"service",
+ "service_type": "VVIG",
+ "customer_id": "21014aa2-526b-11e6-beb8-9e71128cae77"
+ }
+ ]
+ },
+ "constraints":{
+ "distance-vg":{
+ "type":"distance_to_location",
+ "demands":[
+ "vG"
+ ],
+ "properties":{
+ "distance":"> 100 km",
+ "location":"customer_loc"
+ }
+ }
+ },
+ "optimization":{
+
+ }
+ }
+}
diff --git a/test/csit/tests/optf-has/has/data/plan_with_short_distance_constraint.json b/test/csit/tests/optf-has/has/data/plan_with_short_distance_constraint.json
new file mode 100644
index 000000000..85a1a7387
--- /dev/null
+++ b/test/csit/tests/optf-has/has/data/plan_with_short_distance_constraint.json
@@ -0,0 +1,49 @@
+{
+ "name":"onap template with short distance constraint",
+ "template":{
+ "homing_template_version":"2017-10-10",
+ "parameters":{
+ "service_name":"Residential vCPE",
+ "service_id":"vcpe_service_id",
+ "customer_lat":45.395968,
+ "customer_long":-71.135344,
+ "physical_location":"DLLSTX233",
+ "REQUIRED_MEM":4,
+ "REQUIRED_DISK":100,
+ "pnf_id":"some_pnf_id"
+ },
+ "locations":{
+ "customer_loc":{
+ "latitude":{
+ "get_param":"customer_lat"
+ },
+ "longitude":{
+ "get_param":"customer_long"
+ }
+ }
+ },
+ "demands":{
+ "vG":[
+ {
+ "inventory_provider":"aai",
+ "inventory_type":"cloud"
+ }
+ ]
+ },
+ "constraints":{
+ "distance-vg":{
+ "type":"distance_to_location",
+ "demands":[
+ "vG"
+ ],
+ "properties":{
+ "distance":"< 1 km",
+ "location":"customer_loc"
+ }
+ }
+ },
+ "optimization":{
+
+ }
+ }
+}
diff --git a/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json
index 9471fbf82..c0618bfbf 100644
--- a/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json
+++ b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json
@@ -1,175 +1,41 @@
{
- "name": "onap optf has plan with wrong version",
- "template": {
- "conductor_template_version": "yyyy-mm-dd",
- "parameters": {
- "UCPEHOST": "chcil129snd",
- "CUSTOMER":"21014aa2-526b-11e6-beb8-9e71128cae77"
- },
- "locations": {
- "customer_loc": {
- "host_name": {
- "get_param": "UCPEHOST"
- }
- }
- },
- "demands": {
- "vHNPortalaaS_PRIMARY_1": [
- {
- "inventory_provider": "aai",
- "inventory_type": "service",
- "service_type": "HNPORTAL",
- "customer_id": {"get_param": "CUSTOMER"}
+ "name":"onap template with wrong version",
+ "template":{
+ "homing_template_version":"xxxx-yy-zz",
+ "parameters":{
+ "service_name":"Residential vCPE",
+ "service_id":"vcpe_service_id",
+ "customer_lat":45.395968,
+ "customer_long":-71.135344,
+ "physical_location":"DLLSTX233",
+ "REQUIRED_MEM":4,
+ "REQUIRED_DISK":100,
+ "pnf_id":"some_pnf_id"
},
- {
- "inventory_provider": "aai",
- "inventory_type": "cloud"
- }
- ],
- "vHNPortalaaS_SECONDARY_1": [
- {
- "inventory_provider": "aai",
- "inventory_type": "service",
- "service_type": "HNPORTAL",
- "customer_id": {"get_param": "CUSTOMER"}
+ "locations":{
+ "customer_loc":{
+ "latitude":{
+ "get_param":"customer_lat"
+ },
+ "longitude":{
+ "get_param":"customer_long"
+ }
+ }
},
- {
- "inventory_provider": "aai",
- "inventory_type": "cloud"
- }
- ],
- "vHNGWaaS_PRIMARY_1": [
- {
- "inventory_provider": "aai",
- "inventory_type": "service",
- "service_type": "HNGATEWAY",
- "customer_id": {"get_param": "CUSTOMER"}
+ "demands":{
+ "vG":[
+ {
+ "inventory_provider":"aai",
+ "inventory_type":"cloud"
+ }
+ ]
},
- {
- "inventory_provider": "aai",
- "inventory_type": "cloud"
- }
- ],
- "vHNGWaaS_SECONDARY_1": [
- {
- "inventory_provider": "aai",
- "inventory_type": "service",
- "service_type": "HNGATEWAY",
- "customer_id": {"get_param": "CUSTOMER"}
+ "constraints":{
+
},
- {
- "inventory_provider": "aai",
- "inventory_type": "cloud"
- }
- ],
- "vVIGaaS_PRIMARY_1": [
- {
- "inventory_provider": "aai",
- "inventory_type": "service",
- "service_type": "VVIG",
- "customer_id": {"get_param": "CUSTOMER"}
- }
- ],
- "vVIGaaS_SECONDARY_1": [
- {
- "inventory_provider": "aai",
- "inventory_type": "service",
- "service_type": "VVIG",
- "customer_id": {"get_param": "CUSTOMER"}
- }
- ],
- "vVIGaaS_PRIMARY_2": [
- {
- "inventory_provider": "aai",
- "inventory_type": "service",
- "service_type": "VVIG",
- "customer_id": {"get_param": "CUSTOMER"}
+ "optimization":{
+
}
- ],
- "vVIGaaS_SECONDARY_2": [
- {
- "inventory_provider": "aai",
- "inventory_type": "service",
- "service_type": "VVIG",
- "customer_id": {"get_param": "CUSTOMER"}
- }
- ]
- },
- "constraints": {
- "distance-vvig": {
- "type": "distance_to_location",
- "demands": [
- "vVIGaaS_SECONDARY_1",
- "vVIGaaS_PRIMARY_1"
- ],
- "properties": {
- "distance": "< 5000 km",
- "location": "customer_loc"
- }
- },
- "distance-vgw": {
- "type": "distance_to_location",
- "demands": [
- "vHNGWaaS_SECONDARY_1",
- "vHNGWaaS_PRIMARY_1"
- ],
- "properties": {
- "distance": "< 5000 km",
- "location": "customer_loc"
- }
- },
- "zone-vhngw": {
- "type": "zone",
- "demands": [
- "vHNGWaaS_SECONDARY_1",
- "vHNGWaaS_PRIMARY_1"
- ],
- "properties": {
- "qualifier": "different",
- "category": "complex"
- }
- },
- "zone-vhnportal": {
- "type": "zone",
- "demands": [
- "vHNPortalaaS_SECONDARY_1",
- "vHNPortalaaS_PRIMARY_1"
- ],
- "properties": {
- "qualifier": "different",
- "category": "complex"
- }
- }
- },
- "optimization": {
- "minimize": {
- "sum": [
- {
- "product": [
- 1,
- {
- "distance_between": [
- "customer_loc",
- "vVIGaaS_PRIMARY_1"
- ]
- }
- ]
- },
- {
- "product": [
- 1,
- {
- "distance_between": [
- "customer_loc",
- "vHNGWaaS_PRIMARY_1"
- ]
- }
- ]
- }
- ]
- }
- }
-},
- "timeout": 5,
- "limit": 3
+ }
}
+
diff --git a/test/csit/tests/optf-has/has/data/plan_without_demand_section.json b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json
index 87a459d87..fe5d2fa65 100644
--- a/test/csit/tests/optf-has/has/data/plan_without_demand_section.json
+++ b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json
@@ -1,93 +1,33 @@
{
- "name": "onap optf has plan with wrong version",
- "template": {
- "conductor_template_version": "2016-11-01",
- "parameters": {
- "UCPEHOST": "chcil129snd",
- "CUSTOMER":"21014aa2-526b-11e6-beb8-9e71128cae77"
- },
- "locations": {
- "customer_loc": {
- "host_name": {
- "get_param": "UCPEHOST"
- }
- }
- },
- "constraints": {
- "distance-vvig": {
- "type": "distance_to_location",
- "demands": [
- "vVIGaaS_SECONDARY_1",
- "vVIGaaS_PRIMARY_1"
- ],
- "properties": {
- "distance": "< 5000 km",
- "location": "customer_loc"
- }
- },
- "distance-vgw": {
- "type": "distance_to_location",
- "demands": [
- "vHNGWaaS_SECONDARY_1",
- "vHNGWaaS_PRIMARY_1"
- ],
- "properties": {
- "distance": "< 5000 km",
- "location": "customer_loc"
- }
- },
- "zone-vhngw": {
- "type": "zone",
- "demands": [
- "vHNGWaaS_SECONDARY_1",
- "vHNGWaaS_PRIMARY_1"
- ],
- "properties": {
- "qualifier": "different",
- "category": "complex"
- }
- },
- "zone-vhnportal": {
- "type": "zone",
- "demands": [
- "vHNPortalaaS_SECONDARY_1",
- "vHNPortalaaS_PRIMARY_1"
- ],
- "properties": {
- "qualifier": "different",
- "category": "complex"
- }
- }
- },
- "optimization": {
- "minimize": {
- "sum": [
- {
- "product": [
- 1,
- {
- "distance_between": [
- "customer_loc",
- "vVIGaaS_PRIMARY_1"
- ]
- }
- ]
- },
- {
- "product": [
- 1,
- {
- "distance_between": [
- "customer_loc",
- "vHNGWaaS_PRIMARY_1"
- ]
+ "name":"onap template without demand section",
+ "template":{
+ "homing_template_version":"2017-10-10",
+ "parameters":{
+ "service_name":"Residential vCPE",
+ "service_id":"vcpe_service_id",
+ "customer_lat":45.395968,
+ "customer_long":-71.135344,
+ "physical_location":"DLLSTX233",
+ "REQUIRED_MEM":4,
+ "REQUIRED_DISK":100,
+ "pnf_id":"some_pnf_id"
+ },
+ "locations":{
+ "customer_loc":{
+ "latitude":{
+ "get_param":"customer_lat"
+ },
+ "longitude":{
+ "get_param":"customer_long"
}
- ]
- }
- ]
- }
- }
-},
- "timeout": 5,
- "limit": 3
+ }
+ },
+ "constraints":{
+
+ },
+ "optimization":{
+
+ }
+ }
}
+