ovs

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseModel

func DatabaseModel() (model.ClientDBModel, error)

DatabaseModel returns the DatabaseModel object to be used in libovsdb

Types

type BridgeEntry

type BridgeEntry struct {
	UUID         string            `ovsdb:"_uuid"`
	Name         string            `ovsdb:"name"`
	DatapathType string            `ovsdb:"datapath_type"`
	ExternalIDs  map[string]string `ovsdb:"external_ids"`
	OtherConfig  map[string]string `ovsdb:"other_config"`
	Ports        []string          `ovsdb:"ports"`
}

BridgeEntry represents some fields of the object in the Bridge table

func (*BridgeEntry) HasPort

func (b *BridgeEntry) HasPort(portUUID string) bool

HasPort returns true if portUUID is found in Ports slice

type Interface

type Interface interface {
	// CreateOVSBridge creates OVS bridge from the provided config,
	// does nothing if OVS bridge with the right config already exist,
	// if OVS bridge exist with different config it will be removed and re-created
	CreateOVSBridge(ctx context.Context, conf *sriovnetworkv1.OVSConfigExt) error
	// GetOVSBridges returns configuration for all managed bridges
	GetOVSBridges(ctx context.Context) ([]sriovnetworkv1.OVSConfigExt, error)
	// RemoveOVSBridge removes managed OVS bridge by name
	RemoveOVSBridge(ctx context.Context, bridgeName string) error
	// RemoveInterfaceFromOVSBridge interface from the managed OVS bridge
	RemoveInterfaceFromOVSBridge(ctx context.Context, ifaceAddr string) error
}

Interface provides functions to configure managed OVS bridges

func New

func New(store ovsStorePkg.Store) Interface

New creates new instance of the OVS interface

type InterfaceEntry

type InterfaceEntry struct {
	UUID        string            `ovsdb:"_uuid"`
	Name        string            `ovsdb:"name"`
	Type        string            `ovsdb:"type"`
	Error       *string           `ovsdb:"error"`
	Options     map[string]string `ovsdb:"options"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	OtherConfig map[string]string `ovsdb:"other_config"`
}

InterfaceEntry represents some fields of the object in the Interface table

type OpenvSwitchEntry

type OpenvSwitchEntry struct {
	UUID    string   `ovsdb:"_uuid"`
	Bridges []string `ovsdb:"bridges"`
}

OpenvSwitchEntry represents some fields of the object in the Open_vSwitch table

type PortEntry

type PortEntry struct {
	UUID       string   `ovsdb:"_uuid"`
	Name       string   `ovsdb:"name"`
	Interfaces []string `ovsdb:"interfaces"`
}

PortEntry represents some fields of the object in the Port table

Directories

Path Synopsis
Package mock_ovs is a generated GoMock package.
Package mock_ovs is a generated GoMock package.
mock
Package mock_store is a generated GoMock package.
Package mock_store is a generated GoMock package.

Jump to

Keyboard shortcuts

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