components

package
v0.0.0-...-1d3aa0f Latest Latest
Warning

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

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

Documentation

Overview

Package components provides functions to enumerate components from the device.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindActiveComponentsByType

func FindActiveComponentsByType(t *testing.T, dut *ondatra.DUTDevice, cType oc.E_PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT) []string

FindActiveComponentsByType finds the list of active components based on hardware type.

func FindComponentsByType

func FindComponentsByType(t *testing.T, dut *ondatra.DUTDevice, cType oc.E_PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT) []string

FindComponentsByType finds the list of components based on hardware type.

func FindMatchingStrings

func FindMatchingStrings(components []string, r *regexp.Regexp) []string

FindMatchingStrings filters out the components list based on regex pattern.

func FindSWComponentsByType

func FindSWComponentsByType(t *testing.T, dut *ondatra.DUTDevice, cType oc.E_PlatformTypes_OPENCONFIG_SOFTWARE_COMPONENT) []string

FindSWComponentsByType finds the list of SW components based on a type.

func FindStandbyControllerCard

func FindStandbyControllerCard(t *testing.T, dut *ondatra.DUTDevice, supervisors []string) (string, string)

FindStandbyControllerCard gets a list of two components and finds out the active and standby controller_cards.

func GetSubcomponentPath

func GetSubcomponentPath(name string, useNameOnly bool) *tpb.Path

GetSubcomponentPath creates a gNMI path based on the component name. If useNameOnly is true, returns a path to the specified name instead of a full subcomponent path.

func OpticalChannelComponentFromPort

func OpticalChannelComponentFromPort(t *testing.T, dut *ondatra.DUTDevice, p *ondatra.Port) string

OpticalChannelComponentFromPort finds the optical channel component for a port.

Types

type Y

type Y struct {
	*ygnmi.Client
}

Y provides the ygnmi based components helper. A ygnmi.Client is tied to a specific DUT.

func New

func New(t testing.TB, dut *ondatra.DUTDevice) Y

New creates a new ygnmi based helper from a *ondatra.DUTDevice.

func (Y) FindByType

func (y Y) FindByType(ctx context.Context, want oc.Component_Type_Union) ([]string, error)

FindByType finds the list of components based on component type.

Jump to

Keyboard shortcuts

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