resources

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUBNET_RSRC_CFG_PATH_PREFIX  = drivers.CFG_PATH + AUTO_SUBNET_RSRC + "/"
	SUBNET_RSRC_CFG_PATH         = SUBNET_RSRC_CFG_PATH_PREFIX + "%s"
	SUBNET_RSRC_OPER_PATH_PREFIX = drivers.OPER_PATH + AUTO_SUBNET_RSRC + "/"
	SUBNET_RSRC_OPER_PATH        = SUBNET_RSRC_OPER_PATH_PREFIX + "%s"
)
View Source
const (
	VLAN_RSRC_CFG_PATH_PREFIX  = drivers.CFG_PATH + AUTO_VLAN_RSRC + "/"
	VLAN_RSRC_CFG_PATH         = VLAN_RSRC_CFG_PATH_PREFIX + "%s"
	VLAN_RSRC_OPER_PATH_PREFIX = drivers.OPER_PATH + AUTO_VLAN_RSRC + "/"
	VLAN_RSRC_OPER_PATH        = VLAN_RSRC_OPER_PATH_PREFIX + "%s"
)
View Source
const (
	VXLAN_RSRC_CFG_PATH_PREFIX  = drivers.CFG_PATH + AUTO_VXLAN_RSRC + "/"
	VXLAN_RSRC_CFG_PATH         = VXLAN_RSRC_CFG_PATH_PREFIX + "%s"
	VXLAN_RSRC_OPER_PATH_PREFIX = drivers.OPER_PATH + AUTO_VXLAN_RSRC + "/"
	VXLAN_RSRC_OPER_PATH        = VXLAN_RSRC_OPER_PATH_PREFIX + "%s"
)
View Source
const (
	AUTO_SUBNET_RSRC = "auto-subnet"
)
View Source
const (
	AUTO_VLAN_RSRC = "auto-vlan"
)
View Source
const (
	AUTO_VXLAN_RSRC = "auto-vxlan"
)

Variables

View Source
var ResourceRegistry = map[string]reflect.Type{
	AUTO_VLAN_RSRC:   reflect.TypeOf(AutoVlanCfgResource{}),
	AUTO_VXLAN_RSRC:  reflect.TypeOf(AutoVxlanCfgResource{}),
	AUTO_SUBNET_RSRC: reflect.TypeOf(AutoSubnetCfgResource{}),
}

Functions

This section is empty.

Types

type AutoSubnetCfgResource

type AutoSubnetCfgResource struct {
	core.CommonState
	SubnetPool     net.IP `json:"subnetPool"`
	SubnetPoolLen  uint   `json:"subnetPoolLen"`
	AllocSubnetLen uint   `json:"allocSubnetLen"`
}

func (*AutoSubnetCfgResource) Allocate

func (r *AutoSubnetCfgResource) Allocate() (interface{}, error)

func (*AutoSubnetCfgResource) Clear

func (r *AutoSubnetCfgResource) Clear() error

func (*AutoSubnetCfgResource) Deallocate

func (r *AutoSubnetCfgResource) Deallocate(value interface{}) error

func (*AutoSubnetCfgResource) Deinit

func (r *AutoSubnetCfgResource) Deinit()

func (*AutoSubnetCfgResource) Description

func (r *AutoSubnetCfgResource) Description() string

func (*AutoSubnetCfgResource) Init

func (r *AutoSubnetCfgResource) Init(rsrcCfg interface{}) error

func (*AutoSubnetCfgResource) Read

func (r *AutoSubnetCfgResource) Read(id string) error

func (*AutoSubnetCfgResource) ReadAll

func (r *AutoSubnetCfgResource) ReadAll() ([]core.State, error)

func (*AutoSubnetCfgResource) Write

func (r *AutoSubnetCfgResource) Write() error

type AutoSubnetOperResource

type AutoSubnetOperResource struct {
	core.CommonState
	FreeSubnets *bitset.BitSet `json:"freeSubnets"`
}

func (*AutoSubnetOperResource) Clear

func (r *AutoSubnetOperResource) Clear() error

func (*AutoSubnetOperResource) Read

func (r *AutoSubnetOperResource) Read(id string) error

func (*AutoSubnetOperResource) ReadAll

func (r *AutoSubnetOperResource) ReadAll() ([]core.State, error)

func (*AutoSubnetOperResource) Write

func (r *AutoSubnetOperResource) Write() error

type AutoVlanCfgResource

type AutoVlanCfgResource struct {
	core.CommonState
	Vlans *bitset.BitSet `json:"vlans"`
}

func (*AutoVlanCfgResource) Allocate

func (r *AutoVlanCfgResource) Allocate() (interface{}, error)

func (*AutoVlanCfgResource) Clear

func (r *AutoVlanCfgResource) Clear() error

