Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToUint(buf []byte) uint32
- func IPAddrPlus(ipNet *net.IPNet, offSet uint32) net.IP
- func UnitToBytes(i uint32) []byte
- type Interface
- type Interfaces
- func (self *Interfaces) CreateBulkPorts(req *mgriaas.MgrBulkPortsReq) ([]*iaas.Interface, error)
- func (self *Interfaces) CreatePort(networkID, subnetID, networkPlane, ip, mac, vnicType string) (*iaas.Interface, error)
- func (self *Interfaces) DeletePort(id string) error
- func (self *Interfaces) GetPort(id string) (*iaas.Interface, error)
- func (self *Interfaces) IsExistPort(id string) bool
- func (self *Interfaces) ListPorts(networkID string) ([]*iaas.Interface, error)
- type NetworkExtenAttrs
- type NetworkManager
- func (self *NetworkManager) AttachNetToRouter(routerID, subNetID string) (string, error)
- func (self *NetworkManager) AttachPortToVM(vmID, portID string) (*iaas.Interface, error)
- func (self *NetworkManager) Auth() error
- func (_ *NetworkManager) CreateBulkPorts(req *mgriaas.MgrBulkPortsReq) ([]*iaas.Interface, error)
- func (_ *NetworkManager) CreateNetwork(name string) (*iaas.Network, error)
- func (_ *NetworkManager) CreatePort(networkID, subnetID, networkPlane, ip, mac, vnicType string) (*iaas.Interface, error)
- func (self *NetworkManager) CreateProviderNetwork(name, nwType, phyNet, sID string, vlanTransparent bool) (*iaas.Network, error)
- func (self *NetworkManager) CreateRouter(name, extNetID string) (string, error)
- func (_ *NetworkManager) CreateSubnet(id, cidr, gw string, allocationPools []subnets.AllocationPool) (*iaas.Subnet, error)
- func (_ *NetworkManager) DeleteNetwork(id string) error
- func (_ *NetworkManager) DeletePort(id string) error
- func (self *NetworkManager) DeleteRouter(id string) error
- func (_ *NetworkManager) DeleteSubnet(id string) error
- func (self *NetworkManager) DetachNetFromRouter(routerID, netID string) (string, error)
- func (self *NetworkManager) DetachPortFromVM(vmID, portID string) error
- func (_ *NetworkManager) GetAttachReq() int
- func (_ *NetworkManager) GetNetwork(id string) (*iaas.Network, error)
- func (_ *NetworkManager) GetNetworkExtenAttrs(id string) (*iaas.NetworkExtenAttrs, error)
- func (_ *NetworkManager) GetNetworkID(networkName string) (string, error)
- func (_ *NetworkManager) GetPort(id string) (*iaas.Interface, error)
- func (self *NetworkManager) GetRouter(id string) (*iaas.Router, error)
- func (_ *NetworkManager) GetSubnet(id string) (*iaas.Subnet, error)
- func (_ *NetworkManager) GetSubnetID(networkID string) (string, error)
- func (self *NetworkManager) GetTenantUUID(cfg string) (string, error)
- func (self *NetworkManager) GetType() string
- func (_ *NetworkManager) ListPorts(networkID string) ([]*iaas.Interface, error)
- func (_ *NetworkManager) SetAttachReq(req int)
- func (self *NetworkManager) UpdateRouter(id, name, extNetID string) error
- type Networks
- func (self *Networks) CreateNetwork(name string) (*iaas.Network, error)
- func (self *Networks) DeleteNetwork(id string) error
- func (self *Networks) GetAttachReq() int
- func (self *Networks) GetNetwork(id string) (*NetworkExtenAttrs, error)
- func (self *Networks) GetNetworkExtenAttrs(id string) (*NetworkExtenAttrs, error)
- func (self *Networks) GetNetworkID(networkName string) (string, error)
- func (self *Networks) GetNetworkSegmentationID(netID string) string
- func (self *Networks) IsExistNetwork(id string) bool
- func (self *Networks) SetAttachReq(req int)
- type PaasSubnet
- type Subnets
- func (self *Subnets) CreateSubnet(id, cidr, gw string, allocationPool []subnets.AllocationPool) (*iaas.Subnet, error)
- func (self *Subnets) DeleteSubnet(id string) error
- func (self *Subnets) GetSubnet(id string) (*iaas.Subnet, error)
- func (self *Subnets) GetSubnetID(networkID string) (string, error)
- func (self *Subnets) IsExistSubnet(id string) bool
- func (self *Subnets) IsIPUsed(subnetid, ipAddr string) bool
- type VxlanIDManager
Constants ¶
View Source
const ( StartVxlanID int = 5000 EndVxlanID int = 15000 ErrVxlanID int = 88888 )
Variables ¶
View Source
var DeleteData = func(k string) error { LOG.Tracef("ETCD-D:[%v]", k) return common.GetDataBase().DeleteLeaf(k) }
View Source
var ReadData = func(k string) (string, error) { v, err := common.GetDataBase().ReadLeaf(k) LOG.Tracef("ETCD-R:[%v][%v]", k, v) return v, err }
Functions ¶
func BytesToUint ¶
func UnitToBytes ¶
Types ¶
type Interfaces ¶
type Interfaces struct {
// contains filtered or unexported fields
}
func GetPortManager ¶
func GetPortManager() *Interfaces
func (*Interfaces) CreateBulkPorts ¶
func (self *Interfaces) CreateBulkPorts(req *mgriaas.MgrBulkPortsReq) ([]*iaas.Interface, error)
func (*Interfaces) CreatePort ¶
func (self *Interfaces) CreatePort(networkID, subnetID, networkPlane, ip, mac, vnicType string) (*iaas.Interface, error)
func (*Interfaces) DeletePort ¶
func (self *Interfaces) DeletePort(id string) error
func (*Interfaces) IsExistPort ¶
func (self *Interfaces) IsExistPort(id string) bool
type NetworkExtenAttrs ¶
type NetworkExtenAttrs struct { ID string `json:"id"` Name string `json:"name"` NetworkType string `json:"provider:network_type"` PhysicalNetwork string `json:"provider:physical_network"` SegmentationID string `json:"provider:segmentation_id"` }
***********************************************************************
type NetworkManager ¶
type NetworkManager struct {
// contains filtered or unexported fields
}
***********************************************************************
func GetEmbeddedNetwrokManager ¶
func GetEmbeddedNetwrokManager() *NetworkManager
func (*NetworkManager) AttachNetToRouter ¶
func (self *NetworkManager) AttachNetToRouter(routerID, subNetID string) (string, error)
func (*NetworkManager) AttachPortToVM ¶
func (self *NetworkManager) AttachPortToVM(vmID, portID string) (*iaas.Interface, error)
func (*NetworkManager) Auth ¶
func (self *NetworkManager) Auth() error
func (*NetworkManager) CreateBulkPorts ¶
func (_ *NetworkManager) CreateBulkPorts(req *mgriaas.MgrBulkPortsReq) ([]*iaas.Interface, error)
func (*NetworkManager) CreateNetwork ¶
func (_ *NetworkManager) CreateNetwork(name string) (*iaas.Network, error)
***********************************************************************
func (*NetworkManager) CreatePort ¶
func (_ *NetworkManager) CreatePort(networkID, subnetID, networkPlane, ip, mac, vnicType string) (*iaas.Interface, error)
func (*NetworkManager) CreateProviderNetwork ¶
func (*NetworkManager) CreateRouter ¶
func (self *NetworkManager) CreateRouter(name, extNetID string) (string, error)
func (*NetworkManager) CreateSubnet ¶
func (_ *NetworkManager) CreateSubnet(id, cidr, gw string, allocationPools []subnets.AllocationPool) (*iaas.Subnet, error)
func (*NetworkManager) DeleteNetwork ¶
func (_ *NetworkManager) DeleteNetwork(id string) error
func (*NetworkManager) DeletePort ¶
func (_ *NetworkManager) DeletePort(id string) error
func (*NetworkManager) DeleteRouter ¶
func (self *NetworkManager) DeleteRouter(id string) error
func (*NetworkManager) DeleteSubnet ¶
func (_ *NetworkManager) DeleteSubnet(id string) error
func (*NetworkManager) DetachNetFromRouter ¶
func (self *NetworkManager) DetachNetFromRouter(routerID, netID string) (string, error)
func (*NetworkManager) DetachPortFromVM ¶
func (self *NetworkManager) DetachPortFromVM(vmID, portID string) error
func (*NetworkManager) GetAttachReq ¶
func (_ *NetworkManager) GetAttachReq() int
func (*NetworkManager) GetNetwork ¶
func (_ *NetworkManager) GetNetwork(id string) (*iaas.Network, error)
func (*NetworkManager) GetNetworkExtenAttrs ¶
func (_ *NetworkManager) GetNetworkExtenAttrs(id string) (*iaas.NetworkExtenAttrs, error)
func (*NetworkManager) GetNetworkID ¶
func (_ *NetworkManager) GetNetworkID(networkName string) (string, error)
func (*NetworkManager) GetPort ¶
func (_ *NetworkManager) GetPort(id string) (*iaas.Interface, error)
func (*NetworkManager) GetRouter ¶
func (self *NetworkManager) GetRouter(id string) (*iaas.Router, error)
func (*NetworkManager) GetSubnet ¶
func (_ *NetworkManager) GetSubnet(id string) (*iaas.Subnet, error)
func (*NetworkManager) GetSubnetID ¶
func (_ *NetworkManager) GetSubnetID(networkID string) (string, error)
func (*NetworkManager) GetTenantUUID ¶
func (self *NetworkManager) GetTenantUUID(cfg string) (string, error)
func (*NetworkManager) GetType ¶
func (self *NetworkManager) GetType() string
func (*NetworkManager) ListPorts ¶
func (_ *NetworkManager) ListPorts(networkID string) ([]*iaas.Interface, error)
func (*NetworkManager) SetAttachReq ¶
func (_ *NetworkManager) SetAttachReq(req int)
func (*NetworkManager) UpdateRouter ¶
func (self *NetworkManager) UpdateRouter(id, name, extNetID string) error
type Networks ¶
type Networks struct {
// contains filtered or unexported fields
}
func GetNetManager ¶
func GetNetManager() *Networks
func (*Networks) CreateNetwork ¶
***********************************************************************
func (*Networks) DeleteNetwork ¶
func (*Networks) GetAttachReq ¶
func (*Networks) GetNetwork ¶
func (self *Networks) GetNetwork(id string) (*NetworkExtenAttrs, error)
func (*Networks) GetNetworkExtenAttrs ¶
func (self *Networks) GetNetworkExtenAttrs( id string) (*NetworkExtenAttrs, error)
func (*Networks) GetNetworkID ¶
func (*Networks) GetNetworkSegmentationID ¶
func (*Networks) IsExistNetwork ¶
func (*Networks) SetAttachReq ¶
type PaasSubnet ¶
type Subnets ¶
type Subnets struct {
// contains filtered or unexported fields
}
func GetSubnetManager ¶
func GetSubnetManager() *Subnets
func (*Subnets) CreateSubnet ¶
func (*Subnets) DeleteSubnet ¶
func (*Subnets) IsExistSubnet ¶
type VxlanIDManager ¶
func GetVxlanManager ¶
func GetVxlanManager() *VxlanIDManager
func (*VxlanIDManager) Alloc ¶
func (self *VxlanIDManager) Alloc() (string, error)
func (*VxlanIDManager) Free ¶
func (self *VxlanIDManager) Free(id string) error
func (*VxlanIDManager) GetErrVxlanID ¶
func (_ *VxlanIDManager) GetErrVxlanID() string
Click to show internal directories.
Click to hide internal directories.