Merge "when launch instance image size changed, device_size not change"
This commit is contained in:
commit
b39f6726ec
@ -218,6 +218,9 @@ horizon.addInitFunction(horizon.instances.init = function () {
|
||||
if (image !== undefined && image.min_disk > volume_size) {
|
||||
volume_size = image.min_disk;
|
||||
}
|
||||
if (image !== undefined && image.size > volume_size) {
|
||||
volume_size = image.size;
|
||||
}
|
||||
|
||||
// If the user has manually changed the volume size, do not override
|
||||
// unless user-defined value is too small.
|
||||
|
@ -393,7 +393,8 @@ class SetInstanceDetailsAction(workflows.Action):
|
||||
if images is not None:
|
||||
attrs = [{'id': i.id,
|
||||
'min_disk': getattr(i, 'min_disk', 0),
|
||||
'min_ram': getattr(i, 'min_ram', 0)}
|
||||
'min_ram': getattr(i, 'min_ram', 0),
|
||||
'size': functions.bytes_to_gigabytes(i.size)}
|
||||
for i in images]
|
||||
extra['images'] = json.dumps(attrs)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user