Remove deprecated commands from shell
Remove all deprecated commands from the shell since they are no longer used and to keep the command line menu from looking cluttered. Closes-bug: #1314218 Change-Id: I66e82872988e3835e4f290f48dfc80538271426c
This commit is contained in:
@@ -26,9 +26,6 @@ from glanceclient import exc
|
||||
from glanceclient.openstack.common import strutils
|
||||
import glanceclient.v1.images
|
||||
|
||||
#NOTE(bcwaldon): import deprecated cli functions
|
||||
from glanceclient.v1.legacy_shell import *
|
||||
|
||||
CONTAINER_FORMATS = 'Acceptable formats: ami, ari, aki, bare, and ovf.'
|
||||
DISK_FORMATS = ('Acceptable formats: ami, ari, aki, vhd, vmdk, raw, '
|
||||
'qcow2, vdi, and iso.')
|
||||
@@ -213,7 +210,7 @@ def do_image_create(gc, args):
|
||||
# Filter out None values
|
||||
fields = dict(filter(lambda x: x[1] is not None, vars(args).items()))
|
||||
|
||||
fields['is_public'] = fields.get('is_public') or fields.pop('public')
|
||||
fields['is_public'] = fields.get('is_public')
|
||||
|
||||
if 'is_protected' in fields:
|
||||
fields['protected'] = fields.pop('is_protected')
|
||||
@@ -386,9 +383,4 @@ def do_member_create(gc, args):
|
||||
def do_member_delete(gc, args):
|
||||
"""Remove a shared image from a tenant."""
|
||||
image_id = utils.find_resource(gc.images, args.image).id
|
||||
if not args.dry_run:
|
||||
gc.image_members.delete(image_id, args.tenant_id)
|
||||
else:
|
||||
print("Dry run. We would have done the following:")
|
||||
print('Remove "%s" from the member list of image '
|
||||
'"%s"' % (args.tenant_id, args.image))
|
||||
gc.image_members.delete(image_id, args.tenant_id)
|
||||
|
||||
Reference in New Issue
Block a user