diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-22 15:25:07 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-22 15:26:36 +0200 |
commit | f426c72f2bb6381c631794a4b9f4c3322832e0d3 (patch) | |
tree | b8352c83b9f2f38d32d5b3aab4e0153bff7eb3d8 | |
parent | a80ebe8794dd2693203ceea65a13a69dcf508f94 (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>
-rw-r--r-- | functest/core/cloudify.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/functest/core/cloudify.py b/functest/core/cloudify.py index 3bb630d80..834989722 100644 --- a/functest/core/cloudify.py +++ b/functest/core/cloudify.py @@ -66,8 +66,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( |