From 1e14e82c815b06dfd8a370f1f97c61a256b28a9a Mon Sep 17 00:00:00 2001 From: Sulochan Acharya Date: Mon, 22 Oct 2012 15:46:55 -0500 Subject: [PATCH] Fixes shell command for member-delete Fixes the member-delete cli command and string formatting for dry-run option. Fixes bug1064320 Change-Id: I338f03d53da5c9b7656ae4d1335de9623b774dd8 --- glanceclient/v1/shell.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glanceclient/v1/shell.py b/glanceclient/v1/shell.py index 8aef310..aa57975 100644 --- a/glanceclient/v1/shell.py +++ b/glanceclient/v1/shell.py @@ -297,14 +297,14 @@ def do_member_create(gc, args): @utils.arg('image_id', metavar='', - help='Image to add member to.') + help='Image from which to remove member') @utils.arg('tenant_id', metavar='', - help='Tenant to add as member') + help='Tenant to remove as member') def do_member_delete(gc, args): """Remove a shared image from a tenant.""" - if not options.dry_run: + if not args.dry_run: gc.image_members.delete(args.image_id, args.tenant_id) else: print "Dry run. We would have done the following:" - print ('Remove "%(member_id)s" from the member list of image ' - '"%(image_id)s"' % locals()) + print ('Remove "%s" from the member list of image ' + '"%s"' % (args.tenant_id, args.image_id))