ipam

package
v0.0.0-...-41c1b6c Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const IpamCollectionLeases string = "leases"

IpamCollectionLeases is the name of the Mongo collection which stores Leases.

View Source
const IpamCollectionPools string = "pools"

IpamCollectionPools is the name of the Mongo collection which stores Pools.

View Source
const IpamCollectionReservations string = "reservations"

IpamCollectionReservations is the name of the Mongo collection which stores Reservations.

View Source
const IpamCollectionSubnets string = "subnets"

IpamCollectionSubnets is the name of the Mongo collection which stores Subnets.

View Source
const IpamDatabase string = "ipam"

IpamDatabase is the name of the Mongo database used to store IPAM models.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ipam

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

Ipam is an object which implements the IPAM business logic interface.

func NewIpam

func NewIpam(session *mgo.Session) (*Ipam, error)

NewIpam returns a new Ipam object.

func (*Ipam) CreatePool

func (ipam *Ipam) CreatePool(pool models.Pool) error

CreatePool creates a Pool.

func (*Ipam) CreateReservation

func (ipam *Ipam) CreateReservation(reservation models.Reservation) error

CreateReservation creates a Reservation.

func (*Ipam) CreateSubnet

func (ipam *Ipam) CreateSubnet(subnet models.Subnet) error

CreateSubnet creates a Subnet.

func (*Ipam) DeleteLeases

func (ipam *Ipam) DeleteLeases(id string) error

DeleteLeases removes all leases associated to a subnet

func (*Ipam) DeletePool

func (ipam *Ipam) DeletePool(id string) error

DeletePool removes a Pool.

func (*Ipam) DeleteReservation

func (ipam *Ipam) DeleteReservation(id string) error

DeleteReservation removes a Reservation.

func (*Ipam) DeleteReservations

func (ipam *Ipam) DeleteReservations(id string) error

DeleteReservations remove all reservations in a subnet

func (*Ipam) DeleteSubnet

func (ipam *Ipam) DeleteSubnet(id string) error

DeleteSubnet removes a Subnet and all revervations and leases associated to it

func (*Ipam) DeleteSubnets

func (ipam *Ipam) DeleteSubnets(id string) error

DeleteSubnets removes all subnet in a pool

func (*Ipam) GetLease

func (ipam *Ipam) GetLease(id string) (models.Lease, error)

GetLease returns the requested Lease.

func (*Ipam) GetLeases

func (ipam *Ipam) GetLeases(id string) ([]models.Lease, error)

GetLeases returns a list of Leases.

func (*Ipam) GetPool

func (ipam *Ipam) GetPool(id string) (models.Pool, error)

GetPool returns the requested Pool.

func (*Ipam) GetPools

func (ipam *Ipam) GetPools() ([]models.Pool, error)

GetPools returns a list of Pools.

func (*Ipam) GetReservation

func (ipam *Ipam) GetReservation(id string) (models.Reservation, error)

GetReservation returns the requested Reservation.

func (*Ipam) GetReservations

func (ipam *Ipam) GetReservations(id string) ([]models.Reservation, error)

GetReservations returns a list of Reservations.

func (*Ipam) GetSubnet

func (ipam *Ipam) GetSubnet(id string) (models.Subnet, error)

GetSubnet returns the requested Subnet.

func (*Ipam) GetSubnets

func (ipam *Ipam) GetSubnets(id string) ([]models.Subnet, error)

GetSubnets returns a list of Subnets.

func (*Ipam) UpdateLease

func (ipam *Ipam) UpdateLease(reservation models.Lease) error

UpdateLease updates a Lease.

func (*Ipam) UpdatePool

func (ipam *Ipam) UpdatePool(pool models.Pool) error

UpdatePool updates a Pool.

func (*Ipam) UpdateReservation

func (ipam *Ipam) UpdateReservation(reservation models.Reservation) error

UpdateReservation updates a Reservation.

func (*Ipam) UpdateSubnet

func (ipam *Ipam) UpdateSubnet(subnet models.Subnet) error

UpdateSubnet updates a Subnet.

Jump to

Keyboard shortcuts

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