aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-09-17 20:58:43 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-10-04 10:30:10 -0700
commitc0e83bc50ff0f0ce77a87f43ab514735a1c8343b (patch)
tree3406593d64b65063c8bc7c13f2803e24ebe6d778
parentadd9dfa6f8739ec3328388c2658750e185e6a3ed (diff)
Disable VNF deploy by default
Change-Id: I27bcc41c855f34fb1fd0332fc24e7bf0b2af4ec2 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py5
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py3
-rw-r--r--yardstick/network_services/vnf_generic/vnf/sample_vnf.py10
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
index 4d53f0989..1e6bc1a13 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
@@ -1516,8 +1516,9 @@ class TestSampleVNFDeployHelper(unittest.TestCase):
sample_vnf_deploy_helper = SampleVNFDeployHelper(vnfd_helper, ssh_helper)
self.assertIsNone(sample_vnf_deploy_helper.deploy_vnfs('name1'))
- self.assertEqual(ssh_helper.execute.call_count, 0)
- self.assertEqual(ssh_helper.put.call_count, 0)
+ sample_vnf_deploy_helper.DISABLE_DEPLOY = True
+ self.assertEqual(ssh_helper.execute.call_count, 5)
+ self.assertEqual(ssh_helper.put.call_count, 1)
@mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time')
@mock.patch('subprocess.check_output')
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py b/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py
index 39b37c606..d4d3439f3 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py
@@ -444,6 +444,8 @@ class TestUdpReplayApproxVnf(unittest.TestCase):
udp_replay_approx_vnf.WAIT_TIME = 0
udp_replay_approx_vnf.setup_helper.setup_vnf_environment = mock.Mock()
+ udp_replay_approx_vnf.deploy_helper = mock.MagicMock()
+ udp_replay_approx_vnf.deploy_vnfs = mock.MagicMock()
self.assertIsNone(udp_replay_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG))
udp_replay_approx_vnf._vnf_process.is_alive = mock.Mock(return_value=1)
@@ -460,6 +462,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase):
udp_replay_approx_vnf.q_out.put("some text PANIC some text")
udp_replay_approx_vnf.setup_helper.setup_vnf_environment = mock.Mock()
+ udp_replay_approx_vnf.deploy_helper = mock.MagicMock()
self.assertIsNone(udp_replay_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG))
with self.assertRaises(RuntimeError):
udp_replay_approx_vnf.wait_for_instantiate()
diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
index 114153dab..92f78c2bc 100644
--- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
@@ -615,13 +615,7 @@ class SampleVNFDeployHelper(object):
self.ssh_helper = ssh_helper
self.vnfd_helper = vnfd_helper
- DISABLE_DEPLOY = True
-
def deploy_vnfs(self, app_name):
- # temp disable for now
- if self.DISABLE_DEPLOY:
- return
-
vnf_bin = self.ssh_helper.join_bin_path(app_name)
exit_status = self.ssh_helper.execute("which %s" % vnf_bin)[0]
if not exit_status:
@@ -788,7 +782,9 @@ class SampleVNF(GenericVNF):
self.nfvi_context = Context.get_context_from_server(self.scenario_helper.nodes[self.name])
# self.nfvi_context = None
- self.deploy_helper.deploy_vnfs(self.APP_NAME)
+ # vnf deploy is unsupported, use ansible playbooks
+ if self.scenario_helper.options.get("vnf_deploy", False):
+ self.deploy_helper.deploy_vnfs(self.APP_NAME)
self.resource_helper.setup()
self._start_vnf()