Functional Ethernet hub with new API. Uses Dynamips backend by default for now.

This commit is contained in:
grossmj committed 2016-05-17 21:22:18 -06:00
1 parent f052299eb1
commit 7ebbdcd47c
9 files changed
+138 -402

No files matched your search

+2 -2
View File
@@ -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):
@@ -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