# ${repos_dir}/ovno/Testcases/RunTests.sh
;;
"security_scan")
- echo "Sourcing Credentials ${FUNCTEST_CONF_DIR}/stackrc for security_scan test.."
+ echo "Sourcing Credentials ${FUNCTEST_CONF_DIR}/stackrc for undercloud .."
source ${FUNCTEST_CONF_DIR}/stackrc
python ${FUNCTEST_REPO_DIR}/testcases/security_scan/security_scan.py --config ${FUNCTEST_REPO_DIR}/testcases/security_scan/config.ini
;;
import connect
import datetime
import os
+import sys
from ConfigParser import SafeConfigParser
from keystoneclient.auth.identity import v2
__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:
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)
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')