forked from uncloud/uncloud
27 lines
736 B
Python
27 lines
736 B
Python
import subprocess
|
|
|
|
class ManagementBridge(VXLANBridge):
|
|
pass
|
|
|
|
class VXLANBridge(object):
|
|
def __init__(self, vni, bridgedev=None, uplinkdev=None):
|
|
self.management_vni = 1
|
|
|
|
cmd_create_vxlan = "ip -6 link add {vxlandev} type vxlan id {netid} dstport 4789 group ff05::{netid} dev {uplinkdev} ttl 5"
|
|
cmd_up_dev = "ip link set {dev} up"
|
|
cmd_create_bridge="ip link add {bridgedev} type bridge"
|
|
cmd_add_to_bridge="ip link set {vxlandev} master {bridgedev} up"
|
|
cmd_add_addr="ip addr add {ip} dev {bridgedev}"
|
|
|
|
def setup_networking(dev=wlan0, v6net):
|
|
vxlandev=vxlan${netid}
|
|
bridgedev=br${netid}
|
|
|
|
|
|
class DNSRA(object):
|
|
def __init__(self):
|
|
pass
|
|
|
|
|
|
class Firewall(object):
|
|
pass
|