Documentation ¶
Index ¶
- Constants
- func NewAddrAllocDescriptor(log logging.PluginLogger) (descr *kvs.KVDescriptor)
- type IPAllocDescriptor
- func (d *IPAllocDescriptor) Create(key string, addrAlloc *netalloc.IPAllocation) (metadata *netalloc.IPAllocMetadata, err error)
- func (d *IPAllocDescriptor) Delete(key string, addrAlloc *netalloc.IPAllocation, ...) (err error)
- func (d *IPAllocDescriptor) DerivedValues(key string, addrAlloc *netalloc.IPAllocation) (derValues []kvs.KeyValuePair)
- func (d *IPAllocDescriptor) Retrieve(correlate []adapter.IPAllocKVWithMetadata) (valid []adapter.IPAllocKVWithMetadata, err error)
- func (d *IPAllocDescriptor) Validate(key string, addrAlloc *netalloc.IPAllocation) (err error)
Constants ¶
View Source
const ( // IPAllocDescriptorName is the name of the descriptor for allocating // IP addresses. IPAllocDescriptorName = "netalloc-ip-address" )
Variables ¶
This section is empty.
Functions ¶
func NewAddrAllocDescriptor ¶
func NewAddrAllocDescriptor(log logging.PluginLogger) (descr *kvs.KVDescriptor)
NewAddrAllocDescriptor creates a new instance of IPAllocDescriptor.
Types ¶
type IPAllocDescriptor ¶
type IPAllocDescriptor struct {
// contains filtered or unexported fields
}
IPAllocDescriptor just validates and parses allocated IP addresses.
func (*IPAllocDescriptor) Create ¶
func (d *IPAllocDescriptor) Create(key string, addrAlloc *netalloc.IPAllocation) (metadata *netalloc.IPAllocMetadata, err error)
Create parses the address and stores it into the metadata.
func (*IPAllocDescriptor) Delete ¶
func (d *IPAllocDescriptor) Delete(key string, addrAlloc *netalloc.IPAllocation, metadata *netalloc.IPAllocMetadata) (err error)
Delete is NOOP.
func (*IPAllocDescriptor) DerivedValues ¶
func (d *IPAllocDescriptor) DerivedValues(key string, addrAlloc *netalloc.IPAllocation) (derValues []kvs.KeyValuePair)
DerivedValues derives "neighbour-gateway" key if GW is a neighbour of the interface (addresses are from the same IP network).
func (*IPAllocDescriptor) Retrieve ¶
func (d *IPAllocDescriptor) Retrieve(correlate []adapter.IPAllocKVWithMetadata) (valid []adapter.IPAllocKVWithMetadata, err error)
Retrieve always returns what is expected to exists since Create doesn't really change anything in SB.
func (*IPAllocDescriptor) Validate ¶
func (d *IPAllocDescriptor) Validate(key string, addrAlloc *netalloc.IPAllocation) (err error)
Validate checks if the address can be parsed.
Click to show internal directories.
Click to hide internal directories.