types

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

type Configuration interface {
	Parse(data []byte) error
	Dump(format string) string
}

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

func (*Devices) Dump

func (c *Devices) Dump(format string) string

Dump - outputs Devices struct in either 'yaml' or 'json' format

func (*Devices) Parse

func (c *Devices) Parse(data []byte) error

Parse - tries to parse yaml first, then json into the Devices struct

type IAgent

type IAgent struct {
	Port int `json:"port"`
}

IAgent - configure the NETCONF port

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

type V2

type V2 struct {
	Community string `json:"community"`
}

V2 - configure the SNMP community string

type Vendor

type Vendor struct {
	Juniper *Juniper `json:"juniper,omitempty" yaml:"juniper,omitempty"`
	Cisco   *Cisco   `json:"cisco,omitempty" yaml:"cisco,omitempty"`
}

Vendor - Configure the Vendor information

Jump to

Keyboard shortcuts

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