Documentation ¶
Index ¶
- Constants
- func ActivateVethPair(veth ovs.VethPair) error
- func AddPort2Ovs(bridge, port string, properties ...string) error
- func ConfigDefaultGwObj(defaultNetName string) error
- func CreateDefaultGw(port *manager.Port) error
- func CreateDefaultGwPort(defaultNetName string) (*manager.Port, error)
- func CreatePort4Gw(defaultNetName, vethName string) (*manager.Port, error)
- func DeleteGwIaasPort4Etcd() error
- func GetDefaultNetName(cfg *jason.Object) string
- func GetDefaultNetworkID(networkName string) (string, error)
- func GetGwPortFromEtcd(defaultNetName string) (*manager.Port, error)
- func GetNetworkID(userName, networkName string) (string, error)
- func GetVniByNetworkID(networkID string) (int, error)
- func InitDefaultGw(defaultNetName string) error
- func OvsVsctl(args ...string) error
- func RetryInitDefaultGw(defaultNetName string) error
- func SetPort4Gw(vethName string, port *manager.Port) error
- func SetSnatRule(cidr string, srcIP string) error
- func StoreGwIaasPort2Etcd(mport *manager.Port) error
- type Gateway
- type PortRole
- type TenantNetworkTableRole
- func (this *TenantNetworkTableRole) DecRefCount(networkID, podNs, podName string) error
- func (this *TenantNetworkTableRole) Delete(netID string) error
- func (this *TenantNetworkTableRole) Get(networkID string) (*TenantNetworkValue, error)
- func (this *TenantNetworkTableRole) GetAll() map[string]TenantNetworkValue
- func (this *TenantNetworkTableRole) IncRefCount(networkID, podNs, podName string) error
- func (this *TenantNetworkTableRole) Insert(networkID string, vni int, vlanID string) error
- func (this *TenantNetworkTableRole) Load() error
- func (this *TenantNetworkTableRole) NeedDelete(networkID string) bool
- type TenantNetworkValue
Constants ¶
View Source
const ( VethGwBrint = "vethGWbrint" VethGwHost = "vethGWhost" DefaultTenant = "admin" )
View Source
const ( DefaultGWFakePodNs = "DefaultGWFakePodNs" DefaultGWFakePodName = "DefaultGWFakePodName" )
View Source
const ( DefaultVethOpsRetryTimes = 5 DefaultVethOpsRetryIntval = 30 )
Variables ¶
This section is empty.
Functions ¶
func ActivateVethPair ¶
func AddPort2Ovs ¶
func ConfigDefaultGwObj ¶
func CreateDefaultGw ¶
func DeleteGwIaasPort4Etcd ¶
func DeleteGwIaasPort4Etcd() error
func GetDefaultNetName ¶
func GetDefaultNetworkID ¶
func GetNetworkID ¶
func GetVniByNetworkID ¶
func InitDefaultGw ¶
func RetryInitDefaultGw ¶
func SetSnatRule ¶
func StoreGwIaasPort2Etcd ¶
Types ¶
type Gateway ¶
type Gateway struct { NetworkID string `json:"network_id"` Network string `json:"network"` Vni int `json:"vni"` VlanID string `json:"vlan_id"` IP string `json:"ip"` Mac string `json:"mac"` Mask string `json:"mask"` }
func GetDefaultGwSingleton ¶
func GetDefaultGwSingleton() *Gateway
type PortRole ¶
type PortRole struct { }
func (PortRole) AttachPort ¶
func (PortRole) DetachPort ¶
type TenantNetworkTableRole ¶
type TenantNetworkTableRole struct {
// contains filtered or unexported fields
}
func GetTenantNetworkTableSingleton ¶
func GetTenantNetworkTableSingleton() *TenantNetworkTableRole
func (*TenantNetworkTableRole) DecRefCount ¶
func (this *TenantNetworkTableRole) DecRefCount(networkID, podNs, podName string) error
func (*TenantNetworkTableRole) Delete ¶
func (this *TenantNetworkTableRole) Delete(netID string) error
func (*TenantNetworkTableRole) Get ¶
func (this *TenantNetworkTableRole) Get(networkID string) (*TenantNetworkValue, error)
func (*TenantNetworkTableRole) GetAll ¶
func (this *TenantNetworkTableRole) GetAll() map[string]TenantNetworkValue
func (*TenantNetworkTableRole) IncRefCount ¶
func (this *TenantNetworkTableRole) IncRefCount(networkID, podNs, podName string) error
func (*TenantNetworkTableRole) Insert ¶
func (this *TenantNetworkTableRole) Insert(networkID string, vni int, vlanID string) error
func (*TenantNetworkTableRole) Load ¶
func (this *TenantNetworkTableRole) Load() error
func (*TenantNetworkTableRole) NeedDelete ¶
func (this *TenantNetworkTableRole) NeedDelete(networkID string) bool
type TenantNetworkValue ¶
type TenantNetworkValue struct { Vni int `json:"vni"` VlanID string `json:"vlan_id"` PodIds alg.StringSlice `json:"pod_ids"` }
Click to show internal directories.
Click to hide internal directories.