summaryrefslogtreecommitdiffstats
path: root/test/csit
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit')
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_hpa.json146
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json32
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json144
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json34
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json31
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json30
6 files changed, 294 insertions, 123 deletions
diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa.json b/test/csit/tests/optf-has/has/data/plan_with_hpa.json
index bf314a9cb..21985776b 100644
--- a/test/csit/tests/optf-has/has/data/plan_with_hpa.json
+++ b/test/csit/tests/optf-has/has/data/plan_with_hpa.json
@@ -1,8 +1,8 @@
-{
+{
"name":"vCPE-with-HPA",
- "template":{
+ "template":{
"homing_template_version":"2017-10-10",
- "parameters":{
+ "parameters":{
"service_name":"Residential vCPE",
"service_id":"vcpe_service_id",
"customer_lat":45.395968,
@@ -11,58 +11,71 @@
"REQUIRED_DISK":100,
"pnf_id":"some_pnf_id"
},
- "locations":{
- "customer_loc":{
- "latitude":{
+ "locations":{
+ "customer_loc":{
+ "latitude":{
"get_param":"customer_lat"
},
- "longitude":{
+ "longitude":{
"get_param":"customer_long"
}
}
},
"demands":{
- "vG":[
- {
+ "vG":[
+ {
"inventory_provider":"aai",
"inventory_type":"cloud"
}
]
},
"constraints":{
- "constraint_vg_customer":{
+ "constraint_vg_customer":{
"type":"distance_to_location",
- "demands":[
+ "demands":[
"vG"
],
- "properties":{
+ "properties":{
"distance":"< 100 km",
"location":"customer_loc"
}
},
- "hpa_constraint":{
+ "hpa_constraint":{
"type":"hpa",
- "demands":[
+ "demands":[
"vG"
],
- "properties":{
- "evaluate":[
- {
- "flavorLabel":"flavor_label_1",
- "flavorProperties":[
- {
+ "properties":{
+ "evaluate":[
+ {
+ "id":"vg_1",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type": "flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_1",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
+ "flavorProperties":[
+ {
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
"score": "5",
- "hpa-feature-attributes":[
- {
+ "directives": [],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"numVirtualCpu",
"hpa-attribute-value":"4",
"operator":">="
},
- {
+ {
"hpa-attribute-key":"virtualMemSize",
"hpa-attribute-value":"4",
"operator":">=",
@@ -70,35 +83,36 @@
}
]
},
- {
+ {
"hpa-feature":"numa",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
"score": "5",
- "hpa-feature-attributes":[
- {
+ "directives": [],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"numaNodes",
"hpa-attribute-value":"2",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaCpu-0",
"hpa-attribute-value":"2",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaCpu-1",
"hpa-attribute-value":"4",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaMem-0",
"hpa-attribute-value":"2",
"operator":"=",
"unit":"GB"
},
- {
+ {
"hpa-attribute-key":"numaMem-1",
"hpa-attribute-value":"4",
"operator":"=",
@@ -106,19 +120,20 @@
}
]
},
- {
+ {
"hpa-feature":"cpuPinning",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
"score": "5",
- "hpa-feature-attributes":[
- {
+ "directives": [],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"logicalCpuThreadPinningPolicy",
"hpa-attribute-value":"prefer",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"logicalCpuPinningPolicy",
"hpa-attribute-value":"dedicated",
"operator":"="
@@ -127,22 +142,35 @@
}
]
},
- {
- "flavorLabel":"flavor_label_2",
- "flavorProperties":[
- {
+ {
+ "id":"vg_2",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_2",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
+ "flavorProperties":[
+ {
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
"score": "5",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"numVirtualCpu",
"hpa-attribute-value":"8",
"operator":">="
},
- {
+ {
"hpa-attribute-key":"virtualMemSize",
"hpa-attribute-value":"16",
"operator":">=",
@@ -150,35 +178,36 @@
}
]
},
- {
+ {
"hpa-feature":"numa",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
"score": "5",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"numaNodes",
"hpa-attribute-value":"2",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaCpu-0",
"hpa-attribute-value":"2",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaCpu-1",
"hpa-attribute-value":"4",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaMem-0",
"hpa-attribute-value":"2",
"operator":"=",
"unit":"GB"
},
- {
+ {
"hpa-attribute-key":"numaMem-1",
"hpa-attribute-value":"4",
"operator":"=",
@@ -186,14 +215,15 @@
}
]
},
- {
+ {
"hpa-feature":"ovsDpdk",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
"score": "5",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"dataProcessingAccelerationLibrary",
"hpa-attribute-value":"v18.02",
"operator":"="
@@ -206,17 +236,17 @@
}
}
},
- "optimization":{
- "minimize":{
- "sum":[
- {
- "distance_between":[
+ "optimization":{
+ "minimize":{
+ "sum":[
+ {
+ "distance_between":[
"customer_loc",
"vG"
]
},
- {
- "distance_between":[
+ {
+ "distance_between":[
"customer_loc",
"vG"
]
diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json
index 80685ae8e..bb613abd8 100644
--- a/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json
+++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json
@@ -48,13 +48,26 @@
"properties":{
"evaluate":[
{
- "flavorLabel":"flavor_label_1",
+ "id":"vg_1",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_1",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
"flavorProperties":[
{
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "True",
+ "directives":[],
"hpa-feature-attributes":[
{
"hpa-attribute-key":"numVirtualCpu",
@@ -74,6 +87,7 @@
"hpa-version":"v1",
"architecture":"generic",
"mandatory":"True",
+ "directives":[],
"hpa-feature-attributes":[
{
"hpa-attribute-key":"numaNodes",
@@ -107,13 +121,26 @@
]
},
{
- "flavorLabel":"flavor_label_2",
+ "id":"vg_2",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_2",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
"flavorProperties":[
{
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "True",
+ "directives":[],
"hpa-feature-attributes":[
{
"hpa-attribute-key":"numVirtualCpu",
@@ -133,6 +160,7 @@
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "True",
+ "directives":[],
"hpa-feature-attributes":[
{
"hpa-attribute-key":"dataProcessingAccelerationLibrary",
diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json
index 4672349d2..50c23ee8a 100644
--- a/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json
+++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json
@@ -1,8 +1,8 @@
-{
+{
"name":"vCPE-HPA-Requirement-Optional",
- "template":{
+ "template":{
"homing_template_version":"2017-10-10",
- "parameters":{
+ "parameters":{
"service_name":"Residential vCPE",
"service_id":"vcpe_service_id",
"customer_lat":45.395968,
@@ -11,57 +11,70 @@
"REQUIRED_DISK":100,
"pnf_id":"some_pnf_id"
},
- "locations":{
- "customer_loc":{
- "latitude":{
+ "locations":{
+ "customer_loc":{
+ "latitude":{
"get_param":"customer_lat"
},
- "longitude":{
+ "longitude":{
"get_param":"customer_long"
}
}
},
- "demands":{
- "vG":[
- {
+ "demands":{
+ "vG":[
+ {
"inventory_provider":"aai",
"inventory_type":"cloud"
}
]
},
- "constraints":{
- "constraint_vg_customer":{
+ "constraints":{
+ "constraint_vg_customer":{
"type":"distance_to_location",
- "demands":[
+ "demands":[
"vG"
],
- "properties":{
+ "properties":{
"distance":"< 100 km",
"location":"customer_loc"
}
},
- "hpa_constraint":{
+ "hpa_constraint":{
"type":"hpa",
- "demands":[
+ "demands":[
"vG"
],
- "properties":{
- "evaluate":[
- {
- "flavorLabel":"flavor_label_1",
- "flavorProperties":[
- {
+ "properties":{
+ "evaluate":[
+ {
+ "id":"vg_1",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_1",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
+ "flavorProperties":[
+ {
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "True",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"numVirtualCpu",
"hpa-attribute-value":"4",
"operator":">="
},
- {
+ {
"hpa-attribute-key":"virtualMemSize",
"hpa-attribute-value":"8",
"operator":">=",
@@ -69,13 +82,14 @@
}
]
},
- {
+ {
"hpa-feature":"instructionSetExtensions",
"hpa-version":"v1",
"architecture":"Intel64",
"mandatory": "True",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"instructionSetExtensions",
"hpa-attribute-value":["aes", "sse", "avx", "smt"],
"operator":"ALL",
@@ -83,35 +97,36 @@
}
]
},
- {
+ {
"hpa-feature":"numa",
"hpa-version":"v1",
"architecture":"generic",
"mandatory":"False",
"score":"3",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"numaNodes",
"hpa-attribute-value":"2",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaCpu-0",
"hpa-attribute-value":"2",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaCpu-1",
"hpa-attribute-value":"4",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaMem-0",
"hpa-attribute-value":"2",
"operator":"=",
"unit":"GB"
},
- {
+ {
"hpa-attribute-key":"numaMem-1",
"hpa-attribute-value":"4",
"operator":"=",
@@ -121,21 +136,34 @@
}
]
},
- {
- "flavorLabel":"flavor_label_2",
- "flavorProperties":[
- {
+ {
+ "id":"vg_2",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_2",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
+ "flavorProperties":[
+ {
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "True",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"numVirtualCpu",
"hpa-attribute-value":"4",
"operator":">="
},
- {
+ {
"hpa-attribute-key":"virtualMemSize",
"hpa-attribute-value":"8",
"operator":">=",
@@ -143,49 +171,51 @@
}
]
},
- {
+ {
"hpa-feature":"ovsDpdk",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
"score":"5",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"dataProcessingAccelerationLibrary",
"hpa-attribute-value":"v18.02",
"operator":"="
}
]
},
- {
+ {
"hpa-feature":"numa",
"hpa-version":"v1",
"architecture":"generic",
"mandatory":"False",
"score":"3",
- "hpa-feature-attributes":[
- {
+ "directives":[],
+ "hpa-feature-attributes":[
+ {
"hpa-attribute-key":"numaNodes",
"hpa-attribute-value":"2",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaCpu-0",
"hpa-attribute-value":"2",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaCpu-1",
"hpa-attribute-value":"4",
"operator":"="
},
- {
+ {
"hpa-attribute-key":"numaMem-0",
"hpa-attribute-value":"2",
"operator":"=",
"unit":"GB"
},
- {
+ {
"hpa-attribute-key":"numaMem-1",
"hpa-attribute-value":"4",
"operator":"=",
@@ -199,11 +229,11 @@
}
}
},
- "optimization":{
- "minimize":{
- "sum":[
- {
- "distance_between":[
+ "optimization":{
+ "minimize":{
+ "sum":[
+ {
+ "distance_between":[
"customer_loc",
"vG"
]
diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json
index 55536f3c0..4a6d3bc8d 100644
--- a/test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json
+++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json
@@ -48,13 +48,26 @@
"properties": {
"evaluate": [
{
- "flavorLabel": "flavor_label_1",
+ "id":"vg_1",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_1",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
"flavorProperties": [
{
"hpa-feature": "basicCapabilities",
"hpa-version": "v1",
"architecture": "generic",
"mandatory": "True",
+ "directives":[],
"hpa-feature-attributes": [
{
"hpa-attribute-key": "numVirtualCpu",
@@ -74,6 +87,7 @@
"hpa-version": "v1",
"architecture": "Intel64",
"mandatory": "True",
+ "directives":[],
"hpa-feature-attributes": [
{
"hpa-attribute-key": "instructionSetExtensions",
@@ -94,6 +108,7 @@
"architecture": "generic",
"mandatory": "False",
"score": "3",
+ "directives":[],
"hpa-feature-attributes": [
{
"hpa-attribute-key": "numaNodes",
@@ -127,13 +142,26 @@
]
},
{
- "flavorLabel": "flavor_label_2",
+ "id":"vg_2",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_2",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
"flavorProperties": [
{
"hpa-feature": "basicCapabilities",
"hpa-version": "v1",
"architecture": "generic",
"mandatory": "True",
+ "directives":[],
"hpa-feature-attributes": [
{
"hpa-attribute-key": "numVirtualCpu",
@@ -154,6 +182,7 @@
"architecture": "generic",
"mandatory": "False",
"score": "5",
+ "directives":[],
"hpa-feature-attributes": [
{
"hpa-attribute-key": "dataProcessingAccelerationLibrary",
@@ -168,6 +197,7 @@
"architecture": "generic",
"mandatory": "False",
"score": "3",
+ "directives":[],
"hpa-feature-attributes": [
{
"hpa-attribute-key": "numaNodes",
diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json
index 25b226280..d343dc805 100644
--- a/test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json
+++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json
@@ -38,13 +38,26 @@
"properties":{
"evaluate":[
{
- "flavorLabel":"flavor_label_1",
+ "id":"vg_1",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_1",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
"flavorProperties":[
{
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
+ "directives":[],
"score": "5",
"hpa-feature-attributes":[
{
@@ -65,6 +78,7 @@
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
+ "directives":[],
"score": "5",
"hpa-feature-attributes":[
{
@@ -77,13 +91,26 @@
]
},
{
- "flavorLabel":"flavor_label_2",
+ "id":"vg_2",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_2",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
"flavorProperties":[
{
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "False",
+ "directives":[],
"score": "5",
"hpa-feature-attributes":[
{
diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json
index 8a3198566..e95ecedde 100644
--- a/test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json
+++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json
@@ -48,13 +48,26 @@
"properties":{
"evaluate":[
{
- "flavorLabel":"flavor_label_1",
+ "id":"vg_1",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_1",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
"flavorProperties":[
{
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory": "True",
+ "directives":[],
"hpa-feature-attributes":[
{
"hpa-attribute-key":"numVirtualCpu",
@@ -72,13 +85,26 @@
]
},
{
- "flavorLabel":"flavor_label_2",
+ "id":"vg_2",
+ "type":"vnfc",
+ "directives":[
+ {
+ "type":"flavor_directives",
+ "attributes":[
+ {
+ "attribute_name":"flavor_label_2",
+ "attribute_value":""
+ }
+ ]
+ }
+ ],
"flavorProperties":[
{
"hpa-feature":"basicCapabilities",
"hpa-version":"v1",
"architecture":"generic",
"mandatory":"True",
+ "directives":[],
"hpa-feature-attributes":[
{
"hpa-attribute-key":"numVirtualCpu",