Fix If I change the content of cloud the cloud no longer work

Fix #1540
This commit is contained in:
Julien Duponchelle committed 2016-09-27 11:21:40 +02:00
1 parent 4ea3690951
commit 5555662b2c
2 files changed
+45 -1

No files matched your search

+6 -1
View File
@@ -58,7 +58,7 @@ class Cloud(BaseNode):
"name": interface["name"]
})
else:
self._ports_mapping = ports
self.ports_mapping = ports
def _interfaces(self):
return gns3server.utils.interfaces.interfaces()
@@ -100,6 +100,11 @@ class Cloud(BaseNode):
if len(self._nios) > 0:
raise NodeError("Can't modify a cloud already connected.")
port_number = 0
for port in ports:
port["port_number"] = port_number
port_number += 1
self._ports_mapping = ports
@asyncio.coroutine