rawapis

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package rawapis centralizes the management of Ondatra raw APIs.

This module provides "New" and "Fetch" functions for raw client APIs, which return new and a cached API clients, respectively. For every DUT gRPC API, this module provides both "New" and "Fetch" functions. For every StreamClient API, only a "New" function is provided, since those clients are intended to be created and closed on each individual use. For every ATE API, only "Fetch" functions are provided, since there is no use case for multiple clients.

Index

Constants

This section is empty.

Variables

View Source
var CommonDialOpts = []grpc.DialOption{
	grpc.WithBlock(),
	withUnaryAnnotateErrors(),
	withStreamAnnotateErrors(),
}

CommonDialOpts to include in all gRPC dial calls. TODO(greg-dennis): Unexport once IxNetwork is removed.

Functions

func FetchGNMI

func FetchGNMI(ctx context.Context, dut GNMIDialer) (gpb.GNMIClient, error)

FetchGNMI fetches the cached gNMI client for the specified DUT.

func FetchGNOI

func FetchGNOI(ctx context.Context, dut binding.DUT) (gnoigo.Clients, error)

FetchGNOI fetches the cached gNOI client for the specified DUT.

func FetchGNSI added in v0.2.1

func FetchGNSI(ctx context.Context, dut binding.DUT) (binding.GNSIClients, error)

FetchGNSI fetches the cached gNSI client for the specified DUT.

func FetchGRIBI

func FetchGRIBI(ctx context.Context, dut binding.DUT) (grpb.GRIBIClient, error)

FetchGRIBI fetches the cached gRIBI client for the specified DUT.

func FetchIxNetwork

func FetchIxNetwork(ctx context.Context, ate binding.ATE) (*binding.IxNetwork, error)

FetchIxNetwork returns the cached IxNetwork client for the specified ATE.

func FetchOTG

func FetchOTG(ctx context.Context, ate binding.ATE) (gosnappi.GosnappiApi, error)

FetchOTG fetches the cached OTG client for the specified ATE.

func FetchOTGGNMI

func FetchOTGGNMI(ctx context.Context, ate binding.ATE) (gpb.GNMIClient, error)

FetchOTGGNMI fetches the cached OTG GNMI client for the specified ATE.

func FetchP4RT

func FetchP4RT(ctx context.Context, dut binding.DUT) (p4pb.P4RuntimeClient, error)

FetchP4RT fetches the cached P4RT client for the specified DUT.

func NewCLI

func NewCLI(ctx context.Context, dut binding.DUT) (binding.CLIClient, error)

NewCLI creates a CLI client for the specified DUT.

func NewConsole

func NewConsole(ctx context.Context, dut binding.DUT) (binding.ConsoleClient, error)

NewConsole creates a console client for the specified DUT.

func NewGNMI

func NewGNMI(ctx context.Context, dialer GNMIDialer) (gpb.GNMIClient, error)

NewGNMI creates a new gNMI client for the specified DUT.

func NewGNOI

func NewGNOI(ctx context.Context, dut binding.DUT) (gnoigo.Clients, error)

NewGNOI creates a gNOI client for the specified DUT.

func NewGNSI added in v0.2.1

func NewGNSI(ctx context.Context, dut binding.DUT) (binding.GNSIClients, error)

NewGNSI creates a gNSI client for the specified DUT.

func NewGRIBI

func NewGRIBI(ctx context.Context, dut binding.DUT) (grpb.GRIBIClient, error)

NewGRIBI creates a new gRIBI client for the specified DUT.

func NewP4RT

func NewP4RT(ctx context.Context, dut binding.DUT) (p4pb.P4RuntimeClient, error)

NewP4RT creates a new P4RT client for the specified DUT.

Types

type GNMIDialer

type GNMIDialer interface {
	DialGNMI(context.Context, ...grpc.DialOption) (gpb.GNMIClient, error)
}

GNMIDialer is an interface for devices that can dial gNMI.

Jump to

Keyboard shortcuts

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