Documentation ¶
Index ¶
- Constants
- type AutoParams
- type Cfg
- func (gc *Cfg) AllocSubnet(ra core.ResourceManager) (string, error)
- func (gc *Cfg) AllocVLAN(ra core.ResourceManager) (uint, error)
- func (gc *Cfg) AllocVXLAN(ra core.ResourceManager) (vxlan uint, localVLAN uint, err error)
- func (gc *Cfg) Clear() error
- func (gc *Cfg) Dump() error
- func (gc *Cfg) FreeSubnet(ra core.ResourceManager, subnetIP string) error
- func (gc *Cfg) FreeVLAN(ra core.ResourceManager, vlan uint) error
- func (gc *Cfg) FreeVXLAN(ra core.ResourceManager, vxlan uint, localVLAN uint) error
- func (gc *Cfg) Process(ra core.ResourceManager) error
- func (gc *Cfg) Read(tenant string) error
- func (gc *Cfg) ReadAll() ([]core.State, error)
- func (gc *Cfg) Write() error
- type DeployParams
- type Oper
Constants ¶
const (
VersionBeta1 = "0.01"
)
Version constants. Used in managing state variance.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoParams ¶
type AutoParams struct { SubnetPool string `json:"subnetPool"` SubnetLen uint `json:"subnetLen"` AllocSubnetLen uint `json:"AllocSubnetLen"` VLANs string `json:"VLANs"` VXLANs string `json:"VXLANs"` }
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 Version string `json:"version"` Tenant string `json:"tenant"` Auto AutoParams `json:"auto"` Deploy DeployParams `json:"deploy"` }
Cfg is the configuration of a tenant.
func (*Cfg) AllocSubnet ¶
func (gc *Cfg) AllocSubnet(ra core.ResourceManager) (string, error)
AllocSubnet allocates a new subnet. Returns a CIDR.
func (*Cfg) AllocVLAN ¶
func (gc *Cfg) AllocVLAN(ra core.ResourceManager) (uint, error)
AllocVLAN allocates a new VLAN resource. Returns an ID.
func (*Cfg) AllocVXLAN ¶
AllocVXLAN allocates a new vxlan; ids for both the vxlan and vlan are returned.
func (*Cfg) FreeSubnet ¶
func (gc *Cfg) FreeSubnet(ra core.ResourceManager, subnetIP string) error
FreeSubnet releases a subnet derived from it's CIDR.
func (*Cfg) FreeVLAN ¶
func (gc *Cfg) FreeVLAN(ra core.ResourceManager, vlan uint) error
FreeVLAN releases a VLAN for a given ID.
type DeployParams ¶
type DeployParams struct {
DefaultNetType string `json:"defaultNetType"`
}
DeployParams specifies parameters that decides the deployment choices