mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Functional Ethernet hub with new API. Uses Dynamips backend by default for now.
This commit is contained in:
1 parent
f052299eb1
commit
7ebbdcd47c
9 files changed
+138
-402
No files matched your search
@@ -43,7 +43,7 @@ from .dynamips_error import DynamipsError
|
||||
from .hypervisor import Hypervisor
|
||||
from .nodes.router import Router
|
||||
from .dynamips_vm_factory import DynamipsVMFactory
|
||||
from .dynamips_device import DynamipsDevice
|
||||
from .dynamips_device_factory import DynamipsDeviceFactory
|
||||
|
||||
# NIOs
|
||||
from .nios.nio_udp import NIOUDP
|
||||
@@ -103,7 +103,7 @@ WIC_MATRIX = {"WIC-1ENET": WIC_1ENET,
|
||||
class Dynamips(BaseManager):
|
||||
|
||||
_NODE_CLASS = DynamipsVMFactory
|
||||
_DEVICE_CLASS = DynamipsDevice
|
||||
_DEVICE_CLASS = DynamipsDeviceFactory
|
||||
_ghost_ios_lock = None
|
||||
|
||||
def __init__(self):
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ DEVICES = {'atm_switch': ATMSwitch,
|
||||
'ethernet_hub': EthernetHub}
|
||||
|
||||
|
||||
class DynamipsDevice:
|
||||
class DynamipsDeviceFactory:
|
||||
|
||||
"""
|
||||
Factory to create an Device object based on the type
|
||||
@@ -49,7 +49,7 @@ class EthernetHub(Bridge):
|
||||
def __json__(self):
|
||||
|
||||
return {"name": self.name,
|
||||
"device_id": self.id,
|
||||
"node_id": self.id,
|
||||
"project_id": self.project.id}
|
||||
|
||||
@asyncio.coroutine
|
||||
|
||||
Reference in new issue
Block a user