summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-07-12 06:02:25 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-07-12 06:02:25 +0200
commit2ad8f039112977c4dfdf4389586df74263d753b6 (patch)
treeb5f16f3e4dd54851d163abdcb329afe69a6ca1d1
parent8b912cec489a96178fcac5667c03e20850149c3a (diff)
Handle certificate in shaker.py
http://artifacts.opnfv.org/logs/functest/huawei-virtual2/2018-07-11_18-47-21/functest.log Change-Id: I9049a06031db2335410828ecb30e763077360bc3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--functest/opnfv_tests/openstack/shaker/shaker.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/shaker/shaker.py b/functest/opnfv_tests/openstack/shaker/shaker.py
index cc8f9ec26..ca405ae55 100644
--- a/functest/opnfv_tests/openstack/shaker/shaker.py
+++ b/functest/opnfv_tests/openstack/shaker/shaker.py
@@ -67,6 +67,8 @@ class Shaker(singlevm.SingleVm2):
domain=self.project.domain.id)
scpc = scp.SCPClient(self.ssh.get_transport())
scpc.put('/home/opnfv/functest/conf/env_file', remote_path='~/')
+ if os.environ.get('OS_CACERT'):
+ scpc.put(os.environ.get('OS_CACERT'), remote_path='~/os_cacert')
(_, stdout, stderr) = self.ssh.exec_command(
'source ~/env_file && '
'export OS_INTERFACE=public && '
@@ -74,6 +76,7 @@ class Shaker(singlevm.SingleVm2):
'export OS_USERNAME={} && '
'export OS_PROJECT_NAME={} && '
'export OS_PASSWORD={} && '
+ '{}'
'env && '
'shaker --image-name {} --flavor-name {} '
'--server-endpoint {}:9000 --scenario '
@@ -83,7 +86,10 @@ class Shaker(singlevm.SingleVm2):
'openstack/perf_l3_north_south '
'--report report.html --output report.json'.format(
endpoint, self.project.user.name, self.project.project.name,
- self.project.password, self.image.name, self.flavor.name,
+ self.project.password,
+ 'export OS_CACERT=~/os_cacert && ' if os.environ.get(
+ 'OS_CACERT') else '',
+ self.image.name, self.flavor.name,
self.fip.floating_ip_address))
self.__logger.info("output:\n%s", stdout.read())
self.__logger.info("error:\n%s", stderr.read())