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

cyclades: Add setting for Ganeti clone providers

Add new 'GANETI_CLONE_PROVIDERS' setting to containg the list of
ExtStorage providers that support cloning. For these providers the
hashmap of the image is passed as an ExtStorage parameter('origin').
Also, since the disk is already filled with data, snf-image performs
only customization and no data copying.
parent 77b7f1ae
......@@ -51,3 +51,9 @@
## from the provider name, e.g. 'archipelago' to a dictionary with the actual
## arbitrary parameters.
#GANETI_DISK_PROVIDER_KWARGS = {}
#
## List of ExtStorage providers that support cloning. For these providers, the
## hashmap of the image is passed as an ExtStorage disk parameter('origin') and
## ,since disk will be already filled with data, 'snf-image' performs only
## customization (no data copying).
#GANETI_CLONE_PROVIDERS = ['vlmc', 'archipelago']
......@@ -51,3 +51,9 @@ GANETI_MAX_NICS_PER_INSTANCE = 8
# the provider name, e.g. 'archipelago' to a dictionary with the actual
# arbitrary parameters.
GANETI_DISK_PROVIDER_KWARGS = {}
# List of ExtStorage providers that support cloning. For these providers, the
# hashmap of the image is passed as an ExtStorage disk parameter('origin') and,
# since disk will be already filled with data, 'snf-image' performs only
# customization (no data copying).
GANETI_CLONE_PROVIDERS = ['vlmc', 'archipelago']
......@@ -179,7 +179,7 @@ def create(userid, name, password, flavor, image, metadata={},
flavor.disk_template = disk_template
flavor.disk_provider = provider
flavor.disk_origin = None
if provider in ['vlmc', 'archipelago']:
if provider in settings.GANETI_CLONE_PROVIDERS:
flavor.disk_origin = image['checksum']
image['backend_id'] = 'null'
else:
......
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