junos_helpers

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: BSD-2-Clause-Views Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoNCClient

type GoNCClient struct {
	Driver driver.Driver
	Lock   sync.RWMutex
}

GoNCClient type for storing data and wrapping functions

func NewClient

func NewClient(username string, password string, sshkey string, address string, port int) (*GoNCClient, error)

NewClient returns gonetconf new client driver

func (*GoNCClient) Close

func (g *GoNCClient) Close() error

Close is a functional thing to close the Driver

func (*GoNCClient) DeleteConfig

func (g *GoNCClient) DeleteConfig(applygroup string) (string, error)

DeleteConfig is a wrapper for driver.SendRaw()

func (*GoNCClient) DeleteConfigNoCommit

func (g *GoNCClient) DeleteConfigNoCommit(applygroup string) (string, error)

DeleteConfigNoCommit is a wrapper for driver.SendRaw() Does not provide mandatory commit unlike DeleteConfig()

func (*GoNCClient) MarshalGroup

func (g *GoNCClient) MarshalGroup(id string, obj interface{}) error

MarshalGroup accepts a struct of type X and then marshals data onto it

func (*GoNCClient) ReadGroup

func (g *GoNCClient) ReadGroup(applygroup string) (string, error)

ReadGroup is a helper function

func (*GoNCClient) ReadRawGroup

func (g *GoNCClient) ReadRawGroup(applygroup string) (string, error)

ReadRawGroup is a helper function

func (*GoNCClient) SendCommit

func (g *GoNCClient) SendCommit() error

SendCommit is a wrapper for driver.SendRaw()

func (*GoNCClient) SendRawConfig

func (g *GoNCClient) SendRawConfig(netconfcall string, commit bool) (string, error)

SendRawConfig is a wrapper for driver.SendRaw()

func (*GoNCClient) SendTransaction

func (g *GoNCClient) SendTransaction(id string, obj interface{}, commit bool) error

SendTransaction is a method that unnmarshals the XML, creates the transaction and passes in a commit

func (*GoNCClient) UpdateRawConfig

func (g *GoNCClient) UpdateRawConfig(applygroup string, netconfcall string, commit bool) (string, error)

UpdateRawConfig deletes group data and replaces it (for Update in TF)

Jump to

Keyboard shortcuts

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