From ca43ea7c87abbcaa71617de50598449ff5ff007c Mon Sep 17 00:00:00 2001 From: Ankitkumar Patel Date: Tue, 27 Mar 2018 15:02:46 -0400 Subject: Updated the conductor adaptor Updated the conductor adaptor code. Issue-ID: OPTFRA-207 Change-Id: I41bd6f2e39bc5ca6d2d27539772175363590416f Signed-off-by: Ankitkumar Patel --- test/policy-local-files/Capacity_vGMuxInfra.json | 2 +- test/policy-local-files/Capacity_vG_1.json | 2 +- .../has_policies_r2/meta-valid-policies.txt | 14 ++++++++++++++ test/policy-local-files/hpa_policy_vGMuxInfra_1.json | 4 ++-- test/policy-local-files/hpa_policy_vG_1.json | 4 ++-- test/test_process_placement_opt.py | 2 +- 6 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 test/policy-local-files/has_policies_r2/meta-valid-policies.txt (limited to 'test') 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__": -- cgit 1.2.3-korg