Documentation ¶
Index ¶
- Constants
- Variables
- func FilterIPListByIPVersion(ipList []string, aIPVersion IPVersion) []string
- func PodIPsToStringList(ips []corev1.PodIP) (ipList []string)
- func PrintNetTestContextMap(netsUnderTest map[string]NetTestContext) string
- func TestReservedPortsUsage(env *provider.TestEnvironment, reservedPorts map[int32]bool, ...) (compliantObjects, nonCompliantObjects []*testhelper.ReportObject)
- type ContainerIP
- type IFType
- type IPVersion
- type NetTestContext
Constants ¶
const ( IPv4String = "IPv4" IPv6String = "IPv6" IPv4v6String = "IPv4v6" UndefinedString = "undefined" MULTUS IFType = "Multus" DEFAULT IFType = "Default" )
Variables ¶
Functions ¶
func FilterIPListByIPVersion ¶
FilterIPListByIPVersion filters a list of ip strings by the provided version e.g. a list of mixed ipv4 and ipv6 when filtered with ipv6 version will return a list with the ipv6 addresses
func PodIPsToStringList ¶
PodIPsToStringList converts a list of corev1.PodIP objects into a list of strings
func PrintNetTestContextMap ¶
func PrintNetTestContextMap(netsUnderTest map[string]NetTestContext) string
PrintNetTestContextMap displays the NetTestContext full map
func TestReservedPortsUsage ¶
func TestReservedPortsUsage(env *provider.TestEnvironment, reservedPorts map[int32]bool, portsOrigin string, logger *log.Logger) (compliantObjects, nonCompliantObjects []*testhelper.ReportObject)
Types ¶
type ContainerIP ¶
type ContainerIP struct { // ip address of the target container IP string // targetContainerIdentifier container identifier including namespace, pod name, container name, node name, and container UID ContainerIdentifier *provider.Container // interfaceName is the interface we want to target for the ping test InterfaceName string }
containerIP holds a container identification and its IP for networking tests.
func (*ContainerIP) String ¶
func (cip *ContainerIP) String() string
String Displays the ContainerIP data structure
type IPVersion ¶
type IPVersion int
func GetIPVersion ¶
GetIPVersion parses a ip address from a string and returns its version
type NetTestContext ¶
type NetTestContext struct { // testerContainerNodeOc session context to access the node running the container selected to initiate tests TesterContainerNodeName string // testerSource is the container select to initiate the ping tests on this given network TesterSource ContainerIP // ipDestTargets List of containers to be pinged by the testerSource on this given network DestTargets []ContainerIP }
netTestContext this is a data structure describing a network test context for a given subnet (e.g. network attachment) The test context defines a tester or test initiator, that is initiating the pings. It is selected randomly (first container in the list) It also defines a list of destination ping targets corresponding to the other containers IPs on this subnet
func (*NetTestContext) String ¶
func (testContext *NetTestContext) String() string
String displays the NetTestContext data structure