Documentation ¶
Index ¶
- Constants
- type Bridge
- type OpenvSwitch
- type OvsBridgeDriver
- func (ovsd *OvsBridgeDriver) AttachPortToMirrorConsumer(portUUIDStr, mirrorName string) error
- func (ovsd *OvsBridgeDriver) AttachPortToMirrorProducer(portUUIDStr, mirrorName string, ingress, egress bool) error
- func (ovsd *OvsBridgeDriver) CleanEmptyMirrors() error
- func (ovsd *OvsBridgeDriver) CreateMirror(bridgeName, mirrorName string) error
- func (ovsd *OvsBridgeDriver) CreatePort(intfName, contNetnsPath, contIfaceName, ovnPortName string, ofportRequest uint, ...) error
- func (ovsd *OvsBridgeDriver) DeleteMirror(bridgeName, mirrorName string) error
- func (ovsd *OvsBridgeDriver) DeletePort(intfName string) error
- func (ovsd *OvsBridgeDriver) DetachPortFromMirrorConsumer(portUUIDStr, mirrorName string) error
- func (ovsd *OvsBridgeDriver) DetachPortFromMirrorProducer(portUUIDStr, mirrorName string) error
- func (ovsd *OvsBridgeDriver) GetMirrorUUID(mirrorName string) (ovsdb.UUID, error)
- func (ovsd *OvsBridgeDriver) GetPortUUID(portName string) (ovsdb.UUID, error)
- func (ovsd *OvsBridgeDriver) IsMirrorUsed(bridgeName, mirrorName string) (bool, error)
- type OvsDriver
- func (ovsd *OvsDriver) BridgeList() ([]string, error)
- func (ovsd *OvsDriver) CheckMirrorConsumerWithPorts(mirrorName string, portUUIDStr string) (bool, error)
- func (ovsd *OvsDriver) CheckMirrorProducerWithPorts(mirrorName string, ingress, egress bool, portUUIDStr string) (bool, error)
- func (ovsd *OvsDriver) Disconnected(ovsClient client.Client)
- func (ovsd *OvsDriver) Echo([]interface{})
- func (ovsd *OvsDriver) FindInterfacesWithError() ([]string, error)
- func (ovsd *OvsDriver) GetOFPortOpState(portName string) (string, error)
- func (ovsd *OvsDriver) GetOFPortVlanState(portName string) (string, *uint, []uint, error)
- func (ovsd *OvsDriver) GetOvsPortForContIface(contIface, contNetnsPath string) (string, bool, error)
- func (ovsd *OvsDriver) IsBridgePresent(bridgeName string) (bool, error)
- func (ovsd *OvsDriver) IsMirrorConsumerAlreadyAttached(mirrorName string) (bool, error)
- func (ovsd *OvsDriver) IsMirrorPresent(mirrorName string) (bool, error)
- func (ovsd *OvsDriver) Locked([]interface{})
- func (ovsd *OvsDriver) Stolen([]interface{})
- func (ovsd *OvsDriver) Update(context interface{}, tableUpdates ovsdb.TableUpdates)
Constants ¶
const ( MirrorProducer = iota MirrorConsumer )
constants used to identify if a mirror is a comsumer or a producer
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶ added in v0.22.0
type Bridge struct {
UUID string `ovsdb:"_uuid"`
}
Bridge defines an object in Bridge table
type OpenvSwitch ¶ added in v0.22.0
type OpenvSwitch struct {
UUID string `ovsdb:"_uuid"`
}
OpenvSwitch defines an object in Open_vSwitch table
type OvsBridgeDriver ¶
OvsBridgeDriver OVS bridge driver state
func NewOvsBridgeDriver ¶
func NewOvsBridgeDriver(bridgeName, socketFile string) (*OvsBridgeDriver, error)
NewOvsBridgeDriver Create a new OVS driver for a bridge with Unix socket
func (*OvsBridgeDriver) AttachPortToMirrorConsumer ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) AttachPortToMirrorConsumer(portUUIDStr, mirrorName string) error
AttachPortToMirrorConsumer Adds portUUID as 'output_port' to an existing mirror
func (*OvsBridgeDriver) AttachPortToMirrorProducer ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) AttachPortToMirrorProducer(portUUIDStr, mirrorName string, ingress, egress bool) error
AttachPortToMirrorProducer Adds a portUUID as 'select_src_port' or 'select_dst_port' to an existing mirror based on ingress and egress values
func (*OvsBridgeDriver) CleanEmptyMirrors ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) CleanEmptyMirrors() error
CleanEmptyMirrors removes all empty mirrors
func (*OvsBridgeDriver) CreateMirror ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) CreateMirror(bridgeName, mirrorName string) error
CreateMirror Creates a new mirror to a specific bridge
func (*OvsBridgeDriver) CreatePort ¶
func (ovsd *OvsBridgeDriver) CreatePort(intfName, contNetnsPath, contIfaceName, ovnPortName string, ofportRequest uint, vlanTag uint, trunks []uint, portType string) error
CreatePort Create an internal port in OVS
func (*OvsBridgeDriver) DeleteMirror ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) DeleteMirror(bridgeName, mirrorName string) error
DeleteMirror Removes a mirror of a specific bridge
func (*OvsBridgeDriver) DeletePort ¶
func (ovsd *OvsBridgeDriver) DeletePort(intfName string) error
DeletePort Delete a port from OVS
func (*OvsBridgeDriver) DetachPortFromMirrorConsumer ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) DetachPortFromMirrorConsumer(portUUIDStr, mirrorName string) error
DetachPortFromMirrorConsumer Removes portUUID as 'output_port' from an existing mirror
func (*OvsBridgeDriver) DetachPortFromMirrorProducer ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) DetachPortFromMirrorProducer(portUUIDStr, mirrorName string) error
DetachPortFromMirrorProducer Removes portUUID as both 'select_src_port' and 'select_dst_port' from an existing mirror
func (*OvsBridgeDriver) GetMirrorUUID ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) GetMirrorUUID(mirrorName string) (ovsdb.UUID, error)
GetMirrorUUID Retrieves the UUID of a mirror from its name
func (*OvsBridgeDriver) GetPortUUID ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) GetPortUUID(portName string) (ovsdb.UUID, error)
GetPortUUID Retrieves the UUID of a port from its name
func (*OvsBridgeDriver) IsMirrorUsed ¶ added in v0.28.0
func (ovsd *OvsBridgeDriver) IsMirrorUsed(bridgeName, mirrorName string) (bool, error)
IsMirrorUsed Checks if a mirror of a specific bridge is used (it contains at least a portUUID)
type OvsDriver ¶ added in v0.20.0
type OvsDriver struct {
// contains filtered or unexported fields
}
OvsDriver OVS driver state
func NewOvsDriver ¶ added in v0.20.0
NewOvsDriver Create a new OVS driver with Unix socket
func (*OvsDriver) BridgeList ¶ added in v0.20.0
BridgeList returns available ovs bridge names
func (*OvsDriver) CheckMirrorConsumerWithPorts ¶ added in v0.28.0
func (ovsd *OvsDriver) CheckMirrorConsumerWithPorts(mirrorName string, portUUIDStr string) (bool, error)
CheckMirrorConsumerWithPorts Checks the configuration of a mirror consumer
func (*OvsDriver) CheckMirrorProducerWithPorts ¶ added in v0.28.0
func (ovsd *OvsDriver) CheckMirrorProducerWithPorts(mirrorName string, ingress, egress bool, portUUIDStr string) (bool, error)
CheckMirrorProducerWithPorts Checks the configuration of a mirror producer based on ingress and egress values
func (*OvsDriver) Disconnected ¶ added in v0.20.0
Disconnected yet to be implemented
func (*OvsDriver) Echo ¶ added in v0.20.0
func (ovsd *OvsDriver) Echo([]interface{})
Echo yet to be implemented
func (*OvsDriver) FindInterfacesWithError ¶ added in v0.20.0
FindInterfacesWithError returns the interfaces which are in error state
func (*OvsDriver) GetOFPortOpState ¶ added in v0.20.0
GetOFPortOpState retrieves link state of the OF port
func (*OvsDriver) GetOFPortVlanState ¶ added in v0.26.0
GetOFPortVlanState retrieves port vlan state of the OF port
func (*OvsDriver) GetOvsPortForContIface ¶ added in v0.20.0
func (ovsd *OvsDriver) GetOvsPortForContIface(contIface, contNetnsPath string) (string, bool, error)
GetOvsPortForContIface Return ovs port name for an container interface
func (*OvsDriver) IsBridgePresent ¶ added in v0.20.0
IsBridgePresent Checks if the bridge entry already exists
func (*OvsDriver) IsMirrorConsumerAlreadyAttached ¶ added in v0.28.0
IsMirrorConsumerAlreadyAttached Checks if the 'output_port' column of a mirror consumer contains a port UUID
func (*OvsDriver) IsMirrorPresent ¶ added in v0.28.0
IsMirrorPresent Checks if the Mirror entry already exists
func (*OvsDriver) Locked ¶ added in v0.20.0
func (ovsd *OvsDriver) Locked([]interface{})
Locked yet to be implemented
func (*OvsDriver) Stolen ¶ added in v0.20.0
func (ovsd *OvsDriver) Stolen([]interface{})
Stolen yet to be implemented
func (*OvsDriver) Update ¶ added in v0.20.0
func (ovsd *OvsDriver) Update(context interface{}, tableUpdates ovsdb.TableUpdates)
Update yet to be implemented