osdn

package
v0.0.0-...-ea77a8b Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Maximum VXLAN Network Identifier as per RFC#7348
	MaxVNID = ((1 << 24) - 1)
	// VNID for the admin namespaces
	AdminVNID = uint(0)
)

Variables

This section is empty.

Functions

func SetupIptables

func SetupIptables(ipt iptables.Interface, clusterNetworkCIDR string) error

Types

type FirewallRule

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

type FlowController

type FlowController interface {
	Setup(localSubnetCIDR, clusterNetworkCIDR, serviceNetworkCIDR string, mtu uint) error

	AddOFRules(nodeIP, nodeSubnetCIDR, localIP string) error
	DelOFRules(nodeIP, localIP string) error

	AddServiceOFRules(netID uint, IP string, protocol api.ServiceProtocol, port uint) error
	DelServiceOFRules(netID uint, IP string, protocol api.ServiceProtocol, port uint) error

	UpdatePod(namespace, podName, containerID string, netID uint) error
}

type OvsController

type OvsController struct {
	Registry *Registry

	VNIDMap map[string]uint
	// contains filtered or unexported fields
}

func (*OvsController) BaseInit

func (oc *OvsController) BaseInit(registry *Registry, flowController FlowController, pluginHooks PluginHooks, hostname string, selfIP string, ready chan struct{}) error

Called by plug factory functions to initialize the generic plugin instance

func (*OvsController) StartMaster

func (oc *OvsController) StartMaster(clusterNetworkCIDR string, clusterBitsPerSubnet uint, serviceNetworkCIDR string) error

func (*OvsController) StartNode

func (oc *OvsController) StartNode(mtu uint) error

func (*OvsController) Stop

func (oc *OvsController) Stop()

func (*OvsController) SubnetStartMaster

func (oc *OvsController) SubnetStartMaster(clusterNetworkCIDR string, clusterBitsPerSubnet uint, serviceNetworkCIDR string) error

func (*OvsController) SubnetStartNode

func (oc *OvsController) SubnetStartNode(mtu uint) error

func (*OvsController) VnidStartMaster

func (oc *OvsController) VnidStartMaster() error

func (*OvsController) VnidStartNode

func (oc *OvsController) VnidStartNode() error

type PluginHooks

type PluginHooks interface {
	PluginStartMaster(clusterNetworkCIDR string, clusterBitsPerSubnet uint, serviceNetworkCIDR string) error
	PluginStartNode(mtu uint) error
}

type Registry

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

func NewRegistry

func NewRegistry(osClient *osclient.Client, kClient *kclient.Client) *Registry

func (*Registry) CreateSubnet

func (registry *Registry) CreateSubnet(nodeName string, sub *osdnapi.Subnet) error

func (*Registry) DeleteNetNamespace

func (registry *Registry) DeleteNetNamespace(name string) error

func (*Registry) DeleteSubnet

func (registry *Registry) DeleteSubnet(nodeName string) error

func (*Registry) GetClusterNetworkCIDR

func (registry *Registry) GetClusterNetworkCIDR() (string, error)

func (*Registry) GetHostSubnetLength

func (registry *Registry) GetHostSubnetLength() (int, error)

func (*Registry) GetNamespaces

func (registry *Registry) GetNamespaces() ([]string, string, error)

func (*Registry) GetNetNamespace

func (registry *Registry) GetNetNamespace(name string) (osdnapi.NetNamespace, error)

func (*Registry) GetNetNamespaces

func (registry *Registry) GetNetNamespaces() ([]osdnapi.NetNamespace, string, error)

func (*Registry) GetNodes

func (registry *Registry) GetNodes() ([]osdnapi.Node, string, error)

func (*Registry) GetPods

func (registry *Registry) GetPods() ([]osdnapi.Pod, string, error)

func (*Registry) GetRunningPods

func (registry *Registry) GetRunningPods(nodeName, namespace string) ([]osdnapi.Pod, error)

func (*Registry) GetServices

func (registry *Registry) GetServices() ([]osdnapi.Service, string, error)

func (*Registry) GetServicesForNamespace

func (registry *Registry) GetServicesForNamespace(namespace string) ([]osdnapi.Service, error)

func (*Registry) GetServicesNetworkCIDR

func (registry *Registry) GetServicesNetworkCIDR() (string, error)

func (*Registry) GetSubnet

func (registry *Registry) GetSubnet(nodeName string) (*osdnapi.Subnet, error)

func (*Registry) GetSubnets

func (registry *Registry) GetSubnets() ([]osdnapi.Subnet, string, error)

func (*Registry) OnEndpointsUpdate

func (registry *Registry) OnEndpointsUpdate(allEndpoints []kapi.Endpoints)

func (*Registry) SetBaseEndpointsHandler

func (registry *Registry) SetBaseEndpointsHandler(base pconfig.EndpointsConfigHandler)

FilteringEndpointsConfigHandler implementation

func (*Registry) WatchNamespaces

func (registry *Registry) WatchNamespaces(receiver chan<- *osdnapi.NamespaceEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchNetNamespaces

func (registry *Registry) WatchNetNamespaces(receiver chan<- *osdnapi.NetNamespaceEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchNodes

func (registry *Registry) WatchNodes(receiver chan<- *osdnapi.NodeEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchPods

func (registry *Registry) WatchPods(ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchServices

func (registry *Registry) WatchServices(receiver chan<- *osdnapi.ServiceEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchSubnets

func (registry *Registry) WatchSubnets(receiver chan<- *osdnapi.SubnetEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WriteNetNamespace

func (registry *Registry) WriteNetNamespace(name string, id uint) error

func (*Registry) WriteNetworkConfig

func (registry *Registry) WriteNetworkConfig(network string, subnetLength uint, serviceNetwork string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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