summaryrefslogtreecommitdiffstats
path: root/test/test_PolicyCalls.py
diff options
context:
space:
mode:
authorSastry Isukapalli <sastry@research.att.com>2018-03-27 17:23:40 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-27 17:23:40 +0000
commita775ec8b904a0ea7ed863726ffe7f7d9b363d47a (patch)
tree890e6ecab0262132c7f08c6df1ac5177c4b30f3c /test/test_PolicyCalls.py
parent477092abdb41449158538dfd49d8cd25c5c8e42a (diff)
parentf1e95cd95c05be145c3fde9f08404724937edf49 (diff)
Merge "Updates to address new HPA policies"
Diffstat (limited to 'test/test_PolicyCalls.py')
-rw-r--r--test/test_PolicyCalls.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_PolicyCalls.py b/test/test_PolicyCalls.py
index 8c0d638..30fc072 100644
--- a/test/test_PolicyCalls.py
+++ b/test/test_PolicyCalls.py
@@ -80,7 +80,7 @@ class TestPolicyCalls(unittest.TestCase):
with patch('osdf.adapters.policy.interface.policy_api_call', return_value=policy_response):
self.assertRaises(BusinessException,
lambda: interface.remote_api(req_json, osdf_config, service_type="placement"))
-
+
def test_get_by_scope(self):
req_json_file = "./test/placement-tests/testScoperequest.json"
all_policies = "./test/placement-tests/policy_response.json"
@@ -100,7 +100,9 @@ class TestPolicyCalls(unittest.TestCase):
genDemandslist = []
req_json = "./test/placement-tests/request.json"
req_json = json.loads(open(req_json).read())
- genDemands = translation.gen_demands(req_json, self.policies)
+ # need to run this only on vnf policies
+ vnf_policies = [x for x in self.policies if x["content"]["policyType"] == "vnfPolicy"]
+ genDemands = translation.gen_demands(req_json, vnf_policies)
for action in req_json['placementInfo']['placementDemands']:
actionsList.append(action['resourceModuleName'])
for key2,value in genDemands.items():