handler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAMHandler

type IPAMHandler struct {
	// contains filtered or unexported fields
}

IPAMHandler holds the main IPAM Handler object

func NewHandler

func NewHandler(db *db.Client, ns string) IPAMHandler

NewHandler creates a new handler object

func (IPAMHandler) CreatePool

func (h IPAMHandler) CreatePool(name string, network net.IPNet) (*Pool, error)

CreatePool creates a new pool

func (IPAMHandler) DeletePool

func (h IPAMHandler) DeletePool(name string) error

DeletePool creates a new pool

func (IPAMHandler) GetCapabilities

func (h IPAMHandler) GetCapabilities() (response *ipam.CapabilitiesResponse, err error)

GetCapabilities handles Capabilities request

func (IPAMHandler) GetDefaultAddressSpaces

func (h IPAMHandler) GetDefaultAddressSpaces() (response *ipam.AddressSpacesResponse, err error)

GetDefaultAddressSpaces handles DefaultAddressSpaces request

func (IPAMHandler) GetPool

func (h IPAMHandler) GetPool(poolID string) (*Pool, error)

GetPool ...

func (IPAMHandler) ReleaseAddress

func (h IPAMHandler) ReleaseAddress(request *ipam.ReleaseAddressRequest) (err error)

ReleaseAddress handles requests to release an IP Address

func (IPAMHandler) ReleaseIP

func (h IPAMHandler) ReleaseIP(poolID string, ip string) error

ReleaseIP releases an ip address in a pool

func (IPAMHandler) ReleasePool

func (h IPAMHandler) ReleasePool(request *ipam.ReleasePoolRequest) error

ReleasePool handles requests to release an IP Pool

func (IPAMHandler) RequestAddress

func (h IPAMHandler) RequestAddress(request *ipam.RequestAddressRequest) (*ipam.RequestAddressResponse, error)

RequestAddress handles requests for a new IP Address

func (IPAMHandler) RequestPool

func (h IPAMHandler) RequestPool(request *ipam.RequestPoolRequest) (*ipam.RequestPoolResponse, error)

RequestPool handles requests for a new IP Pool

func (IPAMHandler) ReserveFreeIP

func (h IPAMHandler) ReserveFreeIP(poolID string) (string, error)

ReserveFreeIP ...

func (IPAMHandler) ReserveIP

func (h IPAMHandler) ReserveIP(poolID string, ip string) (string, error)

ReserveIP reserves an ip address in a pool, if available

type Pool

type Pool struct {
	ID      string
	Network net.IPNet
	Data    map[string]string
}

Pool represents an IP pool

Jump to

Keyboard shortcuts

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