netplantest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

netplantest provides a fake implementation of the netplan dbus API for testing. Unlike the real netplan-dbus it uses the session bus but that is good enough for the testing. See configcore/netplan_test.go for example usage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetplanServer

type NetplanServer struct {
	MockNetplanConfigYaml string

	ConfigErr *dbus.Error

	ConfigApiGetCalls int
	ConfigApiGetErr   *dbus.Error

	ConfigApiSetCalls []string
	ConfigApiSetRet   bool
	ConfigApiSetErr   *dbus.Error

	ConfigApiApplyCalls int
	ConfigApiApplyRet   bool
	ConfigApiApplyErr   *dbus.Error

	ConfigApiTryCalls int
	ConfigApiTryRet   bool
	ConfigApiTryErr   *dbus.Error

	ConfigApiCancelCalls int
	ConfigApiCancelRet   bool
	ConfigApiCancelErr   *dbus.Error
	// contains filtered or unexported fields
}

func NewNetplanServer

func NewNetplanServer(mockNetplanConfigYaml string) (*NetplanServer, error)

func (*NetplanServer) ExportApiV1

func (server *NetplanServer) ExportApiV1()

func (*NetplanServer) ExportApiV2

func (server *NetplanServer) ExportApiV2()

func (*NetplanServer) Stop

func (server *NetplanServer) Stop() error

Jump to

Keyboard shortcuts

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