Merge "Remove redundant space in docstring"
This commit is contained in:
@@ -55,7 +55,7 @@ class ACLBehaviors(base_behaviors.BaseBehaviors):
|
||||
return argv
|
||||
|
||||
def acl_delete(self, entity_ref):
|
||||
""" Delete a secret or container acl
|
||||
"""Delete a secret or container acl
|
||||
|
||||
:param entity_ref Reference to secret or container entity
|
||||
:return If error returns stderr string otherwise returns None.
|
||||
@@ -190,7 +190,7 @@ class ACLBehaviors(base_behaviors.BaseBehaviors):
|
||||
return acl_list
|
||||
|
||||
def delete_all_created_acls(self):
|
||||
""" Delete all ACLs that we created """
|
||||
"""Delete all ACLs that we created"""
|
||||
entities_to_delete = [entry for entry in self.acl_entity_set]
|
||||
for entity_ref in entities_to_delete:
|
||||
self.acl_delete(entity_ref)
|
||||
|
||||
@@ -31,7 +31,7 @@ class BaseBehaviors(object):
|
||||
self.cmdline_client = barbican.Barbican()
|
||||
|
||||
def add_auth_and_endpoint(self, arg_list):
|
||||
""" Update an argument list with authentication and endpoint data
|
||||
"""Update an argument list with authentication and endpoint data
|
||||
|
||||
Keystone v3 introduced the concept of a domain, so only the v3
|
||||
flavor will include domain names.
|
||||
@@ -70,7 +70,7 @@ class BaseBehaviors(object):
|
||||
self.LOG.info('updated command string: %s', arg_list)
|
||||
|
||||
def issue_barbican_command(self, argv):
|
||||
""" Issue the barbican command and return its output.
|
||||
"""Issue the barbican command and return its output.
|
||||
|
||||
The barbican command sometimes raises SystemExit, but not always, so
|
||||
we will handle either situation here.
|
||||
@@ -97,7 +97,7 @@ class BaseBehaviors(object):
|
||||
return outstr, errstr
|
||||
|
||||
def _prettytable_to_dict(self, str):
|
||||
""" Create a dict from the values in a PrettyTable string.
|
||||
"""Create a dict from the values in a PrettyTable string.
|
||||
|
||||
:param str: a string representing a PrettyTable output from a
|
||||
barbican secret store or get command.
|
||||
@@ -116,7 +116,7 @@ class BaseBehaviors(object):
|
||||
return retval
|
||||
|
||||
def _prettytable_to_list(self, str):
|
||||
""" Create a list from the values in a PrettyTable string.
|
||||
"""Create a list from the values in a PrettyTable string.
|
||||
|
||||
:param str: a string representing a PrettyTable output from a
|
||||
barbican secret list command.
|
||||
|
||||
@@ -26,7 +26,7 @@ class ContainerBehaviors(base_behaviors.BaseBehaviors):
|
||||
self.container_hrefs_to_delete = []
|
||||
|
||||
def delete_container(self, container_href):
|
||||
""" Delete a container
|
||||
"""Delete a container
|
||||
|
||||
:param container_href the href to the container to delete
|
||||
"""
|
||||
@@ -39,7 +39,7 @@ class ContainerBehaviors(base_behaviors.BaseBehaviors):
|
||||
self.container_hrefs_to_delete.remove(container_href)
|
||||
|
||||
def create_container(self, secret_hrefs=[]):
|
||||
""" Create a container
|
||||
"""Create a container
|
||||
:param secret_hrefs A list of existing secrets
|
||||
|
||||
:return: the href to the newly created container
|
||||
@@ -58,7 +58,7 @@ class ContainerBehaviors(base_behaviors.BaseBehaviors):
|
||||
return container_href
|
||||
|
||||
def get_container(self, container_href):
|
||||
""" Get a container
|
||||
"""Get a container
|
||||
|
||||
:param: the href to a container
|
||||
:return dict of container values, or an empty dict if the container
|
||||
@@ -77,7 +77,7 @@ class ContainerBehaviors(base_behaviors.BaseBehaviors):
|
||||
return container_data
|
||||
|
||||
def list_containers(self):
|
||||
""" List containers
|
||||
"""List containers
|
||||
|
||||
:return: a list of containers
|
||||
"""
|
||||
@@ -89,6 +89,6 @@ class ContainerBehaviors(base_behaviors.BaseBehaviors):
|
||||
return container_list
|
||||
|
||||
def delete_all_created_containers(self):
|
||||
""" Delete all containers that we created """
|
||||
"""Delete all containers that we created"""
|
||||
for href in self.container_hrefs_to_delete:
|
||||
self.delete_container(href)
|
||||
|
||||
@@ -28,7 +28,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
|
||||
def update_secret(self,
|
||||
secret_href,
|
||||
payload):
|
||||
""" Update a secret
|
||||
"""Update a secret
|
||||
|
||||
:param secret_href the href to the secret to update.
|
||||
:param payload the payload to put into the secret.
|
||||
@@ -42,7 +42,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
|
||||
stdout, stderr = self.issue_barbican_command(argv)
|
||||
|
||||
def delete_secret(self, secret_href):
|
||||
""" Delete a secret
|
||||
"""Delete a secret
|
||||
|
||||
:param secret_href the href to the secret to delete
|
||||
"""
|
||||
@@ -55,7 +55,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
|
||||
self.secret_hrefs_to_delete.remove(secret_href)
|
||||
|
||||
def store_secret(self, payload="Payload for testing", store_argv=[]):
|
||||
""" Store (aka create) a secret
|
||||
"""Store (aka create) a secret
|
||||
|
||||
The store_argv parameter allows additional command line parameters for
|
||||
the store operation to be specified. This can be used to specify -a for
|
||||
@@ -80,7 +80,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
|
||||
return secret_href
|
||||
|
||||
def get_secret(self, secret_href):
|
||||
""" Get a secret
|
||||
"""Get a secret
|
||||
|
||||
:param: the href to a secret
|
||||
:return dict of secret values, or an empty dict if the secret
|
||||
@@ -99,7 +99,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
|
||||
return secret_data
|
||||
|
||||
def get_secret_payload(self, secret_href, raw=False):
|
||||
""" Get a secret
|
||||
"""Get a secret
|
||||
|
||||
:param: the href to a secret
|
||||
:param raw if True then add "-f value" to get raw payload (ie not
|
||||
@@ -127,7 +127,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
|
||||
return secret
|
||||
|
||||
def list_secrets(self):
|
||||
""" List secrets
|
||||
"""List secrets
|
||||
|
||||
:return: a list of secrets
|
||||
"""
|
||||
@@ -140,6 +140,6 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
|
||||
return secret_list
|
||||
|
||||
def delete_all_created_secrets(self):
|
||||
""" Delete all secrets that we created """
|
||||
"""Delete all secrets that we created"""
|
||||
for href in self.secret_hrefs_to_delete:
|
||||
self.delete_secret(href)
|
||||
|
||||
Reference in New Issue
Block a user