diff options
| author | Adrien Cunin <acunin@linagora.com> | 2012-09-04 15:47:34 +0200 |
|---|---|---|
| committer | Adrien Cunin <acunin@linagora.com> | 2012-09-07 00:39:44 +0200 |
| commit | daf0681f064cf1de54f9c91f44737c31bf196d92 (patch) | |
| tree | edd49a381ba322128a8c4bc56d207867c90680e7 /nova/api | |
| parent | 76d094eeba1bcbba16d24e40aea24bb7729b4a30 (diff) | |
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
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/flavormanage.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/flavormanage.py b/nova/api/openstack/compute/contrib/flavormanage.py index d6bd87005..a7e313c9c 100644 --- a/nova/api/openstack/compute/contrib/flavormanage.py +++ b/nova/api/openstack/compute/contrib/flavormanage.py @@ -58,7 +58,7 @@ class FlavorManageController(wsgi.Controller): vals = body['flavor'] name = vals['name'] - flavorid = vals['id'] + flavorid = vals.get('id') memory_mb = vals.get('ram') vcpus = vals.get('vcpus') root_gb = vals.get('disk') |
