Documentation ¶
Index ¶
- Variables
- type VSwitch
- func (o *VSwitch) BridgePortList(bridgeName string) ([]string, error)
- func (o *VSwitch) BridgePortSet(portName string, options ...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) GetChassisID(ctx context.Context) (string, 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) GetOVNSouthboundDBRemoteAddress(ctx context.Context) (string, error)
- func (o *VSwitch) HardwareOffloadingEnabled() bool
- func (o *VSwitch) Installed() bool
- func (o *VSwitch) InterfaceAssociateOVNSwitchPort(interfaceName string, ovnSwitchPortName string) error
- func (o *VSwitch) OVNBridgeMappingAdd(bridgeName string, providerName string) error
- func (o *VSwitch) OVNBridgeMappingDelete(bridgeName string, providerName string) error
- func (o *VSwitch) OVNEncapIP() (net.IP, 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 (*VSwitch) BridgePortList ¶
BridgePortList returns a list of ports that are connected to the bridge.
func (*VSwitch) BridgePortSet ¶
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
DeleteBridge deletes a bridge.
func (*VSwitch) DeleteBridgePort ¶ added in v0.7.0
DeleteBridgePort deletes a port from the bridge (if already detached does nothing).
func (*VSwitch) GetChassisID ¶ added in v0.7.0
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
GetOVNBridgeMappings gets the current OVN bridge mappings.
func (*VSwitch) GetOVNSouthboundDBRemoteAddress ¶ added in v0.7.0
GetOVNSouthboundDBRemoteAddress gets the address of the southbound ovn database.
func (*VSwitch) HardwareOffloadingEnabled ¶
HardwareOffloadingEnabled returns true if hardware offloading is enabled.
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 ¶
OVNBridgeMappingAdd appends an OVN bridge mapping between a bridge and the logical provider name.
func (*VSwitch) OVNBridgeMappingDelete ¶
OVNBridgeMappingDelete deletes an OVN bridge mapping between a bridge and the logical provider name.