summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Herve <thomas.herve@enovance.com>2015-03-27 13:47:27 +0100
committerThomas Herve <thomas.herve@enovance.com>2015-03-30 21:23:42 +0200
commit278398584ecf5d4f9bf63dc152b35172250af8ac (patch)
treeb875863c7befa004529c29555da22f6b01d5d70f
parent4bfc836aec63ba69e070498de241def1a990c24e (diff)
downloadpython-barbicanclient-278398584ecf5d4f9bf63dc152b35172250af8ac.tar.gz
Fix --decrypt command line option
This patch fixes the --decrypt flag when retrieving a secret. Change-Id: Ie36a4522e984447653b54130ba466222566ed5da Closes-Bug: #1434629
-rw-r--r--barbicanclient/barbican_cli/secrets.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/barbicanclient/barbican_cli/secrets.py b/barbicanclient/barbican_cli/secrets.py
index a567c22..91ab55a 100644
--- a/barbicanclient/barbican_cli/secrets.py
+++ b/barbicanclient/barbican_cli/secrets.py
@@ -52,10 +52,10 @@ class GetSecret(show.ShowOne):
def take_action(self, args):
if args.decrypt:
- entity = self.app.client.secrets.decrypt(args.URI,
- args.payload_content_type)
- return (('Secret',),
- (entity,))
+ entity = self.app.client.secrets.get(args.URI,
+ args.payload_content_type)
+ return (('Payload',),
+ (entity.payload,))
else:
entity = self.app.client.secrets.get(secret_ref=args.URI)
return entity._get_formatted_entity()