binding

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package binding wraps knebind to allow running integration tests without the need to supply kne/ondatra flags for configuration files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(topoDir string) func() (binding.Binding, error)

Get returns the custom lemming binding. The topoDir is the relative path to a directory containing the Ondatra testbed and KNE topology pb.txt files.

Types

type LemmingBind

type LemmingBind struct {
	binding.Binding
	// contains filtered or unexported fields
}

LemmingBind wraps the Ondatra knebind and adds the ability to set the testbed and topology from inside the test. TODO: Add unit tests and upstream some of this to Ondatra.

func (*LemmingBind) Release

func (lb *LemmingBind) Release(ctx context.Context) error

Release runs knebind release then deletes the topology if it was created by this binding.

func (*LemmingBind) Reserve

func (lb *LemmingBind) Reserve(ctx context.Context, tb *proto.Testbed, runTime time.Duration, waitTime time.Duration, partial map[string]string) (*binding.Reservation, error)

Reserve deploys the topology if it doesn't exists, then runs knebind Reserve.

Jump to

Keyboard shortcuts

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