Documentation ¶
Index ¶
- Variables
- type VSwitch
- func (o *VSwitch) AddOVNBridgeMapping(ctx context.Context, bridgeName string, providerName string) error
- func (o *VSwitch) AssociateInterfaceOVNSwitchPort(ctx context.Context, interfaceName string, ovnSwitchPortName string) error
- func (o *VSwitch) CreateBridge(ctx context.Context, bridgeName string, mayExist bool, hwaddr net.HardwareAddr, ...) error
- func (o *VSwitch) CreateBridgePort(ctx context.Context, bridgeName string, portName string, mayExist bool) error
- func (o *VSwitch) DeleteBridge(ctx context.Context, bridgeName string) error
- func (o *VSwitch) DeleteBridgePort(ctx context.Context, bridgeName string, portName string) error
- func (o *VSwitch) GetBridge(ctx context.Context, bridgeName string) (*ovsSwitch.Bridge, error)
- func (o *VSwitch) GetBridgePorts(ctx context.Context, bridgeName string) ([]string, error)
- func (o *VSwitch) GetChassisID(ctx context.Context) (string, error)
- func (o *VSwitch) GetHardwareOffload(ctx context.Context) (bool, error)
- func (o *VSwitch) GetInterfaceAssociatedOVNSwitchPort(ctx context.Context, interfaceName string) (string, error)
- func (o *VSwitch) GetOVNBridgeMappings(ctx context.Context, bridgeName string) ([]string, error)
- func (o *VSwitch) GetOVNEncapIP(ctx context.Context) (net.IP, error)
- func (o *VSwitch) GetOVNSouthboundDBRemoteAddress(ctx context.Context) (string, error)
- func (o *VSwitch) RemoveOVNBridgeMapping(ctx context.Context, bridgeName string, providerName string) error
- func (o *VSwitch) UpdateBridgePortVLANs(ctx context.Context, portName string, mode string, tag int, trunks []int) error
Constants ¶
This section is empty.
Variables ¶
var ErrExists = fmt.Errorf("object already exists")
ErrExists indicates that a DB record already exists.
var ErrNotFound = ovsdbClient.ErrNotFound
ErrNotFound indicates that a DB record doesn't exist.
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 ¶
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 ¶
DeleteBridge deletes a bridge.
func (*VSwitch) DeleteBridgePort ¶
DeleteBridgePort deletes a port from the bridge (if already detached does nothing).
func (*VSwitch) GetBridgePorts ¶
GetBridgePorts returns a list of ports that are connected to the bridge.
func (*VSwitch) GetChassisID ¶
GetChassisID returns the local chassis ID.
func (*VSwitch) GetHardwareOffload ¶
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 ¶
GetOVNBridgeMappings gets the current OVN bridge mappings.
func (*VSwitch) GetOVNEncapIP ¶
GetOVNEncapIP returns the enscapsulation IP used for OVN underlay tunnels.
func (*VSwitch) GetOVNSouthboundDBRemoteAddress ¶
GetOVNSouthboundDBRemoteAddress gets the address of the southbound ovn database.