Revision 671db71c snf-cyclades-app/synnefo/logic/networks.py
b/snf-cyclades-app/synnefo/logic/networks.py | ||
---|---|---|
64 | 64 |
@transaction.commit_on_success |
65 | 65 |
def create(user_id, name, flavor, subnet=None, gateway=None, subnet6=None, |
66 | 66 |
gateway6=None, public=False, dhcp=True, link=None, mac_prefix=None, |
67 |
mode=None, floating_ip_pool=False, tags=None, backend=None, |
|
67 |
mode=None, floating_ip_pool=False, tags=None, backends=None,
|
|
68 | 68 |
lazy_create=True): |
69 | 69 |
if flavor is None: |
70 | 70 |
raise faults.BadRequest("Missing request parameter 'type'") |
... | ... | |
129 | 129 |
if not lazy_create: |
130 | 130 |
if floating_ip_pool: |
131 | 131 |
backends = Backend.objects.filter(offline=False) |
132 |
elif backend is not None: |
|
133 |
backends = [backend] |
|
134 |
else: |
|
132 |
elif backends is None: |
|
135 | 133 |
backends = [] |
136 | 134 |
|
137 | 135 |
for bend in backends: |
Also available in: Unified diff