manager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const EAKey = "F5-IPAM"
View Source
const EAVal = "managed"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Creates an A record
	CreateARecord(name, ipAddr, netview string) bool
	// Deletes an A record and releases the IP address
	DeleteARecord(name, ipAddr, netview, cidr string)
	// Creates a CNAME record
	CreateCNAMERecord(name, canonical, netview string)
	// Deletes a CNAME record
	DeleteCNAMERecord(name, ipAddr, netview, cidr string)
	// Converts a CNAME to an A record, and updates all following CNAME references
	CNAMEToA(availHosts []string, delHost, ipAddr, netview, cidr string) (string, error)
	// Gets and reserves the next available IP address
	GetNextAddr(netview, cidr string) string
	// Releases an IP address
	ReleaseAddr(netview, cidr, ipAddr string)
	// Returns the current IPAM system records
	GetRecords() *store.Store
}

Client defines the interface that the IPAM system should implement

type IBloxClient

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

IBloxClient that the controller uses to talk to Infoblox

func NewInfobloxClient

func NewInfobloxClient(
	params *InfobloxParams,
	cmpType string,
) (*IBloxClient, error)

NewInfobloxClient sets up an interface with Infoblox

func (*IBloxClient) CNAMEToA

func (iClient *IBloxClient) CNAMEToA(
	availHosts []string,
	delHost,
	ipAddr,
	netview,
	cidr string,
) (string, error)

CNAMEToA changes an available CNAME to an A record, updates all ensuing CNAMEs in the list to point to the new record

func (*IBloxClient) CreateARecord

func (iClient *IBloxClient) CreateARecord(name, ipAddr, netview string) bool

CreateARecord creates a new A record in Infoblox

func (*IBloxClient) CreateCNAMERecord

func (iClient *IBloxClient) CreateCNAMERecord(name, canonical, netview string)

CreateCNAMERecord creates a new CNAME record in Infoblox

func (*IBloxClient) DeleteARecord

func (iClient *IBloxClient) DeleteARecord(name, ipAddr, netview, cidr string)

DeleteARecord deletes an A record and releases the IP address

func (*IBloxClient) DeleteCNAMERecord

func (iClient *IBloxClient) DeleteCNAMERecord(name, ipAddr, netview, cidr string)

DeleteCNAMERecord deletes a CNAME record from Infoblox

func (*IBloxClient) GetNextAddr

func (iClient *IBloxClient) GetNextAddr(netview, cidr string) string

GetNextAddr reserves and returns the next available address in the network

func (*IBloxClient) GetRecords

func (iClient *IBloxClient) GetRecords() *store.Store

GetRecords returns the current Infoblox records

func (*IBloxClient) ReleaseAddr

func (iClient *IBloxClient) ReleaseAddr(netview, cidr, ipAddr string)

ReleaseAddr releases an IP address back to Infoblox

type InfobloxParams

type InfobloxParams struct {
	Host     string
	Version  string
	Port     int
	Username string
	Password string
}

InfobloxParams allows NewInfobloxClient to receive all or some parameters

Jump to

Keyboard shortcuts

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