Documentation ¶
Index ¶
- Constants
- Variables
- type NetboxDevice
- type NetboxDeviceType
- type NetboxInterface
- type NetboxInventory
- type NetboxIpAddress
- type NetboxObject
- type NetboxPlatform
- type NetboxPrimaryIpChecker
- type NetboxPusher
- func (nb *NetboxPusher) CreateDevice(j []byte) (int64, error)
- func (nb *NetboxPusher) CreateInterface(j []byte) (int64, error)
- func (nb *NetboxPusher) CreateInterfaceIpAddress(j []byte, ipChecker NetboxPrimaryIpChecker) (int64, error)
- func (nb *NetboxPusher) CreateInventory(j []byte) (int64, error)
- func (nb *NetboxPusher) PrimaryIpCheck(IfcIpAddress string, IfcIpId int64, ipChecker NetboxPrimaryIpChecker) (int64, error)
- func (nb *NetboxPusher) Start() error
- func (nb *NetboxPusher) Stop() error
- func (nb *NetboxPusher) UpdateDevice(ifcIpId, deviceId int64, ipVersion string) (int64, error)
- type NetboxSite
- type Pusher
Constants ¶
View Source
const ( INTERFACE_SPEED_MAX int64 = 2147483647 INTERFACE_MTU_MIN int64 = 1 )
Variables ¶
View Source
var DeviceStatusMap = map[string]string{
"alive": "active",
"dead": "offline",
}
View Source
var INTERFACE_OBJ_TYPE string = "dcim.interface"
View Source
var InterfaceStateMap = map[string]bool{ "up": true, "down": false, }
Functions ¶
This section is empty.
Types ¶
type NetboxDevice ¶
type NetboxDevice struct { Site *NetboxSite `json:"site"` Role *NetboxObject `json:"device_role"` Type *NetboxDeviceType `json:"device_type"` Platform *NetboxPlatform `json:"platform"` Name string `json:"name"` Slug string `json:"slug"` Status string `json:"status"` Serial string `json:"serial"` }
type NetboxDeviceType ¶
type NetboxDeviceType struct { Mfr *NetboxObject `json:"manufacturers"` Model string `json:"model"` Slug string `json:"slug"` }
type NetboxInterface ¶
type NetboxInventory ¶
type NetboxIpAddress ¶
type NetboxObject ¶
type NetboxPlatform ¶
type NetboxPlatform struct { Mfr *NetboxObject `json:"manufacturers"` Name string `json:"name"` Slug string `json:"slug"` }
type NetboxPrimaryIpChecker ¶
type NetboxPusher ¶
type NetboxPusher struct {
// contains filtered or unexported fields
}
func (*NetboxPusher) CreateDevice ¶
func (nb *NetboxPusher) CreateDevice(j []byte) (int64, error)
func (*NetboxPusher) CreateInterface ¶
func (nb *NetboxPusher) CreateInterface(j []byte) (int64, error)
func (*NetboxPusher) CreateInterfaceIpAddress ¶
func (nb *NetboxPusher) CreateInterfaceIpAddress(j []byte, ipChecker NetboxPrimaryIpChecker) (int64, error)
func (*NetboxPusher) CreateInventory ¶
func (nb *NetboxPusher) CreateInventory(j []byte) (int64, error)
func (*NetboxPusher) PrimaryIpCheck ¶
func (nb *NetboxPusher) PrimaryIpCheck(IfcIpAddress string, IfcIpId int64, ipChecker NetboxPrimaryIpChecker) (int64, error)
func (*NetboxPusher) Start ¶
func (nb *NetboxPusher) Start() error
func (*NetboxPusher) Stop ¶
func (nb *NetboxPusher) Stop() error
func (*NetboxPusher) UpdateDevice ¶
func (nb *NetboxPusher) UpdateDevice(ifcIpId, deviceId int64, ipVersion string) (int64, error)
type NetboxSite ¶
type Pusher ¶
type Pusher interface { Start() error Stop() error CreateDevice([]byte) (int64, error) UpdateDevice(int64, int64, string) (int64, error) CreateInterface([]byte) (int64, error) CreateInterfaceIpAddress([]byte, NetboxPrimaryIpChecker) (int64, error) CreateInventory([]byte) (int64, error) PrimaryIpCheck(string, int64, NetboxPrimaryIpChecker) (int64, error) }
Click to show internal directories.
Click to hide internal directories.