Fix flake8 violations 37/15437/1
authorMorgan Richomme <morgan.richomme@orange.com>
Mon, 13 Jun 2016 09:04:28 +0000 (11:04 +0200)
committerMorgan Richomme <morgan.richomme@orange.com>
Mon, 13 Jun 2016 09:04:28 +0000 (11:04 +0200)
Change-Id: I911eab6d4c0cdcfcf4d75f03e91c528d3388876c
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
testcases/Controllers/ODL/odlreport2db.py
testcases/security_scan/connect.py
testcases/security_scan/security_scan.py

index 0288084..3eff400 100644 (file)
 
 import getopt
 import json
-import os
 import sys
 import time
 import xmltodict
-import yaml
 
 import functest.utils.functest_utils as functest_utils
 
@@ -122,11 +120,6 @@ def main(argv):
 
     json.dumps(data, indent=4, separators=(',', ': '))
 
-    # Only used from container, we can set up absolute path
-    with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
-        functest_yaml = yaml.safe_load(f)
-        f.close()
-
     try:
         # example:
         # python odlreport2db.py -x ~/Pictures/Perso/odl/output3.xml
index d0ef02d..cee83dd 100644 (file)
@@ -23,6 +23,7 @@ INSTALLER_IP = os.getenv('INSTALLER_IP')
 logger = ft_logger.Logger("security_scan").getLogger()
 paramiko.util.log_to_file("/var/log/paramiko.log")
 
+
 class setup:
     def __init__(self, *args):
         self.args = args
index 9803dd3..797b564 100644 (file)
@@ -62,7 +62,8 @@ nova = client.Client(2, session=sess)
 def run_tests(host, nodetype):
     user = cfgparse.get(nodetype, 'user')
     port = cfgparse.get(nodetype, 'port')
-    connect.logger.info("Host: {0} Selected Profile: {1}".format(host, nodetype))
+    connect.logger.info("Host: {0} Selected Profile: {1}".format(host,
+                                                                 nodetype))
     connect.logger.info("Creating temp file structure..")
     createfiles(host, port, user, localkey)
     connect.logger.info("Installing OpenSCAP...")