netcontrol

package
v4.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetryCount      = 5
	RetryInterval      = 100
	DanmNetKind        = "DanmNet"
	TenantNetworkKind  = "TenantNetwork"
	ClusterNetworkKind = "ClusterNetwork"
)

Variables

This section is empty.

Functions

func AddClusterNetwork

func AddClusterNetwork(obj interface{})

func AddDanmNet

func AddDanmNet(obj interface{})

func AddTenantNetwork

func AddTenantNetwork(obj interface{})

func ConvertCnetToDnet

func ConvertCnetToDnet(cnet *danmtypes.ClusterNetwork) *danmtypes.DanmNet

func ConvertDnetToCnet

func ConvertDnetToCnet(dnet *danmtypes.DanmNet) *danmtypes.ClusterNetwork

func ConvertDnetToTnet

func ConvertDnetToTnet(dnet *danmtypes.DanmNet) *danmtypes.TenantNetwork

func ConvertTnetToDnet

func ConvertTnetToDnet(tnet *danmtypes.TenantNetwork) *danmtypes.DanmNet

func DeleteClusterNetwork

func DeleteClusterNetwork(obj interface{})

func DeleteDanmNet

func DeleteDanmNet(obj interface{})

func DeleteTenantNetwork

func DeleteTenantNetwork(obj interface{})

func GetDefaultNetwork

func GetDefaultNetwork(danmClient danmclientset.Interface, defaultNetworkName, nameSpace string) (*danmtypes.DanmNet, error)

func GetNetworkFromEp

func GetNetworkFromEp(danmClient danmclientset.Interface, ep *danmtypes.DanmEp) (*danmtypes.DanmNet, error)

func GetNetworkFromInterface

func GetNetworkFromInterface(danmClient danmclientset.Interface, iface datastructs.Interface, nameSpace string) (*danmtypes.DanmNet, error)

func PutNetwork

func PutNetwork(danmClient danmclientset.Interface, dnet *danmtypes.DanmNet) (bool, error)

func RefreshNetwork

func RefreshNetwork(danmClient danmclientset.Interface, netInfo danmtypes.DanmNet) (*danmtypes.DanmNet, error)

func UpdateClusterNetwork

func UpdateClusterNetwork(oldObj, newObj interface{})

func UpdateDanmNet

func UpdateDanmNet(oldObj, newObj interface{})

func UpdateTenantNetwork

func UpdateTenantNetwork(oldObj, newObj interface{})

Types

type LinkInfo

type LinkInfo struct {
	// contains filtered or unexported fields
}

LinkInfo is an absract struct to represent a host NIC of a special type: either VLAN, or VxLAN The ID of the link is stored together with its Golang representation

type NetWatcher

type NetWatcher struct {
	Factories   map[string]danminformers.SharedInformerFactory
	Clients     map[string]danmclientset.Interface
	Controllers map[string]cache.Controller
	StopChan    *chan struct{}
}

NetWatcher represents an object watching the K8s API for changes in all three network management API paths Upon the reception of a notification it handles the related VxLAN/VLAN/RT creation/deletions on the host

func NewWatcher

func NewWatcher(cfg *rest.Config, stopChan *chan struct{}) (*NetWatcher, error)

NewWatcher initializes and returns a new NetWatcher object Upon the reception of a notification it performs host network management operations Watcher stores all K8s Clients, Factories, and Informeres of the DANM network management APIs

func (*NetWatcher) Run

func (netWatcher *NetWatcher) Run(stopCh *chan struct{})

func (*NetWatcher) WatchErrorHandler

func (netWatcher *NetWatcher) WatchErrorHandler(r *cache.Reflector, err error)

Jump to

Keyboard shortcuts

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