openvswitch

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2018 License: Apache-2.0 Imports: 2 Imported by: 4 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OVSManager

type OVSManager struct {
	Client *ovs.Client
}

OVSManager : contains the client for control ovs-vsctl

func New

func New() *OVSManager

New : init OVSManager and the client to be super user

func (*OVSManager) AddDPDKPort

func (o *OVSManager) AddDPDKPort(bridgeName, ifName, dpdkDevargs string) error

AddDPDKPort : ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=0000:00:08.0

func (*OVSManager) AddFlow

func (o *OVSManager) AddFlow(bridgeName, flow string) error

AddFlow : ovs-ofctl add-flow br0 "flow"

func (*OVSManager) AddPort

func (o *OVSManager) AddPort(bridgeName, ifName string) error

AddPort : ovs-vsctl add-port br0 eth0

func (*OVSManager) CreateBridge

func (o *OVSManager) CreateBridge(bridgeName, dpType string) error

CreateBridge is a function for create bridge userspace datapath ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev kernel datapath ovs-vsctl add-br br1 -- set bridge br1 datapath_type=system

func (*OVSManager) DeleteBridge

func (o *OVSManager) DeleteBridge(bridgeName string) error

DeleteBridge : ovs-vsctl del-br br0

func (*OVSManager) DeleteFlow

func (o *OVSManager) DeleteFlow(bridgeName, flow string) error

DeleteFlow : ovs-ofctl del-flow br0 "flow"

func (*OVSManager) DeletePort

func (o *OVSManager) DeletePort(bridgeName, ifName string) error

DeletePort : ovs-vsctl del-port br0 eth0

func (*OVSManager) DumpFlows

func (o *OVSManager) DumpFlows(bridgeName string) ([]*ovs.Flow, error)

DumpFlows : ovs-ofctl dump-flows br0

func (*OVSManager) DumpPort

func (o *OVSManager) DumpPort(bridgeName, portName string) (*ovs.PortStats, error)

DumpPort : ovs-ofctl dump-ports br0 eth0

func (*OVSManager) DumpPorts

func (o *OVSManager) DumpPorts(bridgeName string) ([]*ovs.PortStats, error)

DumpPorts : ovs-ofctl dump-ports br0

func (*OVSManager) GetPort

func (o *OVSManager) GetPort(ifName string) (ovs.PortOptions, error)

GetPort : ovs-vsctl --format=json get port eth0 tag vlan_mode trunk

func (*OVSManager) ListBridges

func (o *OVSManager) ListBridges() ([]string, error)

ListBridges : ovs-vsctl list-br

func (*OVSManager) ListPorts

func (o *OVSManager) ListPorts(bridgeName string) ([]string, error)

ListPorts : ovs-vsctl list-ports

func (*OVSManager) SetPort

func (o *OVSManager) SetPort(ifName string, portOptions ovs.PortOptions) error

SetPort : ovs-vsctl --format=json set port eth0 vlan_mode=trunk trunk=1,2,3,4,5

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL