plugin

package
v1.0.0-alpha-01-28-201... Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFwdMode

func GetFwdMode(stateDriver core.StateDriver) string

GetFwdMode returns the fabric forwarding mode

Types

type Config

type Config struct {
	Drivers  Drivers           `json:"drivers"`
	Instance core.InstanceInfo `json:"plugin-instance"`
}

Config has the configuration for the plugin

type Drivers

type Drivers struct {
	Network  string `json:"network"`
	Endpoint string `json:"endpoint"`
	State    string `json:"state"`
}

Drivers has driver config

type NetPlugin

type NetPlugin struct {
	sync.Mutex
	ConfigFile    string
	NetworkDriver core.NetworkDriver
	StateDriver   core.StateDriver
}

NetPlugin is the configuration struct for the plugin bus. Network and Endpoint drivers are all present in `drivers/` and state drivers are present in `state/`.

func (*NetPlugin) AddBgp

func (p *NetPlugin) AddBgp(id string) error

AddBgp adds bgp configs

func (*NetPlugin) AddMaster

func (p *NetPlugin) AddMaster(node core.ServiceInfo) error

AddMaster adds a master node.

func (*NetPlugin) AddPeerHost

func (p *NetPlugin) AddPeerHost(node core.ServiceInfo) error

AddPeerHost adds an peer host.

func (*NetPlugin) AddServiceLB

func (p *NetPlugin) AddServiceLB(servicename string, spec *core.ServiceSpec) error

AddServiceLB adds service

func (*NetPlugin) CreateEndpoint

func (p *NetPlugin) CreateEndpoint(id string) error

CreateEndpoint creates an endpoint for a given ID.

func (*NetPlugin) CreateHostAccPort

func (p *NetPlugin) CreateHostAccPort(portName, globalIP, localIP string) error

CreateHostAccPort creates a host access port

func (*NetPlugin) CreateNetwork

func (p *NetPlugin) CreateNetwork(id string) error

CreateNetwork creates a network for a given ID.

func (*NetPlugin) Deinit

func (p *NetPlugin) Deinit()

Deinit is a destructor for the NetPlugin configuration.

func (*NetPlugin) DeleteBgp

func (p *NetPlugin) DeleteBgp(id string) error

DeleteBgp deletes bgp configs

func (*NetPlugin) DeleteEndpoint

func (p *NetPlugin) DeleteEndpoint(id string) error

DeleteEndpoint destroys an endpoint for an ID.

func (*NetPlugin) DeleteHostAccPort

func (p *NetPlugin) DeleteHostAccPort(portName string) error

DeleteHostAccPort creates a host access port

func (*NetPlugin) DeleteMaster

func (p *NetPlugin) DeleteMaster(node core.ServiceInfo) error

DeleteMaster removes a master node

func (*NetPlugin) DeleteNetwork

func (p *NetPlugin) DeleteNetwork(id, nwType, encap string, pktTag, extPktTag int, Gw string, tenant string) error

DeleteNetwork deletes a network provided by the ID.

func (*NetPlugin) DeletePeerHost

func (p *NetPlugin) DeletePeerHost(node core.ServiceInfo) error

DeletePeerHost removes a peer host.

func (*NetPlugin) DeleteServiceLB

func (p *NetPlugin) DeleteServiceLB(servicename string, spec *core.ServiceSpec) error

DeleteServiceLB deletes service

func (*NetPlugin) FetchEndpoint

func (p *NetPlugin) FetchEndpoint(id string) (core.State, error)

FetchEndpoint retrieves an endpoint's state for a given ID

func (*NetPlugin) FetchNetwork

func (p *NetPlugin) FetchNetwork(id string) (core.State, error)

FetchNetwork retrieves a network's state given an ID.

func (*NetPlugin) GetEndpointStats

func (p *NetPlugin) GetEndpointStats() ([]byte, error)

GetEndpointStats returns all endpoint stats

func (*NetPlugin) GlobalConfigUpdate

func (p *NetPlugin) GlobalConfigUpdate(cfg Config) error

GlobalConfigUpdate update global config

func (*NetPlugin) GlobalFwdModeUpdate

func (p *NetPlugin) GlobalFwdModeUpdate(cfg Config)

GlobalFwdModeUpdate update the global config

func (*NetPlugin) Init

func (p *NetPlugin) Init(pluginConfig Config) error

Init initializes the NetPlugin instance via the configuration string passed.

func (*NetPlugin) InspectBgp

func (p *NetPlugin) InspectBgp() ([]byte, error)

InspectBgp returns current state of the plugin

func (*NetPlugin) InspectNameserver

func (p *NetPlugin) InspectNameserver() ([]byte, error)

InspectNameserver returns current state of the nameserver

func (*NetPlugin) InspectState

func (p *NetPlugin) InspectState() ([]byte, error)

InspectState returns current state of the plugin

func (*NetPlugin) SvcProviderUpdate

func (p *NetPlugin) SvcProviderUpdate(servicename string, providers []string)

SvcProviderUpdate function

func (*NetPlugin) UpdateEndpointGroup

func (p *NetPlugin) UpdateEndpointGroup(id string) error

UpdateEndpointGroup updates the endpoint with the new endpointgroup specification for the given ID.

Jump to

Keyboard shortcuts

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