ipam

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VlanConvertFromNetbox

func VlanConvertFromNetbox(netboxVlan interface{}) (*types.VLAN, error)

Types

type Client

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

func NewClient

func NewClient(netboxClient client.NetBox) Client

func (Client) IPAddressAssignInterface

func (c Client) IPAddressAssignInterface(ipAddress types.IPAddress, interfaceID int64) (*models.IPAddress, error)

IPAddressAssignInterface assigns a ip-address/cidr string to an existing interface.

func (Client) IPAddressCreate

func (c Client) IPAddressCreate(ipAddress types.IPAddress) (*models.IPAddress, error)

IPAddressCreate creates an ip-address based on the given ip/cidr string.

func (Client) IPAddressDelete

func (c Client) IPAddressDelete(ipAddressID int64) error

func (Client) IPAddressFind

func (c Client) IPAddressFind(ipAddress types.IPAddress) (*models.IPAddress, error)

IPAddressGet returns an existing ip-address based on the given ip/cidr string.

func (Client) IPAddressFindByInterfaceID

func (c Client) IPAddressFindByInterfaceID(interfaceID int64) ([]*models.IPAddress, error)

IPAddressGetByInterfaceID returns all ip addresses assigned to an interface identified by it's ID

func (Client) IPAddressFindCreate

func (c Client) IPAddressFindCreate(ipAddress types.IPAddress) (*models.IPAddress, error)

IPAddressGetCreate is a convenience function that looks up an existing ip-address from netbox or creates it

func (Client) PrefixGet

func (c Client) PrefixGet(prefix string) (*models.Prefix, error)

func (Client) VLANGet

func (c Client) VLANGet(vlanID uint16, siteID *int64) (*models.VLAN, error)

VlanGet returns a vlan-object based on the given vlanID and an optional siteID

Jump to

Keyboard shortcuts

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