summaryrefslogtreecommitdiff
path: root/functionaltests/cli/v1/behaviors/consumer_behaviors.py
diff options
context:
space:
mode:
Diffstat (limited to 'functionaltests/cli/v1/behaviors/consumer_behaviors.py')
-rw-r--r--functionaltests/cli/v1/behaviors/consumer_behaviors.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/functionaltests/cli/v1/behaviors/consumer_behaviors.py b/functionaltests/cli/v1/behaviors/consumer_behaviors.py
index 14d5578..af7f0d6 100644
--- a/functionaltests/cli/v1/behaviors/consumer_behaviors.py
+++ b/functionaltests/cli/v1/behaviors/consumer_behaviors.py
@@ -46,3 +46,17 @@ class ConsumerBehaviors(base_behaviors.BaseBehaviors):
argv.extend([secret_href])
stdout, stderr = self.issue_barbican_command(argv)
+
+ def list_consumers(self, secret_href):
+ argv = ['secret', 'consumer', 'list']
+ self.add_auth_and_endpoint(argv)
+
+ argv.extend([secret_href])
+
+ stdout, stderr = self.issue_barbican_command(argv)
+
+ if len(stderr) > 0 or stdout == '\n':
+ return []
+ else:
+ consumers = self._prettytable_to_list(stdout)
+ return consumers