Revision 5d1f6b84

b/snf-cyclades-app/synnefo/logic/backend_allocator.py
104 104
    excluded.
105 105

  
106 106
    """
107
    disk_template = flavor.disk_template
108
    # Ganeti knows only the 'ext' disk template, but the flavors disk template
109
    # includes the provider.
110
    if disk_template.startswith("ext_"):
111
        disk_template = "ext"
112

  
107 113
    backends = Backend.objects.select_for_update()
108 114
    backends = backends.filter(offline=False, drained=False,
109
                               disk_templates__contains=flavor.disk_template)
115
                               disk_templates__contains=disk_template)
110 116
    backends = list(backends)
111 117
    if "SNF:ANY_PUBLIC" in DEFAULT_INSTANCE_NETWORKS:
112 118
        backends = filter(lambda x: has_free_ip(x), backends)

Also available in: Unified diff