Commit a7b49bfe authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Remove IGNORE_FLAVOR_DISK_SIZES setting

parent b8ae658b
......@@ -92,12 +92,6 @@ DEFAULT_FIREWALL_PROFILE = 'DISABLED'
# our REST API would prefer to be explicit about trailing slashes
APPEND_SLASH = False
# Ignore disk size specified by flavor, always build the
# machine with a 4GB (in the case of Windows: 14GB) disk.
# This setting is helpful in development setups.
#
IGNORE_FLAVOR_DISK_SIZES = False
# Fixed mapping of user VMs to a specific backend.
# e.g. BACKEND_PER_USER = {'example@okeanos.grnet.gr': 2}
BACKEND_PER_USER = {}
......
......@@ -308,14 +308,6 @@ def create_instance(vm, public_nic, flavor, image, password=None):
metadata value should be a dictionary.
"""
if settings.IGNORE_FLAVOR_DISK_SIZES:
if image['backend_id'].find("windows") >= 0:
sz = 14000
else:
sz = 4000
else:
sz = flavor.disk * 1024
# Handle arguments to CreateInstance() as a dictionary,
# initialize it based on a deployment-specific value.
# This enables the administrator to override deployment-specific
......@@ -337,7 +329,7 @@ def create_instance(vm, public_nic, flavor, image, password=None):
disk_template, provider = flavor.disk_template.split("_", 1)
kw['disk_template'] = disk_template
kw['disks'] = [{"size": sz}]
kw['disks'] = [{"size": flavor.disk * 1024}]
if provider:
kw['disks'][0]['provider'] = provider
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment