Documentation ¶
Index ¶
- Variables
- type AutoParams
- type Cfg
- func (gc *Cfg) AllocVLAN(reqVlan uint) (uint, error)
- func (gc *Cfg) AllocVXLAN(reqVxlan uint) (vxlan uint, localVLAN uint, err error)
- func (gc *Cfg) AssignDefaultNetwork(networkName string) (string, error)
- func (gc *Cfg) CheckInBitRange(ranges, inUse, pktTagType string) bool
- func (gc *Cfg) Clear() error
- func (gc *Cfg) DeleteResources(res string) error
- func (gc *Cfg) Dump() error
- func (gc *Cfg) FreeVLAN(vlan uint) error
- func (gc *Cfg) FreeVXLAN(vxlan uint, localVLAN uint) error
- func (gc *Cfg) GetVlansInUse() (uint, string)
- func (gc *Cfg) GetVxlansInUse() (uint, string)
- func (gc *Cfg) Process(res string) error
- func (gc *Cfg) Read(dummy string) error
- func (gc *Cfg) ReadAll() ([]core.State, error)
- func (gc *Cfg) UnassignNetwork(networkName string) error
- func (gc *Cfg) UpdateResources(res string) error
- func (gc *Cfg) Write() error
- type Oper
Constants ¶
This section is empty.
Variables ¶
var GlobalMutex sync.Mutex
GlobalMutex used to syncronize global configuration changes
Functions ¶
This section is empty.
Types ¶
type AutoParams ¶
AutoParams specifies various parameters for the auto allocation and resource management for networks and endpoints. This allows for hands-free allocation of resources without having to specify these each time these constructs gets created.
type Cfg ¶
type Cfg struct { core.CommonState Auto AutoParams `json:"auto"` }
Cfg is the configuration of a tenant.
func (*Cfg) AllocVXLAN ¶
AllocVXLAN allocates a new vxlan; ids for both the vxlan and vlan are returned.
func (*Cfg) AssignDefaultNetwork ¶
AssignDefaultNetwork assigns a default network for a tenant based on the configuration in case configuration is absent it uses the provided network name to be the default network. It records the default network in oper state (derived or configured)
func (*Cfg) CheckInBitRange ¶
CheckInBitRange to check if range includes inuse vlans
func (*Cfg) DeleteResources ¶
DeleteResources deletes associated resources
func (*Cfg) GetVlansInUse ¶
GetVlansInUse gets the vlans that are currently in use
func (*Cfg) GetVxlansInUse ¶
GetVxlansInUse gets the vlans that are currently in use
func (*Cfg) UnassignNetwork ¶
UnassignNetwork clears the oper state w.r.t. default network name
func (*Cfg) UpdateResources ¶
UpdateResources deletes associated resources