Documentation
¶
Index ¶
- type Netbox
- func (nb *Netbox) ActiveDevicesByCustomParameters(query string, params *dcim.DcimDevicesListParams) ([]models.DeviceWithConfigContext, error)
- func (nb *Netbox) DeviceByParams(params dcim.DcimDevicesListParams) (res models.DeviceWithConfigContext, err error)
- func (nb *Netbox) DeviceInterfaceNameIPs(name, deviceID string) (ips []string, err error)
- func (nb *Netbox) DevicesByParams(params dcim.DcimDevicesListParams) (res []models.DeviceWithConfigContext, err error)
- func (nb *Netbox) DevicesByRegion(query, manufacturer, region, status string) (res []models.DeviceWithConfigContext, err error)
- func (nb *Netbox) GetNestedDeviceIP(i *models.NestedIPAddress) (ip string, err error)
- func (nb *Netbox) IPAddress(id int64) (*models.IPAddress, error)
- func (nb *Netbox) IPAddressByDeviceAndIntefrace(deviceID string, interfaceID string) (*models.IPAddress, error)
- func (nb *Netbox) Interface(deviceID string, interfaceName string) (*models.Interface, error)
- func (nb *Netbox) ManagementIPs(serverID string) (ips []string, err error)
- func (nb *Netbox) MgmtInterface(deviceID string, mgmtOnly bool) ([]*models.Interface, error)
- func (nb *Netbox) Racks(role string, siteID string) ([]models.Rack, error)
- func (nb *Netbox) RacksByRegion(role string, region string) ([]models.Rack, error)
- func (nb *Netbox) Servers(rackID string) ([]models.DeviceWithConfigContext, error)
- func (nb *Netbox) ServersByRegion(rackRole string, region string) ([]models.DeviceWithConfigContext, error)
- func (nb *Netbox) Sites(region string) ([]models.Site, error)
- func (nb *Netbox) VMsByParams(params virtualization.VirtualizationVirtualMachinesListParams) (res []models.VirtualMachineWithConfigContext, err error)
- func (nb *Netbox) VMsByTag(query, status, tag string) (res []models.VirtualMachineWithConfigContext, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Netbox ¶
type Netbox struct {
// contains filtered or unexported fields
}
func NewDefaultHost ¶
NewDefaultHost creates a Netbox instance for the default host
func (*Netbox) ActiveDevicesByCustomParameters ¶
func (nb *Netbox) ActiveDevicesByCustomParameters(query string, params *dcim.DcimDevicesListParams) ([]models.DeviceWithConfigContext, error)
AcitveDevicesByCustomParameters retrievs all active devices with custom parameters
func (*Netbox) DeviceByParams ¶
func (nb *Netbox) DeviceByParams(params dcim.DcimDevicesListParams) (res models.DeviceWithConfigContext, err error)
DevicesByRegion retrieves devices by region, manufacturer and status
func (*Netbox) DeviceInterfaceNameIPs ¶
DeviceInterfaceNameIPs retrieves the IP of the named interface for server
func (*Netbox) DevicesByParams ¶
func (nb *Netbox) DevicesByParams(params dcim.DcimDevicesListParams) (res []models.DeviceWithConfigContext, err error)
DevicesByRegion retrieves devices by region, manufacturer and status
func (*Netbox) DevicesByRegion ¶
func (nb *Netbox) DevicesByRegion(query, manufacturer, region, status string) (res []models.DeviceWithConfigContext, err error)
DevicesByRegion retrieves devices by region, manufacturer and status
func (*Netbox) GetNestedDeviceIP ¶
func (nb *Netbox) GetNestedDeviceIP(i *models.NestedIPAddress) (ip string, err error)
func (*Netbox) IPAddressByDeviceAndIntefrace ¶
func (nb *Netbox) IPAddressByDeviceAndIntefrace(deviceID string, interfaceID string) (*models.IPAddress, error)
IPAddressByDeviceAndIntefrace retrieves the IP address by device and interface
func (*Netbox) ManagementIPs ¶
ManagementIP retrieves the IP of the management interface for server
func (*Netbox) MgmtInterface ¶
MgmtInterface retrieves the management interface on the device
func (*Netbox) RacksByRegion ¶
RacksByRegion retrieves all the racks in the region with specified role
func (*Netbox) Servers ¶
func (nb *Netbox) Servers(rackID string) ([]models.DeviceWithConfigContext, error)
Servers retrieves all the servers in the rack
func (*Netbox) ServersByRegion ¶
func (nb *Netbox) ServersByRegion(rackRole string, region string) ([]models.DeviceWithConfigContext, error)
ServersByRegion retrieves all the servers in the region with the specified rack role
func (*Netbox) VMsByParams ¶
func (nb *Netbox) VMsByParams(params virtualization.VirtualizationVirtualMachinesListParams) (res []models.VirtualMachineWithConfigContext, err error)
VMsByTag retrieves devices by region, manufacturer and status