mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 22:41:12 +02:00
Some spring cleaning.
This commit is contained in:
1 parent
1c4202187a
commit
7d7972afb3
62 files changed
+459
-363
No files matched your search
@@ -25,7 +25,8 @@ class C1700_MB_1FE(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1, wics=2)
|
||||
|
||||
super().__init__(interfaces=1, wics=2)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ class C1700_MB_WIC1(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=0, wics=2)
|
||||
|
||||
super().__init__(interfaces=0, wics=2)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class C2600_MB_1E(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1, wics=3)
|
||||
|
||||
super().__init__(interfaces=1, wics=3)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class C2600_MB_1FE(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1, wics=3)
|
||||
|
||||
super().__init__(interfaces=1, wics=3)
|
||||
self._interfaces = 1
|
||||
|
||||
def __str__(self):
|
||||
|
||||
@@ -25,7 +25,8 @@ class C2600_MB_2E(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=2, wics=3)
|
||||
|
||||
super().__init__(interfaces=2, wics=3)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class C2600_MB_2FE(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=2, wics=3)
|
||||
|
||||
super().__init__(interfaces=2, wics=3)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class C7200_IO_2FE(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=2)
|
||||
|
||||
super().__init__(interfaces=2)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class C7200_IO_FE(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1)
|
||||
|
||||
super().__init__(interfaces=1)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class C7200_IO_GE_E(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1)
|
||||
|
||||
super().__init__(interfaces=1)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ from .adapter import Adapter
|
||||
class GT96100_FE(Adapter):
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=2, wics=3)
|
||||
|
||||
super().__init__(interfaces=2, wics=3)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class Leopard_2FE(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=2)
|
||||
|
||||
super().__init__(interfaces=2)
|
||||
self._interfaces = 2
|
||||
|
||||
def __str__(self):
|
||||
|
||||
@@ -25,7 +25,8 @@ class NM_16ESW(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=16)
|
||||
|
||||
super().__init__(interfaces=16)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class NM_1E(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1)
|
||||
|
||||
super().__init__(interfaces=1)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class NM_1FE_TX(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1)
|
||||
|
||||
super().__init__(interfaces=1)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class NM_4E(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=4)
|
||||
|
||||
super().__init__(interfaces=4)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class NM_4T(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=4)
|
||||
|
||||
super().__init__(interfaces=4)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_2FE_TX(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=2)
|
||||
|
||||
super().__init__(interfaces=2)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_4E(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=4)
|
||||
|
||||
super().__init__(interfaces=4)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_4T(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=4)
|
||||
|
||||
super().__init__(interfaces=4)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_8E(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=8)
|
||||
|
||||
super().__init__(interfaces=8)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_8T(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=8)
|
||||
|
||||
super().__init__(interfaces=8)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_A1(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1)
|
||||
|
||||
super().__init__(interfaces=1)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_FE_TX(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1)
|
||||
|
||||
super().__init__(interfaces=1)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_GE(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1)
|
||||
|
||||
super().__init__(interfaces=1)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class PA_POS_OC3(Adapter):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Adapter.__init__(self, interfaces=1)
|
||||
|
||||
super().__init__(interfaces=1)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
Custom exceptions for Dynamips module.
|
||||
Custom exceptions for the Dynamips module.
|
||||
"""
|
||||
|
||||
from ..vm_error import VMError
|
||||
|
||||
@@ -47,7 +47,7 @@ class Hypervisor(DynamipsHypervisor):
|
||||
|
||||
def __init__(self, path, working_dir, host, port, console_host):
|
||||
|
||||
DynamipsHypervisor.__init__(self, working_dir, host, port)
|
||||
super().__init__(working_dir, host, port)
|
||||
|
||||
# create an unique ID
|
||||
self._id = Hypervisor._instance_count
|
||||
|
||||
@@ -42,7 +42,7 @@ class NIOFIFO(NIO):
|
||||
nio_id = NIOFIFO._instance_count
|
||||
NIOFIFO._instance_count += 1
|
||||
name = 'nio_fifo' + str(nio_id)
|
||||
NIO.__init__(name, self, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -44,7 +44,7 @@ class NIOGenericEthernet(NIO):
|
||||
NIOGenericEthernet._instance_count += 1
|
||||
name = 'nio_gen_eth' + str(nio_id)
|
||||
self._ethernet_device = ethernet_device
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -44,7 +44,7 @@ class NIOLinuxEthernet(NIO):
|
||||
NIOLinuxEthernet._instance_count += 1
|
||||
name = 'nio_linux_eth' + str(nio_id)
|
||||
self._ethernet_device = ethernet_device
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -47,7 +47,7 @@ class NIOMcast(NIO):
|
||||
self._group = group
|
||||
self._port = port
|
||||
self._ttl = 1 # default TTL
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -42,7 +42,7 @@ class NIONull(NIO):
|
||||
nio_id = NIONull._instance_count
|
||||
NIONull._instance_count += 1
|
||||
name = 'nio_null' + str(nio_id)
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -44,7 +44,7 @@ class NIOTAP(NIO):
|
||||
NIOTAP._instance_count += 1
|
||||
name = 'nio_tap' + str(nio_id)
|
||||
self._tap_device = tap_device
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -48,7 +48,7 @@ class NIOUDP(NIO):
|
||||
self._lport = lport
|
||||
self._rhost = rhost
|
||||
self._rport = rport
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -46,7 +46,7 @@ class NIOUNIX(NIO):
|
||||
name = 'nio_unix' + str(nio_id)
|
||||
self._local_file = local_file
|
||||
self._remote_file = remote_file
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -46,7 +46,7 @@ class NIOVDE(NIO):
|
||||
name = 'nio_vde' + str(nio_id)
|
||||
self._control_file = control_file
|
||||
self._local_file = local_file
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
|
||||
@@ -47,7 +47,8 @@ class C1700(Router):
|
||||
"""
|
||||
|
||||
def __init__(self, name, vm_id, project, manager, dynamips_id, console=None, aux=None, chassis="1720"):
|
||||
Router.__init__(self, name, vm_id, project, manager, dynamips_id, console, aux, platform="c1700")
|
||||
|
||||
super().__init__(name, vm_id, project, manager, dynamips_id, console, aux, platform="c1700")
|
||||
|
||||
# Set default values for this platform (must be the same as Dynamips)
|
||||
self._ram = 64
|
||||
|
||||
@@ -62,7 +62,8 @@ class C2600(Router):
|
||||
"2651XM": C2600_MB_2FE}
|
||||
|
||||
def __init__(self, name, vm_id, project, manager, dynamips_id, console=None, aux=None, chassis="2610"):
|
||||
Router.__init__(self, name, vm_id, project, manager, dynamips_id, console, aux, platform="c2600")
|
||||
|
||||
super().__init__(name, vm_id, project, manager, dynamips_id, console, aux, platform="c2600")
|
||||
|
||||
# Set default values for this platform (must be the same as Dynamips)
|
||||
self._ram = 64
|
||||
|
||||
@@ -44,7 +44,8 @@ class C2691(Router):
|
||||
"""
|
||||
|
||||
def __init__(self, name, vm_id, project, manager, dynamips_id, console=None, aux=None, chassis=None):
|
||||
Router.__init__(self, name, vm_id, project, manager, dynamips_id, console, aux, platform="c2691")
|
||||
|
||||
super().__init__(name, vm_id, project, manager, dynamips_id, console, aux, platform="c2691")
|
||||
|
||||
# Set default values for this platform (must be the same as Dynamips)
|
||||
self._ram = 128
|
||||
|
||||
@@ -45,7 +45,8 @@ class C3600(Router):
|
||||
"""
|
||||
|
||||
def __init__(self, name, vm_id, project, manager, dynamips_id, console=None, aux=None, chassis="3640"):
|
||||
Router.__init__(self, name, vm_id, project, manager, dynamips_id, console, aux, platform="c3600")
|
||||
|
||||
super().__init__(name, vm_id, project, manager, dynamips_id, console, aux, platform="c3600")
|
||||
|
||||
# Set default values for this platform (must be the same as Dynamips)
|
||||
self._ram = 128
|
||||
|
||||
@@ -44,7 +44,8 @@ class C3725(Router):
|
||||
"""
|
||||
|
||||
def __init__(self, name, vm_id, project, manager, dynamips_id, console=None, aux=None, chassis=None):
|
||||
Router.__init__(self, name, vm_id, project, manager, dynamips_id, console, aux, platform="c3725")
|
||||
|
||||
super().__init__(name, vm_id, project, manager, dynamips_id, console, aux, platform="c3725")
|
||||
|
||||
# Set default values for this platform (must be the same as Dynamips)
|
||||
self._ram = 128
|
||||
|
||||
@@ -44,7 +44,8 @@ class C3745(Router):
|
||||
"""
|
||||
|
||||
def __init__(self, name, vm_id, project, manager, dynamips_id, console=None, aux=None, chassis=None):
|
||||
Router.__init__(self, name, vm_id, project, manager, dynamips_id, console, aux, platform="c3745")
|
||||
|
||||
super().__init__(name, vm_id, project, manager, dynamips_id, console, aux, platform="c3745")
|
||||
|
||||
# Set default values for this platform (must be the same as Dynamips)
|
||||
self._ram = 128
|
||||
|
||||
@@ -47,7 +47,8 @@ class C7200(Router):
|
||||
"""
|
||||
|
||||
def __init__(self, name, vm_id, project, manager, dynamips_id, console=None, aux=None, npe="npe-400", chassis=None):
|
||||
Router.__init__(self, name, vm_id, project, manager, dynamips_id, console, aux, platform="c7200")
|
||||
|
||||
super().__init__(name, vm_id, project, manager, dynamips_id, console, aux, platform="c7200")
|
||||
|
||||
# Set default values for this platform (must be the same as Dynamips)
|
||||
self._ram = 256
|
||||
|
||||
@@ -43,7 +43,7 @@ class EthernetHub(Bridge):
|
||||
|
||||
def __init__(self, name, device_id, project, manager, hypervisor=None):
|
||||
|
||||
Bridge.__init__(self, name, device_id, project, manager, hypervisor)
|
||||
super().__init__(name, device_id, project, manager, hypervisor)
|
||||
self._mappings = {}
|
||||
|
||||
def __json__(self):
|
||||
|
||||
Reference in new issue
Block a user