utils

package
v0.0.0-11-04-2015.20-5... Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConfig

func AddConfig(t *testing.T, jsonCfg string, node stu.TestbedNode)

AddConfig issues netdcli with -add-cfg flag

func AddConfigConsul

func AddConfigConsul(t *testing.T, jsonCfg string, node stu.TestbedNode)

AddConfigConsul issues netdcli with -add-cfg flag and uses consul state-store

func ApplyDesiredConfig

func ApplyDesiredConfig(t *testing.T, jsonCfg string, node stu.TestbedNode)

ApplyDesiredConfig issues netdcli with -cfg flag

func ApplyDesiredConfigConsul

func ApplyDesiredConfigConsul(t *testing.T, jsonCfg string, node stu.TestbedNode)

ApplyDesiredConfigConsul issues netdcli with -cfg flag and uses consul state-store

func ApplyHostBindingsConfig

func ApplyHostBindingsConfig(t *testing.T, jsonCfg string, node stu.TestbedNode)

ApplyHostBindingsConfig issues netdcli with -host-bindings-cfg flag

func ConfigCleanupCommon

func ConfigCleanupCommon(t *testing.T, nodes []stu.TestbedNode)

ConfigCleanupCommon performs common cleanup after each test

func ConfigSetupCommon

func ConfigSetupCommon(t *testing.T, jsonCfg string, nodes []stu.TestbedNode)

ConfigSetupCommon performs common configuration setup on specified testbed nodes

func ConfigSetupCommonWithConsul

func ConfigSetupCommonWithConsul(t *testing.T, jsonCfg string, nodes []stu.TestbedNode)

ConfigSetupCommonWithConsul performs common configuration setup on specified testbed nodes

func DelConfig

func DelConfig(t *testing.T, jsonCfg string, node stu.TestbedNode)

DelConfig issues netdcli with -del-cfg flag

func DelConfigConsul

func DelConfigConsul(t *testing.T, jsonCfg string, node stu.TestbedNode)

DelConfigConsul issues netdcli with -del-cfg flag and uses consul state-store

func DockerCleanup

func DockerCleanup(t *testing.T, node stu.TestbedNode, contName string)

DockerCleanup kills and removes a container on a specified testbed node

func DockerCleanupWithEnv

func DockerCleanupWithEnv(t *testing.T, node stu.TestbedNode, contName string, env []string)

DockerCleanupWithEnv kills and removes a container on a specified testbed node and with specified env-variables

func DumpNetpluginLogs

func DumpNetpluginLogs(node stu.TestbedNode)

DumpNetpluginLogs prints netplugin logs from the specified testbed node

func FixUpContainerUUIDs

func FixUpContainerUUIDs(t *testing.T, nodes []stu.TestbedNode, jsonCfg string) (string, error)

FixUpContainerUUIDs fills up UUID information in passed jsonCfg and returns host-binding configuration

func FixUpInfraContainerUUIDs

func FixUpInfraContainerUUIDs(t *testing.T, nodes []stu.TestbedNode, jsonCfg, infraContCfg string) (string, error)

FixUpInfraContainerUUIDs fills up UUID information in passed jsonCfg and returns host-binding configuration

func GetCfgFile

func GetCfgFile(fileName string) string

GetCfgFile returns the path string for specified file name in examples directory

func GetIPAddress

func GetIPAddress(t *testing.T, node stu.TestbedNode, ep, stateStore string) string

GetIPAddress returns IP-address information for specified endpoint

func GetNetpluginConfigWithConsul

func GetNetpluginConfigWithConsul() string

GetNetpluginConfigWithConsul returns netplugin config that uses consul state store

func NetworkStateExists

func NetworkStateExists(node stu.TestbedNode, network, stateStore string) error

NetworkStateExists tests if state for specified network exists

func OkToCleanup

func OkToCleanup(testFailed bool) bool

OkToCleanup tests if a testbed cleanup should be performed.

func OvsDumpInfo

func OvsDumpInfo(node stu.TestbedNode)

OvsDumpInfo dumps the ovs state on the specified testbed node

func StartClient

func StartClient(t *testing.T, node stu.TestbedNode, contName, ipAddress string)

StartClient starts a client container. It expects ping to server container to succeed

func StartClientFailure

func StartClientFailure(t *testing.T, node stu.TestbedNode, contName, ipAddress string)

StartClientFailure starts a client container. It expects ping to server container to fail

func StartClientFailureWithEnvAndArgs

func StartClientFailureWithEnvAndArgs(t *testing.T, node stu.TestbedNode, contName, ipAddress string,
	env, dockerArgs []string)

StartClientFailureWithEnvAndArgs starts a client container with specified env-variables. It expects ping to server container to failure

func StartClientWithEnvAndArgs

func StartClientWithEnvAndArgs(t *testing.T, node stu.TestbedNode, contName, ipAddress string,
	env, dockerArgs []string)

StartClientWithEnvAndArgs starts a client container with specified env-variables. It expects ping to server container to succeed

func StartNetPlugin

func StartNetPlugin(t *testing.T, nodes []stu.TestbedNode, nativeInteg bool)

StartNetPlugin starts netplugin on specified testbed nodes

func StartNetPluginWithConfig

func StartNetPluginWithConfig(t *testing.T, nodes []stu.TestbedNode, nativeInteg bool,
	configStr string)

StartNetPluginWithConfig starts netplugin on specified testbed nodes with specified config

func StartNetmaster

func StartNetmaster(t *testing.T, node stu.TestbedNode)

StartNetmaster starts netplugin on specified testbed node

func StartNetmasterWithFlags

func StartNetmasterWithFlags(t *testing.T, node stu.TestbedNode, flags map[string]string)

StartNetmasterWithFlags starts netplugin on specified testbed nodes with specified flags

func StartServer

func StartServer(t *testing.T, node stu.TestbedNode, contName string)

StartServer starts a server container

func StartServerWithEnvAndArgs

func StartServerWithEnvAndArgs(t *testing.T, node stu.TestbedNode, contName string,
	env, dockerArgs []string)

StartServerWithEnvAndArgs starts a server container with specified env-variables

func StopNetPlugin

func StopNetPlugin(t *testing.T, nodes []stu.TestbedNode)

StopNetPlugin stops the netplugin on specified testbed nodes

func StopNetmaster

func StopNetmaster(t *testing.T, node stu.TestbedNode)

StopNetmaster stops the netmaster on specified testbed node

func StopOnError

func StopOnError(testFailed bool)

StopOnError stops the test and panics if CONTIV_SOE env-variable is set and test has failed

Types

type TempFileCtx

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

TempFileCtx allows managing temporary file contexts

func (*TempFileCtx) AddFile

func (ctx *TempFileCtx) AddFile(fileContents string) (*os.File, error)

AddFile adds a file to the context with specified file-contents

func (*TempFileCtx) Create

func (ctx *TempFileCtx) Create(fileContents string) (*os.File, error)

Create creates a context with specified file-contents

func (*TempFileCtx) Destroy

func (ctx *TempFileCtx) Destroy()

Destroy cleans up the context

Jump to

Keyboard shortcuts

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