Fix incorrect path for createfiles.py and amended hiera path
authorLuke Hinds <lukehinds@gmail.com>
Mon, 4 Jul 2016 18:29:34 +0000 (19:29 +0100)
committerJose Lausuch <jose.lausuch@ericsson.com>
Tue, 5 Jul 2016 10:07:17 +0000 (10:07 +0000)
JIRA: FUNCTEST-350

Change-Id: I29cdd2e6783fb659a673346d3033b1b2e7b3461b
Signed-off-by: Luke Hinds <lukehinds@gmail.com>
testcases/security_scan/security_scan.py

index 5910331..d39c290 100644 (file)
@@ -30,6 +30,7 @@ __url__ = 'https://wiki.opnfv.org/display/functest/Functest+Security'
 # Global vars
 INSTALLER_IP = os.getenv('INSTALLER_IP')
 oscapbin = 'sudo /bin/oscap'
+functest_dir = '/home/opnfv/repos/functest/testcases/security_scan/'
 
 # Apex Spefic var needed to query Undercloud
 if os.getenv('OS_AUTH_URL') is None:
@@ -56,7 +57,7 @@ setup.getockey()
 
 
 # Configure Nova Credentials
-com = 'sudo hiera admin_password'
+com = 'sudo /usr/bin/hiera admin_password'
 setup = connect.SetUp(com)
 keypass = setup.keystonepass()
 auth = v2.Password(auth_url=OS_AUTH_URL,
@@ -108,7 +109,7 @@ def nova_iterate():
 def createfiles(host, port, user, localkey):
     import connect
     global tmpdir
-    localpath = os.getcwd() + '/scripts/createfiles.py'
+    localpath = functest_dir + 'scripts/createfiles.py'
     remotepath = '/tmp/createfiles.py'
     com = 'python /tmp/createfiles.py'
     connect = connect.ConnectionManager(host, port, user, localkey,