added --purge optparse for flavor delete
This commit is contained in:
parent
9e2abcca6b
commit
450a9ff6d7
@ -1120,10 +1120,12 @@ class InstanceTypeCommands(object):
|
|||||||
|
|
||||||
@args('--name', dest='name', metavar='<name>',
|
@args('--name', dest='name', metavar='<name>',
|
||||||
help='Name of instance type/flavor')
|
help='Name of instance type/flavor')
|
||||||
def delete(self, name, purge=None):
|
@args('--purge', action="store_true", dest='purge', default=False,
|
||||||
|
help='purge record from database')
|
||||||
|
def delete(self, name, purge):
|
||||||
"""Marks instance types / flavors as deleted"""
|
"""Marks instance types / flavors as deleted"""
|
||||||
try:
|
try:
|
||||||
if purge == "--purge":
|
if purge == True:
|
||||||
instance_types.purge(name)
|
instance_types.purge(name)
|
||||||
verb = "purged"
|
verb = "purged"
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user