summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-07-22 15:25:07 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-07-26 19:03:37 +0200
commit5d67b049f16a92b86d48149dbd667fce258405d9 (patch)
treec95dea8324fdc66e52e58567a103c27cc0c448f5
parentb4ad10bea52cac7f2995fc5896318e6e5381588d (diff)
Add secrets operations in cloudify.py
It tries to prevent race conditions when running cloudify_ims. Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/functest/core/singlevm.py", line 411, in run if not self.execute(): File "/usr/lib/python2.7/site-packages/functest/opnfv_tests/vnf/ims/cloudify_ims.py", line 120, in execute self.cfy_client.secrets.create(k, val) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/secrets.py", line 86, in create response = self.api.put('/secrets/{0}'.format(key), data=data) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 263, in put timeout=timeout) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 233, in do_request 'SSL, but the client does'.format(e) ConnectionError: ('Connection aborted.', BadStatusLine("''",)) Change-Id: Id2603bbda462b50d3140b6f45894c8810d542e4c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit f426c72f2bb6381c631794a4b9f4c3322832e0d3)
-rw-r--r--functest/core/cloudify.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/functest/core/cloudify.py b/functest/core/cloudify.py
index b048ed1d4..6bef96747 100644
--- a/functest/core/cloudify.py
+++ b/functest/core/cloudify.py
@@ -65,8 +65,11 @@ class Cloudify(singlevm.SingleVm2):
"The current manager status is %s", cfy_status)
if str(cfy_status) != 'running':
raise Exception("Cloudify Manager isn't up and running")
- self.cfy_client.secrets.list()
- self.__logger.debug("Secrets API successfully reached")
+ self.cfy_client.secrets.create("foo", "bar")
+ self.__logger.debug(
+ "List secrets: %s", self.cfy_client.secrets.list())
+ self.cfy_client.secrets.delete("foo")
+ self.__logger.info("Secrets API successfully reached")
break
except Exception: # pylint: disable=broad-except
self.__logger.info(