netconf

package
v0.0.0-...-10c85b7 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: BSD-2-Clause-Views Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DriverSSH

type DriverSSH struct {
	Timeout   time.Duration          // Timeout for SSH timed sessions
	Port      int                    // Target port
	Host      string                 // Target hostname
	Target    string                 // Target hostname:port
	Datastore string                 // NETCONF datastore
	Conn      net.Conn               // Conn for session
	SSHConfig *ssh.ClientConfig      // SSH Config
	Transport *lowlevel.TransportSSH // Transport data
	Session   *session.Session       // Session data
}

DriverSSH type is for creating an SSH based driver. Maintains state for session and connection. Implements Driver{}

func New

func New() *DriverSSH

New creates a new instance of DriverSSH

func (*DriverSSH) Close

func (d *DriverSSH) Close() error

Close function closes the socket

func (*DriverSSH) Dial

func (d *DriverSSH) Dial() error

Dial function (call this after New())

func (*DriverSSH) DialTimeout

func (d *DriverSSH) DialTimeout() error

DialTimeout function (call this after New())

func (*DriverSSH) GetConfig

func (d *DriverSSH) GetConfig() (*rpc.RPCReply, error)

GetConfig requests the contents of a datastore

func (*DriverSSH) Lock

func (d *DriverSSH) Lock(ds string) (*rpc.RPCReply, error)

Lock the target datastore

func (*DriverSSH) SendRaw

func (d *DriverSSH) SendRaw(rawxml string) (*rpc.RPCReply, error)

SendRaw sends a raw XML envelope

func (*DriverSSH) SetDatastore

func (d *DriverSSH) SetDatastore(ds string) error

SetDatastore sets the target datastore on the data structure

func (*DriverSSH) Unlock

func (d *DriverSSH) Unlock(ds string) (*rpc.RPCReply, error)

Unlock the target datastore

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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