summaryrefslogtreecommitdiffstats
path: root/test/conductor/test_conductor_translation.py
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2020-03-10 10:55:13 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2020-03-20 20:39:59 +0530
commitf30da9513ae0501f453ee93729b381270fad0a2b (patch)
treea3ab005e2f16bfe8709bdcfbab6d28b5c6760a19 /test/conductor/test_conductor_translation.py
parent420f4b3a4ca25d5de5c9318b2ca89e1ef126b278 (diff)
Add generic conductor interface
Issue-ID: OPTFRA-715 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: I84218ab65e645a90d2ff1c365bdde1e06ab27d2e
Diffstat (limited to 'test/conductor/test_conductor_translation.py')
-rw-r--r--test/conductor/test_conductor_translation.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/conductor/test_conductor_translation.py b/test/conductor/test_conductor_translation.py
index 3481b88..8b6c0a1 100644
--- a/test/conductor/test_conductor_translation.py
+++ b/test/conductor/test_conductor_translation.py
@@ -1,5 +1,6 @@
# -------------------------------------------------------------------------
# Copyright (c) 2017-2018 AT&T Intellectual Property
+# Copyright (C) 2020 Wipro Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,7 +19,7 @@
import unittest
from osdf.adapters.local_data import local_policies
-from apps.placement.optimizers.conductor import translation as tr
+from osdf.adapters.conductor import translation as tr
from osdf.utils.interfaces import json_from_file
@@ -46,14 +47,15 @@ class TestConductorTranslation(unittest.TestCase):
# need to run this only on vnf policies
vnf_policies = [x for x in self.policies if x[list(x.keys())[0]]["type"]
== "onap.policies.optimization.VnfPolicy"]
- res = tr.gen_demands(self.request_json, vnf_policies)
+ res = tr.gen_demands(self.request_json['placementInfo']['placementDemands'], vnf_policies)
+
assert res is not None
def test_gen_vfmod_demands(self):
# need to run this only on vnf policies
vnf_policies = [x for x in self.policies if x[list(x.keys())[0]]["type"]
== "onap.policies.optimization.VnfPolicy"]
- res = tr.gen_demands(self.request_vfmod_json, vnf_policies)
+ res = tr.gen_demands(self.request_vfmod_json['placementInfo']['placementDemands'], vnf_policies)
assert res is not None