Revision d7841399

b/snf-cyclades-app/synnefo/app_settings/default/api.py
92 92
# our REST API would prefer to be explicit about trailing slashes
93 93
APPEND_SLASH = False
94 94

  
95
# Ignore disk size specified by flavor, always build the
96
# machine with a 4GB (in the case of Windows: 14GB) disk.
97
# This setting is helpful in development setups.
98
#
99
IGNORE_FLAVOR_DISK_SIZES = False
100

  
101 95
# Fixed mapping of user VMs to a specific backend.
102 96
# e.g. BACKEND_PER_USER = {'example@okeanos.grnet.gr': 2}
103 97
BACKEND_PER_USER = {}
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