nmstate

package module
v0.0.0-...-883f36f Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: LGPL-2.1 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithIncludeSecrets

func WithIncludeSecrets() func(*Nmstate)

func WithIncludeStatusData

func WithIncludeStatusData() func(*Nmstate)

func WithKernelOnly

func WithKernelOnly() func(*Nmstate)

func WithLogsWritter

func WithLogsWritter(log_writter io.Writer) func(*Nmstate)

func WithMemoryOnly

func WithMemoryOnly() func(*Nmstate)

func WithNoCommit

func WithNoCommit() func(*Nmstate)

func WithNoVerify

func WithNoVerify() func(*Nmstate)

func WithRunningConfigOnly

func WithRunningConfigOnly() func(*Nmstate)

func WithTimeout

func WithTimeout(timeout time.Duration) func(*Nmstate)

Types

type Nmstate

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

func New

func New(options ...func(*Nmstate)) *Nmstate

func (*Nmstate) ApplyNetState

func (n *Nmstate) ApplyNetState(state string) (string, error)

Apply the network state in json format. This function returns the applied network state or an error.

func (*Nmstate) CommitCheckpoint

func (n *Nmstate) CommitCheckpoint(checkpoint string) (string, error)

Commit the checkpoint path provided. This function returns the committed checkpoint path or an error.

func (*Nmstate) GenerateConfiguration

func (n *Nmstate) GenerateConfiguration(state string) (string, error)

GenerateConfiguration generates the configuration for the state provided. This function returns the configuration files for the state provided.

func (*Nmstate) RetrieveNetState

func (n *Nmstate) RetrieveNetState() (string, error)

Retrieve the network state in json format. This function returns the current network state or an error.

func (*Nmstate) RollbackCheckpoint

func (n *Nmstate) RollbackCheckpoint(checkpoint string) (string, error)

Rollback to the checkpoint provided. This function returns the checkpoint path used for rollback or an error.

Jump to

Keyboard shortcuts

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