network

package
v0.0.0-...-792fdd2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddressAllocationNetwork = "default-domain:default-project:addr-alloc"
)
View Source
const (
	DefaultDomain = "default-domain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressAllocator

type AddressAllocator interface {
	LocateIpAddress(uid string) (string, error)
	ReleaseIpAddress(uid string)
}

func NewAddressAllocator

func NewAddressAllocator(client contrail.ApiClient, privateSubnet string) AddressAllocator

type AddressAllocatorImpl

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

Allocate an unique address for each Pod.

func (*AddressAllocatorImpl) LocateIpAddress

func (a *AddressAllocatorImpl) LocateIpAddress(uid string) (string, error)

func (*AddressAllocatorImpl) ReleaseIpAddress

func (a *AddressAllocatorImpl) ReleaseIpAddress(uid string)

type InstanceManager

type InstanceManager interface {
	LocateInstance(namespace, packName string) (*types.VirtualMachine, error)
	LocateInterface(network *types.VirtualNetwork, instance *types.VirtualMachine) (*types.VirtualMachineInterface, error)
	LocateInstanceIp(network *types.VirtualNetwork, nic *types.VirtualMachineInterface) (*types.InstanceIp, error)
	LocateInstanceGateway(network *types.VirtualNetwork) (string, error)
	LocateMacAddress(fqn string) (string, error)
}

func NewInstanceManager

func NewInstanceManager(client contrail.ApiClient, allocator AddressAllocator) InstanceManager

type InstanceManagerImpl

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

func (*InstanceManagerImpl) AttachFloatingIp

func (m *InstanceManagerImpl) AttachFloatingIp(packName, projectName string, floatingIp *types.FloatingIp) error

func (*InstanceManagerImpl) DeleteInstance

func (m *InstanceManagerImpl) DeleteInstance(uid string) error

func (*InstanceManagerImpl) LocateInstance

func (m *InstanceManagerImpl) LocateInstance(tenant, packName string) (*types.VirtualMachine, error)

func (*InstanceManagerImpl) LocateInstanceGateway

func (m *InstanceManagerImpl) LocateInstanceGateway(network *types.VirtualNetwork) (string, error)

func (*InstanceManagerImpl) LocateInstanceIp

func (*InstanceManagerImpl) LocateInterface

func (m *InstanceManagerImpl) LocateInterface(network *types.VirtualNetwork, instance *types.VirtualMachine) (*types.VirtualMachineInterface, error)

func (*InstanceManagerImpl) LocateMacAddress

func (m *InstanceManagerImpl) LocateMacAddress(fqn string) (string, error)

func (*InstanceManagerImpl) LookupInterface

func (m *InstanceManagerImpl) LookupInterface(namespace, packName string) (*types.VirtualMachineInterface, error)

func (*InstanceManagerImpl) ReleaseInstanceIp

func (m *InstanceManagerImpl) ReleaseInstanceIp(namespace, nicName, instanceUID string) error

func (*InstanceManagerImpl) ReleaseInterface

func (m *InstanceManagerImpl) ReleaseInterface(namespace, packName string) error

type InstanceMetadata

type InstanceMetadata struct {
	InstanceId string
	NicId      string
	MacAddress string
	IpAddress  string
	Gateway    string
}

type NetnsManager

type NetnsManager interface {
	CreateInterface(dockerId, macAddress, ipAddress, gateway string) (string, error)
	DeleteInterface(dockerId string) error
}

func NewNetnsManager

func NewNetnsManager() NetnsManager

type NetnsManagerImpl

type NetnsManagerImpl struct {
}

func (*NetnsManagerImpl) CreateInterface

func (m *NetnsManagerImpl) CreateInterface(dockerId, macAddress, ipAddress, gateway string) (string, error)

func (*NetnsManagerImpl) DeleteInterface

func (m *NetnsManagerImpl) DeleteInterface(dockerId string) error

type NetworkManager

type NetworkManager interface {
	Build(tenant, network, instanceName string) (*InstanceMetadata, error)
}

func NewNetworkManager

func NewNetworkManager(server string, port int, privateSubnet string) NetworkManager

type NetworkManagerImpl

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

func (*NetworkManagerImpl) Build

func (m *NetworkManagerImpl) Build(tenant, networkName, instanceName string) (*InstanceMetadata, error)

func (*NetworkManagerImpl) LocateNetwork

func (m *NetworkManagerImpl) LocateNetwork(tenant, networkName string) (*types.VirtualNetwork, error)

Jump to

Keyboard shortcuts

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