cmd

package
v0.0.0-...-3439013 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSrIovPf

func GetSrIovPf(vfInterfaceName, namespace, nodeName string) (string, error)

GetSrIovPf returns SR-IOV PF name for given SR-IOV VF.

func ICMPConnectivityCheck

func ICMPConnectivityCheck(clientPod *pod.Builder, destIPAddresses []string, ifName ...string) error

ICMPConnectivityCheck checks ping against provided IPs from the client pod.

func RunCommandOnHostNetworkPod

func RunCommandOnHostNetworkPod(nodeName, namespace, command string) (string, error)

RunCommandOnHostNetworkPod creates hostNetwork pod and executes given command on it. The Pod will be removed at the end.

func RxTrafficOnClientPod

func RxTrafficOnClientPod(clientPod *pod.Builder, clientRxCmd string) error

RxTrafficOnClientPod verifies the incoming packets on the dpdk client pod from the dpdk server.

Types

type InterfaceStatus

type InterfaceStatus struct {
	InterfaceInformation []struct {
		PhysicalInterface []struct {
			Name []struct {
				Data string `json:"data"`
			} `json:"name"`
			AdminStatus []struct {
				Data       string `json:"data"`
				Attributes struct {
					JunosFormat string `json:"junos:format"`
				} `json:"attributes"`
			} `json:"admin-status"`
			OperStatus []struct {
				Data string `json:"data"`
			} `json:"oper-status"`
			MTU []struct {
				Data string `json:"data"`
			} `json:"mtu"`
			Speed []struct {
				Data string `json:"data"`
			} `json:"speed"`
		} `json:"physical-interface"`
	} `json:"interface-information"`
}

InterfaceStatus is struct that collects the data from the Juniper interfaces.

type Junos

type Junos struct {
	Session *netconf.Session
}

Junos creates a struct to retrieve output from the lab Juniper switch.

func NewSession

func NewSession(host, user, password string) (*Junos, error)

NewSession establishes a new connection to a Junos device that we will use to run our commands against.

func (*Junos) ApplyConfigInterface

func (j *Junos) ApplyConfigInterface(config string) error

ApplyConfigInterface applies given interface configuration to a switch.

func (*Junos) Close

func (j *Junos) Close()

Close disconnects the session to the device.

func (*Junos) Commit

func (j *Junos) Commit() error

Commit commits the configuration.

func (*Junos) Config

func (j *Junos) Config(commands []string) error

Config sends commands to a Juniper switch.

func (*Junos) GetInterfaceConfig

func (j *Junos) GetInterfaceConfig(switchInterface string) (string, error)

GetInterfaceConfig returns configuration for given interface.

func (*Junos) RunCommand

func (j *Junos) RunCommand(cmd string) (string, error)

RunCommand executes any operational mode command, such as "show" or "request".

Jump to

Keyboard shortcuts

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