updated ctrlnets to assign unique addresses per server, fixed ovs command issue for interface specific commands
This commit is contained in:
parent
0b8bc7bd13
commit
61a4e228a1
6 changed files with 81 additions and 79 deletions
|
@ -7,6 +7,20 @@ import os
|
|||
from core.constants import BRCTL_BIN, ETHTOOL_BIN, IP_BIN, OVS_BIN, TC_BIN
|
||||
|
||||
|
||||
def get_net_client(use_ovs, run):
|
||||
"""
|
||||
Retrieve desired net client for running network commands.
|
||||
|
||||
:param bool use_ovs: True for OVS bridges, False for Linux bridges
|
||||
:param func run: function used to run net client commands
|
||||
:return: net client class
|
||||
"""
|
||||
if use_ovs:
|
||||
return OvsNetClient(run)
|
||||
else:
|
||||
return LinuxNetClient(run)
|
||||
|
||||
|
||||
class LinuxNetClient(object):
|
||||
"""
|
||||
Client for creating Linux bridges and ip interfaces for nodes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue