netconf

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(c1, c2 string) bool

Compare cleans up two switch configuration files and returns true if they are the same.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client to get the switch configuration using the NETCONF protocol.

func New

func New(auth *junos.AuthMethod) Client

New returns a new NetconfClient.

func (Client) GetConfig

func (c Client) GetConfig(hostname string, section ...string) (string, error)

GetConfig connects to a switch, reads the specified configuration section and returns its content. The section can be an empty string. In that case, the whole configuration will be read.

Jump to

Keyboard shortcuts

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