Commit 1a5982b5 authored by Giorgos Verigakis's avatar Giorgos Verigakis
Browse files

Use snf_null as the default link

parent 9ba5e0d7
......@@ -18,7 +18,7 @@
"pk": 1,
"fields": {
"index": 0,
"name": "snf_public",
"name": "snf_null",
"available": 0
}
},
......
......@@ -181,9 +181,10 @@ def create_network(name, owner):
@transaction.commit_on_success
def delete_network(net):
link = net.link
link.available = True
link.network = None
link.save()
if link.name != settings.GANETI_NULL_LINK:
link.available = True
link.network = None
link.save()
for vm in net.machines.all():
disconnect_from_network(vm, net)
......
......@@ -240,5 +240,6 @@ LOGIN_PATH = "/login"
AUTH_TOKEN_DURATION = 30 * 24
GANETI_PUBLIC_LINK = 'snf_public'
GANETI_NULL_LINK = 'snf_null' # This value is also hardcoded in the fixture
GANETI_LINK_PREFIX = 'prv'
GANETI_MAX_LINK_NUMBER = 100
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