Commit 08bf2ae4 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

flavor-create: warn if flavor is deleted

parent 592e5278
......@@ -49,8 +49,8 @@ class Command(BaseCommand):
"<ram>[,<ram>,...] " \
"<disk>[,<disk>,...] " \
"<disk template>[,<disk template>,...]"
help = "Create one or more flavors.\n\nThe flavors that will be created are"\
" those belonging to the cartesian product of the arguments"\
help = "Create one or more flavors.\n\nThe flavors that will be created"\
" are those belonging to the cartesian product of the arguments"
def handle(self, *args, **options):
if len(args) != 4:
......@@ -82,3 +82,8 @@ class Command(BaseCommand):
else:
self.stdout.write("Flavor '%s' already exists\n"
% flavor.name)
if flavor.deleted:
msg = "Flavor '%s' is marked as deleted. Use"\
" 'snf-manage flavor-modify' to restore this flavor\n"\
% flavor.name
self.stdout.write(msg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment