diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-06-16 12:46:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-06-16 12:46:21 +0000 |
commit | 6ecc6f14a3325895233f40e5193cb369c6aab914 (patch) | |
tree | 787c57874354c0874274153bf72c7c076165c494 /testcases | |
parent | 62254125c8cf752cdd2251217051db7b3d2f7069 (diff) | |
parent | be413f75308273cd3e637a40097a2e6dc49e9212 (diff) |
Merge "Fixed auth url in v2.Password"
Diffstat (limited to 'testcases')
-rw-r--r-- | testcases/security_scan/security_scan.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testcases/security_scan/security_scan.py b/testcases/security_scan/security_scan.py index 7ed85b64..5910331a 100644 --- a/testcases/security_scan/security_scan.py +++ b/testcases/security_scan/security_scan.py @@ -16,6 +16,7 @@ import argparse import connect import datetime import os +import sys from ConfigParser import SafeConfigParser from keystoneclient.auth.identity import v2 @@ -27,8 +28,8 @@ __author__ = 'Luke Hinds (lhinds@redhat.com)' __url__ = 'https://wiki.opnfv.org/display/functest/Functest+Security' # Global vars -oscapbin = 'sudo /bin/oscap' INSTALLER_IP = os.getenv('INSTALLER_IP') +oscapbin = 'sudo /bin/oscap' # Apex Spefic var needed to query Undercloud if os.getenv('OS_AUTH_URL') is None: @@ -37,7 +38,7 @@ if os.getenv('OS_AUTH_URL') is None: else: OS_AUTH_URL = os.getenv('OS_AUTH_URL') -# argparse +# args parser = argparse.ArgumentParser(description='OPNFV OpenSCAP Scanner') parser.add_argument('--config', action='store', dest='cfgfile', help='Config file', required=True) @@ -58,7 +59,7 @@ setup.getockey() com = 'sudo hiera admin_password' setup = connect.SetUp(com) keypass = setup.keystonepass() -auth = v2.Password(auth_url='http://{0}:5000/v2.0'.format(OS_AUTH_URL), +auth = v2.Password(auth_url=OS_AUTH_URL, username='admin', password=str(keypass).rstrip(), tenant_name='admin') |