netconf

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package netconf contains netconf-based utility functions used in containerlab.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig added in v0.69.0

func GetConfig(addr, username, password, scrapliPlatform string) (string, error)

GetConfig retrieves the running configuration and returns it as a string. It automatically picks the appropriate network driver for the provided Scrapli Platform.

func MultiExec added in v0.70.0

func MultiExec(addr, username, password string, operations []Operation) error

MultiExec opens a NETCONF session to the provided address and executes the supplied operations sequentially. The driver is opened once and used across every operation, enabling scenarios that require multiple NETCONF calls within a single session (for example, chaining import actions prior to committing configuration changes).

func SaveRunningConfig added in v0.69.0

func SaveRunningConfig(addr, username, password, _ string) error

SaveRunningConfig saves the running config to the startup by means of invoking a netconf rpc <copy-config> from running to startup datastore this method is used on the network elements that can't perform configuration save via other means.

Types

type Operation added in v0.70.0

type Operation func(*netconf.Driver) (*response.NetconfResponse, error)

Operation defines a NETCONF action to be executed against an established NETCONF driver.

Jump to

Keyboard shortcuts

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