Documentation
¶
Index ¶
- func CidrToIPAndNetMask(ipv4 string) (string, string, int, error)
- type ACL
- type AssignedObject
- type Cable
- type CablePeer
- type Client
- type Community
- type ConfigContext
- type ConnectedEndpoint
- type Definitions
- type Device
- type DeviceInfo
- type DeviceRole
- type DeviceStatus
- type DeviceType
- type Face
- type Family
- type GetIPParams
- type Host
- type IP
- type IPInfo
- type Interface
- type InterfaceInfo
- type Manufacturer
- type Named
- type NetworkDevice
- type Ntp
- type PatchedDeviceParams
- type PermitConnRoutes
- type Platform
- type Prefix
- type PrefixInfo
- type PrimaryIP
- type PrimaryIP4
- type Rack
- type RouteMaps
- type Site
- type Snmp
- type Status
- type Tags
- type Tenant
- type Type
- type Vrf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ACL ¶
type ACL struct {
Definitions *Definitions `json:"definitions,omitempty"`
}
type AssignedObject ¶
type Client ¶
type Client interface {
RequestActiveDevice() (*DeviceInfo, error)
GetDeviceByAssetTag(string) (*DeviceInfo, error)
GetDeviceByID(string) (*DeviceInfo, error)
PatchDeviceStatus(string, *PatchedDeviceParams) error
GetActiveInterface(string) (*InterfaceInfo, error)
GetIP(*GetIPParams) (*IPInfo, error)
GetPrefix(string, string, int) (*PrefixInfo, error)
}
func NewDefaultClient ¶
type ConfigContext ¶
type ConnectedEndpoint ¶
type Definitions ¶
type Definitions struct {
Named *Named `json:"named,omitempty"`
}
type DeviceInfo ¶
type DeviceInfo struct {
ID string `json:"id,omitempty"`
URL string `json:"url,omitempty"`
Name string `json:"name,omitempty"`
DisplayName string `json:"display_name,omitempty"`
DeviceType *DeviceType `json:"device_type,omitempty"`
DeviceRole *DeviceRole `json:"device_role,omitempty"`
Tenant *Tenant `json:"tenant,omitempty"`
Platform *Platform `json:"platform,omitempty"`
Serial string `json:"serial,omitempty"`
AssetTag interface{} `json:"asset_tag,omitempty"`
Site *Site `json:"site,omitempty"`
Rack *Rack `json:"rack,omitempty"`
Position int `json:"position,omitempty"`
Face *Face `json:"face,omitempty"`
ParentDevice interface{} `json:"parent_device,omitempty"`
Status *Status `json:"status,omitempty"`
PrimaryIP *PrimaryIP `json:"primary_ip,omitempty"`
PrimaryIP4 *PrimaryIP4 `json:"primary_ip4,omitempty"`
PrimaryIP6 interface{} `json:"primary_ip6,omitempty"`
Cluster interface{} `json:"cluster,omitempty"`
VirtualChassis interface{} `json:"virtual_chassis,omitempty"`
VcPosition interface{} `json:"vc_position,omitempty"`
VcPriority interface{} `json:"vc_priority,omitempty"`
Comments string `json:"comments,omitempty"`
LocalContextData interface{} `json:"local_context_data,omitempty"`
Tags []Tags `json:"tags,omitempty"`
ConfigContext *ConfigContext `json:"config_context,omitempty"`
Created string `json:"created,omitempty"`
LastUpdated time.Time `json:"last_updated,omitempty"`
}
type DeviceRole ¶
type DeviceStatus ¶
type DeviceStatus string
const ( Active DeviceStatus = "active" Staged DeviceStatus = "staged" )
type DeviceType ¶
type GetIPParams ¶
func (*GetIPParams) ToRawQuery ¶
func (p *GetIPParams) ToRawQuery() string
type IPInfo ¶
type IPInfo struct {
ID string `json:"id"`
URL string `json:"url"`
Family *Family `json:"family"`
Address string `json:"address"`
Vrf *Vrf `json:"vrf"`
Tenant *Tenant `json:"tenant"`
Status *Status `json:"status"`
AssignedObjectType string `json:"assigned_object_type"`
AssignedObjectID string `json:"assigned_object_id"`
AssignedObject *AssignedObject `json:"assigned_object"`
DNSName string `json:"dns_name"`
Description string `json:"description"`
Created string `json:"created"`
LastUpdated time.Time `json:"last_updated"`
}
type Interface ¶
type Interface struct {
Count int `json:"count"`
Results []InterfaceInfo `json:"results"`
}
type InterfaceInfo ¶
type InterfaceInfo struct {
ID string `json:"id"`
URL string `json:"url"`
Device *Device `json:"device"`
Name string `json:"name"`
Label string `json:"label"`
Type *Type `json:"type"`
Enabled bool `json:"enabled"`
MacAddress string `json:"mac_address"`
MgmtOnly bool `json:"mgmt_only"`
Description string `json:"description"`
Cable *Cable `json:"cable"`
CablePeer *CablePeer `json:"cable_peer"`
CablePeerType string `json:"cable_peer_type"`
ConnectedEndpoint *ConnectedEndpoint `json:"connected_endpoint"`
ConnectedEndpointType string `json:"connected_endpoint_type"`
ConnectedEndpointReachable bool `json:"connected_endpoint_reachable"`
CountIpaddresses int `json:"count_ipaddresses"`
}
type Manufacturer ¶
type NetworkDevice ¶
type NetworkDevice struct {
Count int `json:"count,omitempty"`
Results []*DeviceInfo `json:"results,omitempty"`
}
type PatchedDeviceParams ¶
type PatchedDeviceParams struct {
Status DeviceStatus `json:"status"`
AssetTag string `json:"asset_tag"`
}
type PermitConnRoutes ¶
type Prefix ¶
type Prefix struct {
Count int `json:"count"`
Results []PrefixInfo `json:"results"`
}
type PrefixInfo ¶
type PrefixInfo struct {
ID string `json:"id"`
URL string `json:"url"`
Family *Family `json:"family"`
Prefix string `json:"prefix"`
Site *Site `json:"site"`
Vrf *Vrf `json:"vrf"`
Tenant *Tenant `json:"tenant"`
Status *Status `json:"status"`
IsPool bool `json:"is_pool"`
Description string `json:"description"`
Tags []Tags `json:"tags"`
Created string `json:"created"`
LastUpdated time.Time `json:"last_updated"`
}
type PrimaryIP4 ¶
type RouteMaps ¶
type RouteMaps struct {
PermitConnRoutes *PermitConnRoutes `json:"PERMIT_CONN_ROUTES,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.