func (*AutoVlanCfgResource) Deallocate

func (r *AutoVlanCfgResource) Deallocate(value interface{}) error

func (*AutoVlanCfgResource) Deinit

func (r *AutoVlanCfgResource) Deinit()

func (*AutoVlanCfgResource) Description

func (r *AutoVlanCfgResource) Description() string

func (*AutoVlanCfgResource) Init

func (r *AutoVlanCfgResource) Init(rsrcCfg interface{}) error

func (*AutoVlanCfgResource) Read

func (r *AutoVlanCfgResource) Read(id string) error

func (*AutoVlanCfgResource) ReadAll

func (r *AutoVlanCfgResource) ReadAll() ([]core.State, error)

func (*AutoVlanCfgResource) Write

func (r *AutoVlanCfgResource) Write() error

type AutoVlanOperResource

type AutoVlanOperResource struct {
	core.CommonState
	FreeVlans *bitset.BitSet `json:"freeVlans"`
}

func (*AutoVlanOperResource) Clear

func (r *AutoVlanOperResource) Clear() error

func (*AutoVlanOperResource) Read

func (r *AutoVlanOperResource) Read(id string) error

func (*AutoVlanOperResource) ReadAll

func (r *AutoVlanOperResource) ReadAll() ([]core.State, error)

func (*AutoVlanOperResource) Write

func (r *AutoVlanOperResource) Write() error

type AutoVxlanCfgResource

type AutoVxlanCfgResource struct {
	core.CommonState
	Vxlans     *bitset.BitSet `json:"vxlans"`
	LocalVlans *bitset.BitSet `json:"LocalVlans"`
}

func (*AutoVxlanCfgResource) Allocate

func (r *AutoVxlanCfgResource) Allocate() (interface{}, error)

func (*AutoVxlanCfgResource) Clear

func (r *AutoVxlanCfgResource) Clear() error

func (*AutoVxlanCfgResource) Deallocate

func (r *AutoVxlanCfgResource) Deallocate(value interface{}) error

func (*AutoVxlanCfgResource) Deinit

func (r *AutoVxlanCfgResource) Deinit()

func (*AutoVxlanCfgResource) Description

func (r *AutoVxlanCfgResource) Description() string

func (*AutoVxlanCfgResource) Init

func (r *AutoVxlanCfgResource) Init(rsrcCfg interface{}) error

func (*AutoVxlanCfgResource) Read

func (r *AutoVxlanCfgResource) Read(id string) error

func (*AutoVxlanCfgResource) ReadAll

func (r *AutoVxlanCfgResource) ReadAll() ([]core.State, error)

func (*AutoVxlanCfgResource) Write

func (r *AutoVxlanCfgResource) Write() error

type AutoVxlanOperResource

type AutoVxlanOperResource struct {
	core.CommonState
	FreeVxlans     *bitset.BitSet `json:"freeVxlans"`
	FreeLocalVlans *bitset.BitSet `json:"freeLocalVlans"`
}

func (*AutoVxlanOperResource) Clear

func (r *AutoVxlanOperResource) Clear() error

func (*AutoVxlanOperResource) Read

func (r *AutoVxlanOperResource) Read(id string) error

func (*AutoVxlanOperResource) ReadAll

func (r *AutoVxlanOperResource) ReadAll() ([]core.State, error)

func (*AutoVxlanOperResource) Write

func (r *AutoVxlanOperResource) Write() error

type EtcdResourceManager

type EtcdResourceManager struct {
	//XXX: should be '*drivers.EtcdStateDriver', but leaving is
	//core.StateDriver to get tests going and until the netmaster
	//is changed to pickup the resource-manager from config
	Etcd core.StateDriver
}

func (*EtcdResourceManager) AllocateResourceVal

func (ra *EtcdResourceManager) AllocateResourceVal(id, desc string) (interface{},
	error)

func (*EtcdResourceManager) DeallocateResourceVal

func (ra *EtcdResourceManager) DeallocateResourceVal(id, desc string,
	value interface{}) error

func (*EtcdResourceManager) DefineResource

func (ra *EtcdResourceManager) DefineResource(id, desc string,
	rsrcCfg interface{}) error

func (*EtcdResourceManager) Deinit

func (ra *EtcdResourceManager) Deinit()

func (*EtcdResourceManager) Init

func (ra *EtcdResourceManager) Init() error

func (*EtcdResourceManager) UndefineResource

func (ra *EtcdResourceManager) UndefineResource(id, desc string) error

type SubnetIpLenPair

type SubnetIpLenPair struct {
	Ip  net.IP
	Len uint
}

type VxlanVlanPair

type VxlanVlanPair struct {
	Vxlan uint
	Vlan  uint
}

Jump to

Keyboard shortcuts

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