Documentation
¶
Index ¶
- type BGPInformation
- type Bgppeer
- type Bgppeers
- type Client
- func (c *Client) Close(session *junos.Junos)
- func (c *Client) CloseSSH(session *ssh.Session)
- func (c *Client) Connect() (*junos.Junos, error)
- func (c *Client) ConnectSSH() (*ssh.Session, error)
- func (c *Client) GetBGPStatusSSH(session *ssh.Session, format string) (string, error)
- func (c *Client) GetCommitHistory(session *junos.Junos) (string, error)
- func (c *Client) GetCommitHistorySSH(session *ssh.Session, format string) (string, error)
- func (c *Client) GetConfig(session *junos.Junos, format string) (string, error)
- func (c *Client) GetConfigSSH(session *ssh.Session, format string) (string, error)
- func (c *Client) GetHostInfo(session *junos.Junos) (*junos.Views, error)
- func (c *Client) GetInterfaceDiagnostics(session *junos.Junos) (string, error)
- func (c *Client) GetInterfaceEvents(session *junos.Junos) (string, error)
- func (c *Client) GetInterfaces(session *junos.Junos) (*junos.Views, error)
- func (c *Client) GetInterfacesDiagnosticsSSH(session *ssh.Session) (InterfacesDiagnosticsSSH, error)
- func (c *Client) GetInterfacesSSH(session *ssh.Session, format string) (string, error)
- func (c *Client) GetLLDPNeighbors(session *junos.Junos) (*junos.Views, error)
- func (c *Client) GetLLDPNeighborsSSH(session *ssh.Session, format string) (string, error)
- func (c *Client) GetLogMessagesSSH(session *ssh.Session) (string, error)
- func (c *Client) GetLogs(session *junos.Junos) (string, error)
- func (c *Client) GetOutputSSH(session *ssh.Session, command string, format string) (string, error)
- func (c *Client) GetRouterTime(session *junos.Junos) (string, error)
- func (c *Client) GetSystemUptimeSSH(session *ssh.Session, format string) (string, error)
- type CommitHistory
- type InterfaceDescriptions
- type InterfaceInformations
- type InterfacesDiagnosticsSSH
- type InterfacesInfo
- type InterfacesList
- type LLDpNeighborsSSH
- type LogicalInterface
- type NetworkAPI
- type NetworkSSH
- type PhysicalInterface
- type RPCReplyBgp
- type RouterTime
- type RouterTimeRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BGPInformation ¶
type Bgppeer ¶
type Bgppeer struct { XMLName xml.Name `xml:"bgp-peer"` Peeraddress string `xml:"peer-address"` Peeras string `xml:"peer-as"` Inputmessages string `xml:"input-messages"` Outputmessages string `xml:"output-messages"` Routequeuecount string `xml:"route-queue-count"` Flapcount string `xml:"flap-count"` Elapsedtime string `xml:"elapsed-time"` Peerstate string `xml:"peer-state"` }
type Client ¶
Client Initialize the Constructor Variables
func NetworkClient ¶
NetworkClient Initialize the Constructor
func (*Client) ConnectSSH ¶
ConnectSSH ... Establishes session with the device
func (*Client) GetBGPStatusSSH ¶
GetBGPStatusSSH ...
func (*Client) GetCommitHistory ¶
GetCommitHistory ...
func (*Client) GetCommitHistorySSH ¶
GetCommitHistorySSH ... Returns commit history
func (*Client) GetConfigSSH ¶
GetConfigSSH ... Returns the configuration of device
func (*Client) GetHostInfo ¶
GetHostInfo ...
func (*Client) GetInterfaceDiagnostics ¶
GetInterfaceDiagnostics ...
func (*Client) GetInterfaceEvents ¶
GetInterfaceEvents ...
func (*Client) GetInterfaces ¶
GetInterfaces ...
func (*Client) GetInterfacesDiagnosticsSSH ¶
func (c *Client) GetInterfacesDiagnosticsSSH(session *ssh.Session) (InterfacesDiagnosticsSSH, error)
GetInterfacesSSH ...Returns the interfaces details of device
func (*Client) GetInterfacesSSH ¶
GetInterfacesSSH ...Returns the interfaces details of device
func (*Client) GetLLDPNeighbors ¶
GetLLDPNeighbors ...
func (*Client) GetLLDPNeighborsSSH ¶
GetLLDPNeighborsSSH ...
func (*Client) GetLogMessagesSSH ¶
GetLogMessagesSSH ...
func (*Client) GetOutputSSH ¶
GetOutputSSH ...Takes command and expected output format as input and returns output in text, JSON or XML based on the output format
func (*Client) GetRouterTime ¶
GetRouterTime ...
type CommitHistory ¶
type InterfaceDescriptions ¶
type InterfaceDescriptions struct { Interface_information []struct { Attributes struct { Junos_style string `json:"junos:style"` Xmlns string `json:"xmlns"` } `json:"attributes"` Logical_interface []struct { Admin_status []struct { Data string `json:"data"` } `json:"admin-status"` Description []struct { Data string `json:"data"` } `json:"description"` Name []struct { Data string `json:"data"` } `json:"name"` Oper_status []struct { Data string `json:"data"` } `json:"oper-status"` } `json:"logical-interface"` Physical_interface []struct { Admin_status []struct { Data string `json:"data"` } `json:"admin-status"` Description []struct { Data string `json:"data"` } `json:"description"` Name []struct { Data string `json:"data"` } `json:"name"` Oper_status []struct { Data string `json:"data"` } `json:"oper-status"` } `json:"physical-interface"` } `json:"interface-information"` }
type InterfaceInformations ¶
type InterfaceInformations struct { XMLName xml.Name `xml:"interface-information"` PhysicalInterface []PhysicalInterface `xml:"physical-interface"` LogicalInterface []LogicalInterface `xml:"logical-interface"` }
type InterfacesDiagnosticsSSH ¶
type InterfacesDiagnosticsSSH struct { XMLName xml.Name `xml:"rpc-reply"` Junos string `xml:"junos,attr"` InterfaceInformation struct { Xmlns string `xml:"xmlns,attr"` Style string `xml:"style,attr"` PhysicalInterface []struct { Name string `xml:"name"` OpticsDiagnostics struct { ModuleTemperature struct { Celsius string `xml:"celsius,attr"` } `xml:"module-temperature"` ModuleVoltage string `xml:"module-voltage"` ModuleTemperatureHighAlarm string `xml:"module-temperature-high-alarm"` ModuleTemperatureLowAlarm string `xml:"module-temperature-low-alarm"` ModuleTemperatureHighWarn string `xml:"module-temperature-high-warn"` ModuleTemperatureLowWarn string `xml:"module-temperature-low-warn"` ModuleVoltageHighAlarm string `xml:"module-voltage-high-alarm"` ModuleVoltageLowAlarm string `xml:"module-voltage-low-alarm"` ModuleVoltageHighWarn string `xml:"module-voltage-high-warn"` ModuleVoltageLowWarn string `xml:"module-voltage-low-warn"` ModuleTemperatureHighAlarmThreshold struct { Celsius string `xml:"celsius,attr"` } `xml:"module-temperature-high-alarm-threshold"` ModuleTemperatureLowAlarmThreshold struct { Celsius string `xml:"celsius,attr"` } `xml:"module-temperature-low-alarm-threshold"` ModuleTemperatureHighWarnThreshold struct { Celsius string `xml:"celsius,attr"` } `xml:"module-temperature-high-warn-threshold"` ModuleTemperatureLowWarnThreshold struct { Celsius string `xml:"celsius,attr"` } `xml:"module-temperature-low-warn-threshold"` ModuleVoltageHighAlarmThreshold string `xml:"module-voltage-high-alarm-threshold"` ModuleVoltageLowAlarmThreshold string `xml:"module-voltage-low-alarm-threshold"` ModuleVoltageHighWarnThreshold string `xml:"module-voltage-high-warn-threshold"` ModuleVoltageLowWarnThreshold string `xml:"module-voltage-low-warn-threshold"` LaserBiasCurrentHighAlarmThreshold string `xml:"laser-bias-current-high-alarm-threshold"` LaserBiasCurrentLowAlarmThreshold string `xml:"laser-bias-current-low-alarm-threshold"` LaserBiasCurrentHighWarnThreshold string `xml:"laser-bias-current-high-warn-threshold"` LaserBiasCurrentLowWarnThreshold string `xml:"laser-bias-current-low-warn-threshold"` LaserTxPowerHighAlarmThreshold string `xml:"laser-tx-power-high-alarm-threshold"` LaserTxPowerHighAlarmThresholdDbm string `xml:"laser-tx-power-high-alarm-threshold-dbm"` LaserTxPowerLowAlarmThreshold string `xml:"laser-tx-power-low-alarm-threshold"` LaserTxPowerLowAlarmThresholdDbm string `xml:"laser-tx-power-low-alarm-threshold-dbm"` LaserTxPowerHighWarnThreshold string `xml:"laser-tx-power-high-warn-threshold"` LaserTxPowerHighWarnThresholdDbm string `xml:"laser-tx-power-high-warn-threshold-dbm"` LaserTxPowerLowWarnThreshold string `xml:"laser-tx-power-low-warn-threshold"` LaserTxPowerLowWarnThresholdDbm string `xml:"laser-tx-power-low-warn-threshold-dbm"` LaserRxPowerHighAlarmThreshold string `xml:"laser-rx-power-high-alarm-threshold"` LaserRxPowerHighAlarmThresholdDbm string `xml:"laser-rx-power-high-alarm-threshold-dbm"` LaserRxPowerLowAlarmThreshold string `xml:"laser-rx-power-low-alarm-threshold"` LaserRxPowerLowAlarmThresholdDbm string `xml:"laser-rx-power-low-alarm-threshold-dbm"` LaserRxPowerHighWarnThreshold string `xml:"laser-rx-power-high-warn-threshold"` LaserRxPowerHighWarnThresholdDbm string `xml:"laser-rx-power-high-warn-threshold-dbm"` LaserRxPowerLowWarnThreshold string `xml:"laser-rx-power-low-warn-threshold"` LaserRxPowerLowWarnThresholdDbm string `xml:"laser-rx-power-low-warn-threshold-dbm"` OpticsDiagnosticsLaneValues struct { LaneIndex string `xml:"lane-index"` LaserBiasCurrent string `xml:"laser-bias-current"` LaserOutputPower string `xml:"laser-output-power"` LaserOutputPowerDbm string `xml:"laser-output-power-dbm"` LaserRxOpticalPower string `xml:"laser-rx-optical-power"` LaserRxOpticalPowerDbm string `xml:"laser-rx-optical-power-dbm"` LaserBiasCurrentHighAlarm string `xml:"laser-bias-current-high-alarm"` LaserBiasCurrentLowAlarm string `xml:"laser-bias-current-low-alarm"` LaserBiasCurrentHighWarn string `xml:"laser-bias-current-high-warn"` LaserBiasCurrentLowWarn string `xml:"laser-bias-current-low-warn"` LaserRxPowerHighAlarm string `xml:"laser-rx-power-high-alarm"` LaserRxPowerLowAlarm string `xml:"laser-rx-power-low-alarm"` LaserRxPowerHighWarn string `xml:"laser-rx-power-high-warn"` LaserRxPowerLowWarn string `xml:"laser-rx-power-low-warn"` TxLossOfSignalFunctionalityAlarm string `xml:"tx-loss-of-signal-functionality-alarm"` RxLossOfSignalAlarm string `xml:"rx-loss-of-signal-alarm"` TxLaserDisabledAlarm string `xml:"tx-laser-disabled-alarm"` } `xml:"optics-diagnostics-lane-values"` } `xml:"optics-diagnostics"` } `xml:"physical-interface"` } `xml:"interface-information"` }
type InterfacesInfo ¶
type InterfacesInfo struct { XMLName xml.Name `xml:"rpc-reply"` InterfaceInformation InterfaceInformations `xml:"interface-information"` }
type InterfacesList ¶
type LLDpNeighborsSSH ¶
type LLDpNeighborsSSH struct { Lldp_neighbors_information []struct { Attributes struct { Junos_style string `json:"junos:style"` } `json:"attributes"` Lldp_neighbor_information []struct { Lldp_local_parent_interface_name []struct { Data string `json:"data"` } `json:"lldp-local-parent-interface-name"` Lldp_local_port_id []struct { Data string `json:"data"` } `json:"lldp-local-port-id"` Lldp_remote_chassis_id []struct { Data string `json:"data"` } `json:"lldp-remote-chassis-id"` Lldp_remote_chassis_id_subtype []struct { Data string `json:"data"` } `json:"lldp-remote-chassis-id-subtype"` Lldp_remote_port_description []struct { Data string `json:"data"` } `json:"lldp-remote-port-description"` Lldp_remote_system_name []struct { Data string `json:"data"` } `json:"lldp-remote-system-name"` } `json:"lldp-neighbor-information"` } `json:"lldp-neighbors-information"` }
type LogicalInterface ¶
type NetworkAPI ¶
type NetworkAPI interface { Connect() (*junos.Junos, error) GetCommitHistory(session *junos.Junos) (string, error) GetConfig(session *junos.Junos, format string) (string, error) GetInterfaces(session *junos.Junos) (string, error) GetLogs(session *junos.Junos) (string, error) GetInterfaceEvents(session *junos.Junos) (string, error) GetRouterTime(session *junos.Junos) (string, error) GetHostInfo(session *junos.Junos) (string, error) GetLLDPNeighbors(session *junos.Junos) (string, error) GetInterfaceDiagnostics(session *junos.Junos) (string, error) Close() *junos.Junos }
NetworkAPI ... Interface for library connecting over netconf
type NetworkSSH ¶
type NetworkSSH interface { ConnectSSH(*ssh.Session, error) GetConfigSSH(session *ssh.Session, format string) (string, error) GetInterfacesSSH(session *ssh.Session, format string) (string, error) GetInterfacesDiagnosticsSSH(session *ssh.Session) (InterfacesDiagnosticsSSH, error) GetBGPStatusSSH(session *ssh.Session, format string) (string, error) GetLogMessagesSSH(session *ssh.Session) (string, error) GetCommitHistorySSH(session *ssh.Session, port string) (string, error) GetLLDPNeighborsSSH(session *ssh.Session, format string) (string, error) GetOutputSSH(session *ssh.Session, command string, format string) (string, error) CloseSSH(session *ssh.Session) }
NetworkSSH ... Interface for library connecting over ssh
type PhysicalInterface ¶
type RPCReplyBgp ¶
type RPCReplyBgp struct { XMLName xml.Name `xml:"rpc-reply"` Bgpinformation BGPInformation `xml:"bgp-information"` }
type RouterTime ¶
type RouterTime struct { MultiRoutingEngineResults []struct { MultiRoutingEngineItem []struct { Rename []struct { Data string `json:"data"` } `json:"re-name"` SystemUptimeInformation []struct { Attributes struct { Xmlns string `json:"xmlns"` } `json:"attributes"` Currenttime []struct { Datetime []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"date-time"` } `json:"current-time"` LastConfiguredTime []struct { DateTime []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"date-time"` TimeLength []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"time-length"` User []struct { Data string `json:"data"` } `json:"user"` } `json:"last-configured-time"` ProtocolsStartedTime []struct { DateTime []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"date-time"` TimeLength []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"time-length"` } `json:"protocols-started-time"` SystemBootedTime []struct { DateTime []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"date-time"` TimeLength []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"time-length"` } `json:"system-booted-time"` TimeSource []struct { Data string `json:"data"` } `json:"time-source"` UptimeInformation []struct { ActiveUserCount []struct { Attributes struct { Junosformat string `json:"junos:format"` } `json:"attributes"` Data string `json:"data"` } `json:"active-user-count"` DateTime []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"date-time"` LoadAverage1 []struct { Data string `json:"data"` } `json:"load-average-1"` LoadAverage15 []struct { Data string `json:"data"` } `json:"load-average-15"` LoadAverage5 []struct { Data string `json:"data"` } `json:"load-average-5"` UpTime []struct { Attributes struct { Junosseconds string `json:"junos:seconds"` } `json:"attributes"` Data string `json:"data"` } `json:"up-time"` UserTable []struct{} `json:"user-table"` } `json:"uptime-information"` } `json:"system-uptime-information"` } `json:"multi-routing-engine-item"` } `json:"multi-routing-engine-results"` }