Generate a flavorid if needed at flavor creation

When creating a new flavor, it's now possible to omit flavorid. In this
case it will be automatically generated using utils.gen_uuid().
nova-manage and OS API updated accordingly.

Fixes: bug #1043410
Change-Id: Ibf9229599dac953177fbf1ffac5242ed716142db
This commit is contained in:
Adrien Cunin
2012-09-04 15:47:34 +02:00
parent ad6a2189f5
commit 6eb4e0e987
2 changed files with 13 additions and 1 deletions

View File

@@ -851,7 +851,7 @@ class InstanceTypeCommands(object):
help='rxtx_factor')
@args('--is_public', dest="is_public", metavar='<is_public>',
help='Make flavor accessible to the public')
def create(self, name, memory, vcpus, root_gb, ephemeral_gb, flavorid,
def create(self, name, memory, vcpus, root_gb, ephemeral_gb, flavorid=None,
swap=0, rxtx_factor=1, is_public=True):
"""Creates instance types / flavors"""
try: