mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix If I change the content of cloud the cloud no longer work
Fix #1540
This commit is contained in:
2 files changed
+45
-1
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user