Commit 0864c45d authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos
Browse files

cyclades: s/slac/enable_slac in api/subnets.py

parent 3820e374
......@@ -129,9 +129,9 @@ def create_subnet(request):
if ipversion == 6:
networks.validate_network_params(None, None, cidr, gateway)
slac = subnet.get('slac', None)
slac = subnet.get('enable_slac', None)
if slac is not None:
dhcp = check_boolean_value(slac, "slac")
dhcp = check_boolean_value(slac, "enable_slac")
else:
dhcp = check_boolean_value(subnet.get('enable_dhcp', True), "dhcp")
else:
......@@ -278,7 +278,7 @@ def subnet_to_dict(subnet):
'allocation_pools': pools if pools is not None else []})
if subnet.ipversion == 6:
dictionary['slac'] = subnet.dhcp
dictionary['enable_slac'] = subnet.dhcp
return dictionary
......
......@@ -100,7 +100,7 @@ class SubnetTest(BaseAPITest):
'network_id': test_net.id,
'cidr': '10.0.3.0/24',
'ip_version': 4,
'slac': False}
'enable_slac': False}
}
response = self.post(SUBNETS_URL, test_net.userid,
json.dumps(request), "json")
......@@ -114,7 +114,7 @@ class SubnetTest(BaseAPITest):
'network_id': test_net.id,
'cidr': 'fdc1:4992:1130:fc0b::/64',
'ip_version': 6,
'slac': False}
'enable_slac': False}
}
response = self.post(SUBNETS_URL, test_net.userid,
json.dumps(request), "json")
......@@ -128,7 +128,7 @@ class SubnetTest(BaseAPITest):
'network_id': test_net.id,
'cidr': 'fdc1:4992:1130:fc0b::/64',
'ip_version': 6,
'slac': 'Random'}
'enable_slac': 'Random'}
}
response = self.post(SUBNETS_URL, test_net.userid,
json.dumps(request), "json")
......
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