summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAnkitkumar Patel <ankit@research.att.com>2018-03-27 15:02:46 -0400
committerAnkitkumar Patel <ankit@research.att.com>2018-03-27 15:16:29 -0400
commitca43ea7c87abbcaa71617de50598449ff5ff007c (patch)
tree072f8ed4673d14a042646107e564d0143902caf1 /test
parenta775ec8b904a0ea7ed863726ffe7f7d9b363d47a (diff)
Updated the conductor adaptor
Updated the conductor adaptor code. Issue-ID: OPTFRA-207 Change-Id: I41bd6f2e39bc5ca6d2d27539772175363590416f Signed-off-by: Ankitkumar Patel <ankit@research.att.com>
Diffstat (limited to 'test')
-rw-r--r--test/policy-local-files/Capacity_vGMuxInfra.json2
-rw-r--r--test/policy-local-files/Capacity_vG_1.json2
-rw-r--r--test/policy-local-files/has_policies_r2/meta-valid-policies.txt14
-rw-r--r--test/policy-local-files/hpa_policy_vGMuxInfra_1.json4
-rw-r--r--test/policy-local-files/hpa_policy_vG_1.json4
-rw-r--r--test/test_process_placement_opt.py2
6 files changed, 21 insertions, 7 deletions
diff --git a/test/policy-local-files/Capacity_vGMuxInfra.json b/test/policy-local-files/Capacity_vGMuxInfra.json
index 06896c3..0225d40 100644
--- a/test/policy-local-files/Capacity_vGMuxInfra.json
+++ b/test/policy-local-files/Capacity_vGMuxInfra.json
@@ -14,7 +14,7 @@
"resources": ["vGMuxInfra"],
"capacityProperty": {
"controller": "multicloud",
- "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\", \"unit\": \"GB\"}}}"
+ "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": 16, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": 40, \"unit\": \"GB\"}}"
},
"policyType": "vim_fit",
"applicableResources": "any"
diff --git a/test/policy-local-files/Capacity_vG_1.json b/test/policy-local-files/Capacity_vG_1.json
index 851ea49..f311650 100644
--- a/test/policy-local-files/Capacity_vG_1.json
+++ b/test/policy-local-files/Capacity_vG_1.json
@@ -14,7 +14,7 @@
"resources": ["vG"],
"capacityProperty": {
"controller": "multicloud",
- "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\", \"unit\": \"GB\"}}}"
+ "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": 16, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": 40, \"unit\": \"GB\"}}"
},
"policyType": "vim_fit",
"applicableResources": "any"
diff --git a/test/policy-local-files/has_policies_r2/meta-valid-policies.txt b/test/policy-local-files/has_policies_r2/meta-valid-policies.txt
new file mode 100644
index 0000000..6a22945
--- /dev/null
+++ b/test/policy-local-files/has_policies_r2/meta-valid-policies.txt
@@ -0,0 +1,14 @@
+Affinity_vCPE_1.json
+Capacity_1.json
+Distance_vGMuxInfra_1.json
+Distance_vG_1.json
+Min_Guarantee_vGMuxInfra_1.json
+Placement_Optimization_1.json
+QueryPolicy_vCPE.json
+hpa_policy_vGMuxInfra_1.json
+hpa_policy_vG_1.json
+subscriber_policy.json
+vnfPolicy_vG.json
+vnfPolicy_vGMuxInfra.json
+
+
diff --git a/test/policy-local-files/hpa_policy_vGMuxInfra_1.json b/test/policy-local-files/hpa_policy_vGMuxInfra_1.json
index 7b68578..a3403f0 100644
--- a/test/policy-local-files/hpa_policy_vGMuxInfra_1.json
+++ b/test/policy-local-files/hpa_policy_vGMuxInfra_1.json
@@ -9,10 +9,10 @@
"riskLevel": "2",
"guard": "False",
"content": {
- "resources": "vGMuxInfra",
+ "resources": ["vGMuxInfra"],
"identity": "hpaPolicy_vGMuxInfra",
"policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "hpaPolicy"],
- "policyType": "hpaPolicy",
+ "policyType": "hpa",
"flavorFeatures": [
{
"flavorLabel": "flavor_label_vm_01",
diff --git a/test/policy-local-files/hpa_policy_vG_1.json b/test/policy-local-files/hpa_policy_vG_1.json
index 95f9247..9b832f6 100644
--- a/test/policy-local-files/hpa_policy_vG_1.json
+++ b/test/policy-local-files/hpa_policy_vG_1.json
@@ -9,10 +9,10 @@
"riskLevel": "2",
"guard": "False",
"content": {
- "resources": "vG",
+ "resources": ["vG"],
"identity": "hpaPolicy_vG",
"policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG", "hpaPolicy"],
- "policyType": "hpaPolicy",
+ "policyType": "hpa",
"flavorFeatures": [
{
"flavorLabel": "flavor_label_vm_01",
diff --git a/test/test_process_placement_opt.py b/test/test_process_placement_opt.py
index 01be17d..e5dc65e 100644
--- a/test/test_process_placement_opt.py
+++ b/test/test_process_placement_opt.py
@@ -59,7 +59,7 @@ class TestProcessPlacementOpt(unittest.TestCase):
request_json = json_from_file(parameter_data_file)
policies = [json_from_file(policy_data_path + '/' + name) for name in valid_policies_files]
local_config = yaml_from_file(local_config_file)
- templ_string = process_placement_opt(request_json, policies, local_config, [])
+ templ_string = process_placement_opt(request_json, policies, local_config)
if __name__ == "__main__":