diff options
author | Luke Hinds <lukehinds@gmail.com> | 2016-06-13 14:00:57 +0100 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-06-13 15:02:15 +0000 |
commit | 3b3804faa0f729827a09b396e9a0ed909644d2bd (patch) | |
tree | 6fd6c0a11550afcf56b11765fbb5a01b45ac0a0d /testcases/security_scan/security_scan.py | |
parent | caaf1129d6ed40484b68d4eec4ed2da0d8fca98b (diff) |
SSH key key type select improvements and jump host rename
JIRA: FUNCTEST-310
Change-Id: I7adca57febfe8e6861d22de18858c6afd97b5199
Signed-off-by: Luke Hinds <lukehinds@gmail.com>
Diffstat (limited to 'testcases/security_scan/security_scan.py')
-rw-r--r-- | testcases/security_scan/security_scan.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/testcases/security_scan/security_scan.py b/testcases/security_scan/security_scan.py index 797b564d..e6fc5a8c 100644 --- a/testcases/security_scan/security_scan.py +++ b/testcases/security_scan/security_scan.py @@ -43,13 +43,13 @@ cfgparse.read(args.cfgfile) # Grab Undercloud key remotekey = cfgparse.get('undercloud', 'remotekey') localkey = cfgparse.get('undercloud', 'localkey') -setup = connect.setup(remotekey, localkey) -setup.getOCKey() +setup = connect.SetUp(remotekey, localkey) +setup.getockey() # Configure Nova Credentials com = 'sudo hiera admin_password' -setup = connect.setup(com) +setup = connect.SetUp(com) keypass = setup.keystonepass() auth = v2.Password(auth_url='http://{0}:5000/v2.0'.format(INSTALLER_IP), username='admin', @@ -103,7 +103,7 @@ def createfiles(host, port, user, localkey): localpath = os.getcwd() + '/scripts/createfiles.py' remotepath = '/tmp/createfiles.py' com = 'python /tmp/createfiles.py' - connect = connect.connectionManager(host, port, user, localkey, + connect = connect.ConnectionManager(host, port, user, localkey, localpath, remotepath, com) tmpdir = connect.remotescript() @@ -111,7 +111,7 @@ def createfiles(host, port, user, localkey): def install_pkg(host, port, user, localkey): import connect com = 'sudo yum -y install openscap-scanner scap-security-guide' - connect = connect.connectionManager(host, port, user, localkey, com) + connect = connect.ConnectionManager(host, port, user, localkey, com) connect.remotecmd() @@ -133,17 +133,17 @@ def run_scanner(host, port, user, localkey, nodetype): report, cpe, secpolicy) - connect = connect.connectionManager(host, port, user, localkey, com) + connect = connect.ConnectionManager(host, port, user, localkey, com) connect.remotecmd() elif scantype == 'oval': com = '{0} oval eval --results {1}/{2} ' '--report {1}/{3} {4}'.format(oscapbin, tmpdir.rstrip(), results, report, secpolicy) - connect = connect.connectionManager(host, port, user, localkey, com) + connect = connect.ConnectionManager(host, port, user, localkey, com) connect.remotecmd() else: com = '{0} oval-collect '.format(oscapbin) - connect = connect.connectionManager(host, port, user, localkey, com) + connect = connect.ConnectionManager(host, port, user, localkey, com) connect.remotecmd() @@ -158,7 +158,7 @@ def post_tasks(host, port, user, localkey, nodetype): report = cfgparse.get(nodetype, 'report') results = cfgparse.get(nodetype, 'results') reportfile = '{0}/{1}'.format(tmpdir.rstrip(), report) - connect = connect.connectionManager(host, port, user, localkey, dl_folder, + connect = connect.ConnectionManager(host, port, user, localkey, dl_folder, reportfile, report, results) connect.download_reports() @@ -166,14 +166,14 @@ def post_tasks(host, port, user, localkey, nodetype): def removepkg(host, port, user, localkey, nodetype): import connect com = 'sudo yum -y remove openscap-scanner scap-security-guide' - connect = connect.connectionManager(host, port, user, localkey, com) + connect = connect.ConnectionManager(host, port, user, localkey, com) connect.remotecmd() def cleandir(host, port, user, localkey, nodetype): import connect com = 'sudo rm -r {0}'.format(tmpdir.rstrip()) - connect = connect.connectionManager(host, port, user, localkey, com) + connect = connect.ConnectionManager(host, port, user, localkey, com) connect.remotecmd() |