Documentation
¶
Index ¶
- Constants
- type AddressAllocator
- type AddressAllocatorImpl
- type InstanceManager
- type InstanceManagerImpl
- func (m *InstanceManagerImpl) AttachFloatingIp(packName, projectName string, floatingIp *types.FloatingIp) error
- func (m *InstanceManagerImpl) DeleteInstance(uid string) error
- func (m *InstanceManagerImpl) LocateInstance(tenant, packName string) (*types.VirtualMachine, error)
- func (m *InstanceManagerImpl) LocateInstanceGateway(network *types.VirtualNetwork) (string, error)
- func (m *InstanceManagerImpl) LocateInstanceIp(network *types.VirtualNetwork, nic *types.VirtualMachineInterface) (*types.InstanceIp, error)
- func (m *InstanceManagerImpl) LocateInterface(network *types.VirtualNetwork, instance *types.VirtualMachine) (*types.VirtualMachineInterface, error)
- func (m *InstanceManagerImpl) LocateMacAddress(fqn string) (string, error)
- func (m *InstanceManagerImpl) LookupInterface(namespace, packName string) (*types.VirtualMachineInterface, error)
- func (m *InstanceManagerImpl) ReleaseInstanceIp(namespace, nicName, instanceUID string) error
- func (m *InstanceManagerImpl) ReleaseInterface(namespace, packName string) error
- type InstanceMetadata
- type NetnsManager
- type NetnsManagerImpl
- type NetworkManager
- type NetworkManagerImpl
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 (m *InstanceManagerImpl) LocateInstanceIp(network *types.VirtualNetwork, nic *types.VirtualMachineInterface) (*types.InstanceIp, error)
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 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)
Click to show internal directories.
Click to hide internal directories.