Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InlineXML ¶ added in v0.1.2
InlineXML iterates over a testsuite looking for inline file tag, on finding it will attempt to load and replace with inline xml
func StringInSlice ¶ added in v0.1.1
StringInSlice helper function to test if a slice contains a value
Types ¶
type Action ¶
type Action struct { Netconf *Netconf `json:"netconf,omitempty" yaml:"netconf,omitempty"` Sleep *Sleep `json:"sleep,omitempty" yaml:"sleep,omitempty"` }
Action is a wrapper for the different actions types (netconf, sleep)
type Block ¶
type Block struct { Type string `json:"type" yaml:"type"` Actions []Action `json:"actions" yaml:"actions"` }
Block describes a list of actions and how these should treated; as an init block, sequentially or concurrently
type Configs ¶
type Configs []Sshconfig
Configs rebinds the slice of Sshconfig so that methods can be constructed against it
func (Configs) IsReuseConnection ¶
IsReuseConnection iterates through the Config slice and matches on host returning whether the connection should be reused or not
type Filter ¶
type Filter struct { Type string `json:"type" yaml:"type"` Ns *string `json:"ns,omitempty" yaml:"ns,omitempty"` Select string `json:"select" yaml:"select"` }
Filter defines the parameters required to generate a subtree or xpath filter within a NETCONF Request
type Netconf ¶
type Netconf struct { Hostname string `json:"hostname" yaml:"hostname"` Message *string `json:"message,omitempty" yaml:"message,omitempty"` Method *string `json:"method,omitempty" yaml:"method,omitempty"` Operation *string `json:"operation,omitempty" yaml:"operation,omitempty"` Source *string `json:"source,omitempty" yaml:"source,omitempty"` Target *string `json:"target,omitempty" yaml:"target,omitempty"` Filter *Filter `json:"filter,omitempty" yaml:"filter,omitempty"` Config *string `json:"config,omitempty" yaml:"config,omitempty"` Expected *string `json:"expected,omitempty" yaml:"expected,omitempty"` }
Netconf struct contains information required to construct a valid NETCONF Operation. Addresses are used to indicate optional content
func (*Netconf) ToXMLString ¶
ToXMLString generates a XML representation of the information provided in the Netconf section of the TestSuite
type Sleep ¶
type Sleep struct {
Duration int `json:"duration" yaml:"duration"` // seconds
}
Sleep is an action instructing the client to sleep for the period defined in duration
type Sshconfig ¶
type Sshconfig struct { Hostname string `json:"hostname" yaml:"hostname"` Port int `json:"port" yaml:"port"` Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` Reuseconnection bool `json:"reuseconnection" yaml:"reuseconnection"` }
Sshconfig defines a definition for the parameters required to connect to a NETCONF Agent via SSH
type TestSuite ¶
type TestSuite struct { File string `json:"-" yaml:"-"` Iterations int `json:"iterations" yaml:"iterations"` Clients int `json:"clients" yaml:"clients"` Rampup int `json:"rampup" yaml:"rampup"` Configs Configs `json:"configs" yaml:"configs"` Blocks []Block `json:"blocks" yaml:"blocks"` }
TestSuite is the top level struct for the yaml document definition
func NewTestSuite ¶
NewTestSuite returns an TestSuite initialized from a yaml file
func (*TestSuite) GetInitBlock ¶
GetInitBlock returns an init block if defined in the TestSuite