ovs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExists = fmt.Errorf("object already exists")

ErrExists indicates that a DB record already exists.

View Source
var ErrNotFound = ovsdbClient.ErrNotFound

ErrNotFound indicates that a DB record doesn't exist.

View Source
var ErrNotManaged = fmt.Errorf("object not incus-managed")

ErrNotManaged indicates that a DB record wasn't created by Incus.

Functions

This section is empty.

Types

type VSwitch

type VSwitch struct {
	// contains filtered or unexported fields
}

VSwitch client.

func NewVSwitch

func NewVSwitch() (*VSwitch, error)

NewVSwitch initialises a new vSwitch client..

func (*VSwitch) BridgePortList

func (o *VSwitch) BridgePortList(bridgeName string) ([]string, error)

BridgePortList returns a list of ports that are connected to the bridge.

func (*VSwitch) BridgePortSet

func (o *VSwitch) BridgePortSet(portName string, options ...string) error

BridgePortSet sets port options.

func (*VSwitch) CreateBridge added in v0.7.0

func (o *VSwitch) CreateBridge(ctx context.Context, bridgeName string, mayExist bool, hwaddr net.HardwareAddr, mtu uint32) error

CreateBridge adds a new bridge.

func (*VSwitch) CreateBridgePort added in v0.7.0

func (o *VSwitch) CreateBridgePort(ctx context.Context, bridgeName string, portName string, mayExist bool) error

CreateBridgePort adds a port to the bridge.

func (*VSwitch) DeleteBridge added in v0.7.0

func (o *VSwitch) DeleteBridge(ctx context.Context, bridgeName string) error

DeleteBridge deletes a bridge.

func (*VSwitch) DeleteBridgePort added in v0.7.0

func (o *VSwitch) DeleteBridgePort(ctx context.Context, bridgeName string, portName string) error

DeleteBridgePort deletes a port from the bridge (if already detached does nothing).

func (*VSwitch) GetBridge added in v0.7.0

func (o *VSwitch) GetBridge(ctx context.Context, bridgeName string) (*ovsSwitch.Bridge, error)

GetBridge returns a bridge entry.

func (*VSwitch) GetChassisID added in v0.7.0

func (o *VSwitch) GetChassisID(ctx context.Context) (string, error)

GetChassisID returns the local chassis ID.

func (*VSwitch) GetInterfaceAssociatedOVNSwitchPort added in v0.7.0

func (o *VSwitch) GetInterfaceAssociatedOVNSwitchPort(ctx context.Context, interfaceName string) (string, error)

GetInterfaceAssociatedOVNSwitchPort returns the OVN switch port associated to the interface.

func (*VSwitch) GetOVNBridgeMappings added in v0.7.0

func (o *VSwitch) GetOVNBridgeMappings(ctx context.Context, bridgeName string) ([]string, error)

GetOVNBridgeMappings gets the current OVN bridge mappings.

func (*VSwitch) GetOVNSouthboundDBRemoteAddress added in v0.7.0

func (o *VSwitch) GetOVNSouthboundDBRemoteAddress(ctx context.Context) (string, error)

GetOVNSouthboundDBRemoteAddress gets the address of the southbound ovn database.

func (*VSwitch) HardwareOffloadingEnabled

func (o *VSwitch) HardwareOffloadingEnabled() bool

HardwareOffloadingEnabled returns true if hardware offloading is enabled.

func (*VSwitch) Installed

func (o *VSwitch) Installed() bool

Installed returns true if the OVS tools are installed.

func (*VSwitch) InterfaceAssociateOVNSwitchPort

func (o *VSwitch) InterfaceAssociateOVNSwitchPort(interfaceName string, ovnSwitchPortName string) error

InterfaceAssociateOVNSwitchPort removes any existing switch ports associated to the specified ovnSwitchPortName and then associates the specified interfaceName to the OVN switch port.

func (*VSwitch) OVNBridgeMappingAdd

func (o *VSwitch) OVNBridgeMappingAdd(bridgeName string, providerName string) error

OVNBridgeMappingAdd appends an OVN bridge mapping between a bridge and the logical provider name.

func (*VSwitch) OVNBridgeMappingDelete

func (o *VSwitch) OVNBridgeMappingDelete(bridgeName string, providerName string) error

OVNBridgeMappingDelete deletes an OVN bridge mapping between a bridge and the logical provider name.

func (*VSwitch) OVNEncapIP

func (o *VSwitch) OVNEncapIP() (net.IP, error)

OVNEncapIP returns the enscapsulation IP used for OVN underlay tunnels.

Directories

Path Synopsis
schema
ovs

Jump to

Keyboard shortcuts

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