Revision d7841399 snf-cyclades-app/synnefo/logic/backend.py
b/snf-cyclades-app/synnefo/logic/backend.py | ||
---|---|---|
308 | 308 |
metadata value should be a dictionary. |
309 | 309 |
""" |
310 | 310 |
|
311 |
if settings.IGNORE_FLAVOR_DISK_SIZES: |
|
312 |
if image['backend_id'].find("windows") >= 0: |
|
313 |
sz = 14000 |
|
314 |
else: |
|
315 |
sz = 4000 |
|
316 |
else: |
|
317 |
sz = flavor.disk * 1024 |
|
318 |
|
|
319 | 311 |
# Handle arguments to CreateInstance() as a dictionary, |
320 | 312 |
# initialize it based on a deployment-specific value. |
321 | 313 |
# This enables the administrator to override deployment-specific |
... | ... | |
337 | 329 |
disk_template, provider = flavor.disk_template.split("_", 1) |
338 | 330 |
|
339 | 331 |
kw['disk_template'] = disk_template |
340 |
kw['disks'] = [{"size": sz}]
|
|
332 |
kw['disks'] = [{"size": flavor.disk * 1024}]
|
|
341 | 333 |
if provider: |
342 | 334 |
kw['disks'][0]['provider'] = provider |
343 | 335 |
|
Also available in: Unified diff