dcim

package
v0.0.0-...-292a473 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 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 Client

type Client struct {
	common.Client
}

func New deprecated

func New(baseURL, authToken string, insecureSkipVerify bool) (*Client, error)

Deprecated: Use NewClient() function instead.

func (*Client) CreateCable

func (c *Client) CreateCable(cable models.WriteableCable) (*models.Cable, error)

func (*Client) CreateDevice

func (*Client) CreateInterface

func (c *Client) CreateInterface(interf models.WritableInterface) (*models.Interface, error)

func (*Client) DeleteCable

func (c *Client) DeleteCable(id int) error

func (*Client) DeleteDevice

func (c *Client) DeleteDevice(id int) error

func (*Client) DeleteInterface

func (c *Client) DeleteInterface(id int) error

func (*Client) GetCable

func (c *Client) GetCable(id int) (*models.Cable, error)

func (*Client) GetDevice

func (c *Client) GetDevice(id int) (*models.Device, error)

func (*Client) GetDeviceWithContext

func (c *Client) GetDeviceWithContext(id int) (*models.Device, error)

func (*Client) GetRegion

func (c *Client) GetRegion(id int) (*models.Region, error)

func (*Client) GetSite

func (c *Client) GetSite(id int) (*models.Site, error)

func (*Client) GetSiteGroup

func (c *Client) GetSiteGroup(id int) (*models.SiteGroup, error)

func (*Client) ListDeviceRoles

func (*Client) ListDeviceTypes

func (*Client) ListDevices

func (*Client) ListInterfaces

func (*Client) ListPlatforms

func (*Client) ListRacks

func (*Client) ListRegions

func (*Client) ListSiteGroups

func (*Client) ListSites

func (*Client) UpdateCable

func (c *Client) UpdateCable(cable models.WriteableCable) (*models.Cable, error)

func (*Client) UpdateDevice

func (*Client) UpdateInterface

func (c *Client) UpdateInterface(interf models.WritableInterface, id int) (*models.Interface, error)

type NetboxAPI

type NetboxAPI interface {
	common.HTTPConnectable

	// cables
	GetCable(id int) (*models.Cable, error)
	CreateCable(cable models.WriteableCable) (*models.Cable, error)
	DeleteCable(id int) error
	UpdateCable(cable models.WriteableCable) (*models.Cable, error)

	// device-roles
	ListDeviceRoles(opts models.ListDeviceRolesRequest) (*models.ListDeviceRolesResponse, error)

	// device-types
	ListDeviceTypes(opts models.ListDeviceTypesRequest) (*models.ListDeviceTypesResponse, error)

	// devices
	ListDevices(opts models.ListDevicesRequest) (*models.ListDevicesResponse, error)
	GetDevice(id int) (*models.Device, error)
	GetDeviceWithContext(id int) (*models.Device, error)
	CreateDevice(dev models.WritableDeviceWithConfigContext) (*models.Device, error)
	DeleteDevice(id int) error
	UpdateDevice(dev models.WritableDeviceWithConfigContext) (*models.Device, error)

	// interfaces
	ListInterfaces(opts models.ListInterfacesRequest) (*models.ListInterfacesResponse, error)
	UpdateInterface(interf models.WritableInterface, id int) (*models.Interface, error)
	CreateInterface(interf models.WritableInterface) (*models.Interface, error)
	DeleteInterface(id int) error

	// platforms
	ListPlatforms(opts models.ListPlatformsRequest) (*models.ListPlatformsResponse, error)

	// racks
	ListRacks(opts models.ListRacksRequest) (*models.ListRacksResponse, error)

	// regions
	ListRegions(opts models.ListRegionsRequest) (*models.ListRegionsResponse, error)
	GetRegion(id int) (*models.Region, error)

	// site groups
	ListSiteGroups(opts models.ListSiteGroupsRequest) (*models.ListSiteGroupsResponse, error)
	GetSiteGroup(id int) (*models.SiteGroup, error)

	// sites
	ListSites(opts models.ListSitesRequest) (*models.ListSitesResponse, error)
	GetSite(id int) (*models.Site, error)
}

func NewClient

func NewClient(baseURL, authToken string, insecureSkipVerify bool) (NetboxAPI, error)

Jump to

Keyboard shortcuts

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