Save volume_type/group_type uuid into db when creating group
When creating groups, if volume type name or group type name is passed, cinder-api will try to save the name rather uuid into the database. It will make a foreign key constraint fails. After this change, we always save uuid into database. Change-Id: Ib333130325fc12a4753c7a128e823e992e8c8682 Closes-Bug: #1622476
This commit is contained in:
@@ -151,8 +151,8 @@ class API(base.Base):
|
||||
'status': c_fields.GroupStatus.CREATING,
|
||||
'name': name,
|
||||
'description': description,
|
||||
'volume_type_ids': volume_types,
|
||||
'group_type_id': group_type}
|
||||
'volume_type_ids': [t['id'] for t in req_volume_types],
|
||||
'group_type_id': req_group_type['id']}
|
||||
group = None
|
||||
try:
|
||||
group = objects.Group(context=context, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user