mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 23:01:15 +02:00
Merge branch '2.0' into 2.1
This commit is contained in:
275 files changed
+5384
-272
No files matched your search
@@ -88,7 +88,7 @@ class EthernetSwitch(Device):
|
||||
:param ports: ports info
|
||||
"""
|
||||
if ports != self._ports:
|
||||
if len(self._nios) > 0:
|
||||
if len(self._nios) > 0 and len(ports) != len(self._ports):
|
||||
raise NodeError("Can't modify a switch already connected.")
|
||||
|
||||
port_number = 0
|
||||
@@ -99,6 +99,13 @@ class EthernetSwitch(Device):
|
||||
|
||||
self._ports = ports
|
||||
|
||||
@asyncio.coroutine
|
||||
def update_port_settings(self):
|
||||
for port_settings in self._ports:
|
||||
port_number = port_settings["port_number"]
|
||||
if port_number in self._nios and self._nios[port_number] is not None:
|
||||
yield from self.set_port_settings(port_number, port_settings)
|
||||
|
||||
@asyncio.coroutine
|
||||
def create(self):
|
||||
|
||||
|
||||
@@ -239,10 +239,10 @@ class FrameRelaySwitch(Device):
|
||||
"""
|
||||
|
||||
if port1 not in self._nios:
|
||||
raise DynamipsError("Port {} is not allocated".format(port1))
|
||||
return
|
||||
|
||||
if port2 not in self._nios:
|
||||
raise DynamipsError("Port {} is not allocated".format(port2))
|
||||
return
|
||||
|
||||
nio1 = self._nios[port1]
|
||||
nio2 = self._nios[port2]
|
||||
|
||||
Reference in new issue
Block a user