Documentation ¶
Index ¶
- func DumpYAMLOrJSON(format string, configuration Configuration) string
- func LoadConfiguration(filelocation string, configuration Configuration) error
- type Authentication
- type Cisco
- type Configuration
- type DGAuthentication
- type Device
- type DeviceGroup
- type DeviceGroups
- type Devices
- type IAgent
- type Juniper
- type NativeGpb
- type OpenConfig
- type PlaybookInstances
- type Snmp
- type V2
- type Vendor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpYAMLOrJSON ¶
func DumpYAMLOrJSON(format string, configuration Configuration) string
DumpYAMLOrJSON - For a configuration, output json or yaml
func LoadConfiguration ¶
func LoadConfiguration(filelocation string, configuration Configuration) error
LoadConfiguration - populates a configuration type with data from file
Types ¶
type Authentication ¶
type Authentication struct { Password struct { Password *string `json:"password"` Username *string `json:"username"` } `json:"password,omitempty" yaml:"password,omitempty"` }
Authentication - Collection type for Auth options
type Cisco ¶
type Cisco struct {
OperatingSystem string `json:"operating-system" yaml:"operating-system"`
}
Cisco - option to define the Operating system
type Configuration ¶
Configuration - structures that get loaded from files
type DGAuthentication ¶
type DGAuthentication struct { Password struct { Password *string `json:"password"` Username *string `json:"username"` } `json:"password,omitempty" yaml:"password,omitempty"` }
DGAuthentication - Option to Override the individual Device Username/Passwords
type Device ¶
type Device struct { DeviceID string `json:"device-id" yaml:"device-id"` Host string `json:"host"` SystemID string `json:"system-id,omitempty" yaml:"system-id,omitempty"` Authentication *Authentication `json:"authentication,omitempty" yaml:"authentication,omitempty"` IAgent *IAgent `json:"iAgent,omitempty" yaml:"iAgent,omitempty"` OpenConfig *OpenConfig `json:"open-config,omitempty" yaml:"open-config,omitempty"` Snmp *Snmp `json:"snmp,omitempty" yaml:"snmp,omitempty"` Vendor *Vendor `json:"vendor,omitempty" yaml:"vendor,omitempty"` }
Device - info needed to Register a Device in Healthbot
type DeviceGroup ¶
type DeviceGroup struct { DeviceGroupName string `json:"device-group-name" yaml:"device-group-name"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Devices *[]string `json:"devices,omitempty" yaml:"devices,omitempty"` Playbooks *[]string `json:"playbooks,omitempty" yaml:"playbooks,omitempty"` Authentication *DGAuthentication `json:"authentication,omitempty" yaml:"authentication,omitempty"` NativeGpb *NativeGpb `json:"native-gpb,omitempty" yaml:"native-gpb,omitempty"` }
DeviceGroup - info needed to Register a DeviceGroup in Healthbot
type DeviceGroups ¶
type DeviceGroups struct {
DeviceGroup []DeviceGroup `json:"device-group" yaml:"device-group"`
}
DeviceGroups - collection of Device Groups
func (*DeviceGroups) Dump ¶
func (c *DeviceGroups) Dump(format string) string
Dump - outputs DeviceGroups struct in either 'yaml' or 'json' format
func (*DeviceGroups) Parse ¶
func (c *DeviceGroups) Parse(data []byte) error
Parse - tries to parse yaml first, then json into the Devices struct
type Devices ¶
type Devices struct {
Device []Device `json:"device"`
}
Devices - collection of Device
type Juniper ¶
type Juniper struct {
OperatingSystem string `json:"operating-system" yaml:"operating-system"`
}
Juniper - option to define the Operating system
type NativeGpb ¶
type NativeGpb struct {
Ports []int `json:"ports"`
}
NativeGpb - Override the default JTI Port(s)
type OpenConfig ¶
type OpenConfig struct {
Port int `json:"port"`
}
OpenConfig - configure the Open Config port
type PlaybookInstances ¶
type PlaybookInstances struct { DeviceGroup []struct { DeviceGroupName string `json:"device-group-name" yaml:"device-group-name"` Devices *[]string `json:"devices,omitempty" yaml:"devices,omitempty"` Playbooks []string `json:"playbooks,omitempty" yaml:"playbooks,omitempty"` Variable []struct { InstanceID string `json:"instance-id" yaml:"instance-id"` Playbook string `json:"playbook"` Rule string `json:"rule"` VariableValue []struct { Name string `json:"name"` Value string `json:"value"` } `json:"variable-value,omitempty" yaml:"variable-value,omitempty"` } `json:"variable"` } `json:"device-group" yaml:"device-group"` }
PlaybookInstances - wrapper type for Device Groups, with only the Playbook relevant information described
func (*PlaybookInstances) Dump ¶
func (c *PlaybookInstances) Dump(format string) string
Dump - outputs PlaybookInstances struct in either 'yaml' or 'json' format
func (*PlaybookInstances) Parse ¶
func (c *PlaybookInstances) Parse(data []byte) error
Parse - tries to parse yaml first, then json into the PlaybookInstances struct
type Snmp ¶
type Snmp struct { Port int `json:"port,omitempty" yaml:"port,omitempty"` V2 *V2 `json:"v2,omitempty" yaml:"v2,omitempty"` }
Snmp - configure the SNMP port or Community String