cni

package
v0.0.0-...-9649b88 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSyncVnisIntvalInMin = 60

Variables

View Source
var BondList map[string]BondInfo
View Source
var GetGlobalContext = func() *AgentContext {
	return &ctx
}

Functions

func InitConfigration4Agent

func InitConfigration4Agent(cfg *jason.Object) error

Types

type AgentContext

type AgentContext struct {
	Mtu       string
	VMID      string
	ClusterID string

	HostType           string
	RunMode            string
	SyncSwitch         bool
	PaasNwConfPath     string
	PhysnetPfMap       *map[string]string
	DefaultMaxVfs      int
	VfNumMap           *map[string]int
	VfRanges           *map[string]Range
	VfRangeConfigured  bool
	ExternalIP         string
	SendVdp            bool
	ClusterType        string
	ClusterUUID        string
	HostIP             string
	SyncVniFlag        bool
	SyncVniIntvalInMin int64
	AdminTenantUUID    string
	DB                 dbaccessor.DbAccessor
	RemoteDB           dbaccessor.DbAccessor
	Mc                 manager.ManagerClient
	MtrC               monitor.MonitorClient
	K8s                k8s.K8sClient
	// contains filtered or unexported fields
}

func (*AgentContext) CheckHostType

func (self *AgentContext) CheckHostType(hostType string) error

func (*AgentContext) GetClusterType

func (self *AgentContext) GetClusterType(cfg *jason.Object) (string, error)

func (*AgentContext) GetEtcdServerURLs

func (self *AgentContext) GetEtcdServerURLs(cfg *jason.Object) (string, error)

func (*AgentContext) GetK8sServerURL

func (self *AgentContext) GetK8sServerURL(cfg *jason.Object) (string, error)

func (*AgentContext) GetOseServerURL

func (self *AgentContext) GetOseServerURL(cfg *jason.Object) (string, error)

func (*AgentContext) GetOseToken

func (self *AgentContext) GetOseToken(oseID string) (string, error)

func (*AgentContext) SetClusterID

func (self *AgentContext) SetClusterID(cfg *jason.Object) error

func (*AgentContext) SetExternalIP

func (self *AgentContext) SetExternalIP(cfg *jason.Object) error

func (*AgentContext) SetHostType

func (self *AgentContext) SetHostType(cfg *jason.Object) error

func (*AgentContext) SetMTU

func (self *AgentContext) SetMTU(cfg *jason.Object) error

func (*AgentContext) SetPathOfPaasNwConf

func (self *AgentContext) SetPathOfPaasNwConf(cfg *jason.Object) error

func (*AgentContext) SetRunMode

func (self *AgentContext) SetRunMode(cfg *jason.Object) error

func (*AgentContext) SetSyncSwitch

func (self *AgentContext) SetSyncSwitch(cfg *jason.Object) error

func (*AgentContext) SetVMID

func (self *AgentContext) SetVMID(cfg *jason.Object) error

type BondInfo

type BondInfo struct {
	PhyNw      string
	BondType   string
	BondPair   []string
	BondMaster string
}

func GetBondInfo

func GetBondInfo(phyNw string) (BondInfo, error)

type CniParam

type CniParam struct {
	ContainerID string `json:"ContainerId"`
	IfName      string `json:"IfName"`
	Netns       string `json:"Netns"`
	Path        string `json:"Path"`
	Args        string `json:"Args"`
	StdinData   []byte `json:"StdinData"`

	PodNs     string
	PodName   string
	Mtu       string
	HostType  string
	VnicType  string
	VMID      string
	TenantID  string
	ClusterID string

	DB             dbaccessor.DbAccessor
	Manager        manager.ManagerClient
	RemoteNetType  string
	PaasNwConfPath string
	// contains filtered or unexported fields
}

func (*CniParam) AnalyzeCniParam

func (self *CniParam) AnalyzeCniParam(k8s *skel.CmdArgs) error

type Range

type Range struct {
	Start int
	End   int
}

Jump to

Keyboard shortcuts

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