Commit 26d27aef authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Fix typo and tests

parent 9ae370e6
......@@ -187,7 +187,7 @@ class Command(BaseCommand):
backend = get_backend(backend_id)
backends.append(backend)
network = networks.create(user_id=userid, name=name, flavor=flavor,
network = networks.create(userid=userid, name=name, flavor=flavor,
subnet=subnet, gateway=gateway,
subnet6=subnet6, gateway6=gateway6,
dhcp=dhcp, public=public, mode=mode,
......
......@@ -186,6 +186,8 @@ class ServerAPITest(ComputeAPITest):
server = json.loads(response.content)['server']
self.assertEqual(server["SNF:fqdn"], "snf-%d.vm-%d.example.org" %
(vm.id, vm.id))
vm = mfactory.VirtualMachineFactory()
# No setting, no NICs
with override_settings(settings,
CYCLADES_SERVERS_FQDN=None):
......@@ -240,6 +242,7 @@ class ServerAPITest(ComputeAPITest):
ports = {
22: lambda ip, id, fqdn, user:
ip and ("gate", _port_from_ip(ip, 10000)) or None}
vm = mfactory.VirtualMachineFactory()
with override_settings(settings,
CYCLADES_PORT_FORWARDING=ports):
response = self.myget("servers/%d" % vm.id, vm.userid)
......
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