diff options
Diffstat (limited to 'barbicanclient/barbican_cli/secrets.py')
-rw-r--r-- | barbicanclient/barbican_cli/secrets.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/barbicanclient/barbican_cli/secrets.py b/barbicanclient/barbican_cli/secrets.py index 4daaabd..24f5890 100644 --- a/barbicanclient/barbican_cli/secrets.py +++ b/barbicanclient/barbican_cli/secrets.py @@ -71,6 +71,21 @@ class GetSecret(show.ShowOne): return entity._get_formatted_entity() +class UpdateSecret(show.ShowOne): + """Update a secret with no payload in Barbican.""" + + def get_parser(self, prog_name): + parser = super(UpdateSecret, self).get_parser(prog_name) + parser.add_argument('URI', help='The URI reference for the secret.') + parser.add_argument('payload', help='the unencrypted secret') + + return parser + + def take_action(self, args): + self.app.client.secrets.update(args.URI, + args.payload) + + class ListSecret(lister.Lister): """List secrets.""" |