implemented net client for linux and ovs

This commit is contained in:
bharnden 2019-09-26 22:04:29 -07:00
parent b449729a31
commit 0c002bb491
3 changed files with 114 additions and 62 deletions

View file

@ -19,7 +19,7 @@ from core.emulator.data import LinkData, NodeData
from core.emulator.enumerations import LinkTypes, NodeTypes
from core.nodes import client, ipaddress
from core.nodes.interface import CoreInterface, TunTap, Veth
from core.nodes.netclient import BrctlClient, OvsClient
from core.nodes.netclient import LinuxNetClient, OvsNetClient
_DEFAULT_MTU = 1500
@ -1065,10 +1065,10 @@ class CoreNetworkBase(NodeBase):
super(CoreNetworkBase, self).__init__(session, _id, name, start=start)
self._linked = {}
self._linked_lock = threading.Lock()
if session.options.get_config("ovs"):
self.net_client = OvsClient()
if session.options.get_config("ovs") == "True":
self.net_client = OvsNetClient()
else:
self.net_client = BrctlClient()
self.net_client = LinuxNetClient()
def startup(self):
"""