ovs

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 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 initializes a new vSwitch client..

func (*VSwitch) AddOVNBridgeMapping

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

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

func (*VSwitch) AssociateInterfaceOVNSwitchPort

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

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

func (*VSwitch) CreateBridge

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

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

CreateBridgePort adds a port to the bridge.

func (*VSwitch) DeleteBridge

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

DeleteBridge deletes a bridge.

func (*VSwitch) DeleteBridgePort

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

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

GetBridge returns a bridge entry.

func (*VSwitch) GetBridgePorts

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

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

func (*VSwitch) GetChassisID

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

GetChassisID returns the local chassis ID.

func (*VSwitch) GetHardwareOffload

func (o *VSwitch) GetHardwareOffload(ctx context.Context) (bool, error)

GetHardwareOffload returns true if hardware offloading is enabled.

func (*VSwitch) GetInterfaceAssociatedOVNSwitchPort

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

GetInterfaceAssociatedOVNSwitchPort returns the OVN switch port associated to the interface.

func (*VSwitch) GetOVNBridgeMappings

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

GetOVNBridgeMappings gets the current OVN bridge mappings.

func (*VSwitch) GetOVNEncapIP

func (o *VSwitch) GetOVNEncapIP(ctx context.Context) (net.IP, error)

GetOVNEncapIP returns the enscapsulation IP used for OVN underlay tunnels.

func (*VSwitch) GetOVNSouthboundDBRemoteAddress

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

GetOVNSouthboundDBRemoteAddress gets the address of the southbound ovn database.

func (*VSwitch) Installed

func (o *VSwitch) Installed() bool

Installed returns true if the OVS tools are installed.

func (*VSwitch) RemoveOVNBridgeMapping

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

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

func (*VSwitch) UpdateBridgePortVLANs

func (o *VSwitch) UpdateBridgePortVLANs(ctx context.Context, portName string, mode string, tag int, trunks []int) error

UpdateBridgePortVLANs sets the VLAN mode and VLAN IDs on the port.

Directories

Path Synopsis
schema
ovs

Jump to

Keyboard shortcuts

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