gstate

package
v0.0.0-...-c65a67c Latest Latest
Warning

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

Go to latest
Published: May 11, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BASE_GLOBAL        = "/contiv/"
	CFG_GLOBAL_PREFIX  = BASE_GLOBAL + "config/global/"
	CFG_GLOBAL_PATH    = CFG_GLOBAL_PREFIX + "%s"
	OPER_GLOBAL_PREFIX = BASE_GLOBAL + "oper/global/"
	OPER_GLOBAL_PATH   = OPER_GLOBAL_PREFIX + "%s"
)
View Source
const (
	VersionBeta1 = "0.01"
)

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"`
}

specifies various parameters to choose the auto allocation values to pick from this allows mostly hands-free allocation of networks, endpoints, attach/detach operations without having to specify these each time an entity 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"`
}

global state of the network plugin

func Parse

func Parse(configBytes []byte) (*Cfg, error)

func (*Cfg) AllocSubnet

func (gc *Cfg) AllocSubnet(ra core.ResourceManager) (string, error)

func (*Cfg) AllocVlan

func (gc *Cfg) AllocVlan(ra core.ResourceManager) (uint, error)

func (*Cfg) AllocVxlan

func (gc *Cfg) AllocVxlan(ra core.ResourceManager) (vxlan uint,
	localVlan uint, err error)

func (*Cfg) Clear

func (gc *Cfg) Clear() error

func (*Cfg) Dump

func (gc *Cfg) Dump() error

func (*Cfg) FreeSubnet

func (gc *Cfg) FreeSubnet(ra core.ResourceManager, subnetIp string) error

func (*Cfg) FreeVlan

func (gc *Cfg) FreeVlan(ra core.ResourceManager, vlan uint) error

func (*Cfg) FreeVxlan

func (gc *Cfg) FreeVxlan(ra core.ResourceManager, vxlan uint, localVlan uint) error

func (*Cfg) Process

func (gc *Cfg) Process(ra core.ResourceManager) error

func (*Cfg) Read

func (gc *Cfg) Read(tenant string) error

func (*Cfg) ReadAll

func (gc *Cfg) ReadAll() ([]core.State, error)

func (*Cfg) Write

func (gc *Cfg) Write() error

type DeployParams

type DeployParams struct {
	DefaultNetType string `json:"defaultNetType"`
}

specifies parameters that decides the deployment choices

type Oper

type Oper struct {
	core.CommonState
	Tenant          string `json:"tenant"`
	FreeVxlansStart uint   `json:"freeVxlansStart"`
}

func (*Oper) Clear

func (g *Oper) Clear() error

func (*Oper) Read

func (g *Oper) Read(tenant string) error

func (*Oper) ReadAll

func (g *Oper) ReadAll() ([]core.State, error)

func (*Oper) Write

func (g *Oper) Write() error

Jump to

Keyboard shortcuts

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