Make better error when we have no netmask

Fix #1541
This commit is contained in:
Julien Duponchelle committed 2016-09-27 11:47:18 +02:00
1 parent 5555662b2c
commit 3ea5df7462
3 files changed
+29 -1

No files matched your search

@@ -215,6 +215,8 @@ class Cloud(BaseNode):
yield from self._ubridge_send('bridge add_nio_fusion_vmnet {name} "{interface}"'.format(name=bridge_name,
interface=port_info["interface"]))
else:
if not gns3server.utils.interfaces.has_netmask(port_info["interface"]):
raise NodeError("Interface {} don't have a netmask".format(port_info["interface"]))
yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=bridge_name,
interface=port_info["interface"]))