NSB fixes: docstring, whitespace, etc. 35/39035/1
authorRoss Brattain <ross.b.brattain@intel.com>
Thu, 10 Aug 2017 05:30:25 +0000 (22:30 -0700)
committerRoss Brattain <ross.b.brattain@intel.com>
Thu, 10 Aug 2017 05:34:40 +0000 (22:34 -0700)
remove unused docstring params
remove whitespace
fix sudo vnf_build command
ignore stdout

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Change-Id: I6fcdbb0ed4bc6b7fc2f557529f5ff9fd960c05e9

tests/unit/common/test_utils.py
yardstick/benchmark/scenarios/networking/vnf_generic.py
yardstick/network_services/utils.py
yardstick/network_services/vnf_generic/vnf/sample_vnf.py

index f29de5c..f25e6cc 100644 (file)
@@ -155,7 +155,7 @@ class TestMacAddressToHex(unittest.TestCase):
         self.assertEqual(utils.mac_address_to_hex_list("ea:3e:e1:9a:99:e8"),
                          ['0xea', '0x3e', '0xe1', '0x9a', '0x99', '0xe8'])
 
-                         
+
 class TranslateToStrTestCase(unittest.TestCase):
 
     def test_translate_to_str_unicode(self):
index af17a31..e0dd366 100644 (file)
@@ -284,8 +284,6 @@ class NetworkServiceTestCase(base.Scenario):
         """ This method should verify if the available resources defined in pod.yaml
         match the topology.yaml file.
 
-        :param context_cfg:
-        :param topology:
         :return: None. Side effect: context_cfg is updated
         """
         for node, node_dict in self.context_cfg["nodes"].items():
index 38fbda4..0264bbc 100644 (file)
@@ -55,7 +55,7 @@ def provision_tool(connection, tool_path, tool_file=None):
     if tool_file:
         tool_path = os.path.join(tool_path, tool_file)
     bin_path = get_nsb_option("bin_path")
-    exit_status, stdout = connection.execute("which %s > /dev/null 2>&1" % tool_path)[:2]
+    exit_status = connection.execute("which %s > /dev/null 2>&1" % tool_path)[0]
     if exit_status == 0:
         return encodeutils.safe_decode(tool_path, incoming='utf-8').rstrip()
 
index e08f517..90053bc 100644 (file)
@@ -636,8 +636,7 @@ class SampleVNFDeployHelper(object):
         build_script = os.path.join(self.SAMPLE_REPO_DIR, 'tools/vnf_build.sh')
         time.sleep(2)
         http_proxy = os.environ.get('http_proxy', '')
-        https_proxy = os.environ.get('https_proxy', '')
-        cmd = "sudo -E %s --silent '%s' '%s'" % (build_script, http_proxy, https_proxy)
+        cmd = "sudo -E %s -s -p='%s'" % (build_script, http_proxy)
         LOG.debug(cmd)
         self.ssh_helper.execute(cmd)
         vnf_bin_loc = os.path.join(self.SAMPLE_REPO_DIR, "VNFs", app_name, "build", app_name)