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 ¶
- Variables
- func FetchGNMI(ctx context.Context, dut GNMIDialer) (gpb.GNMIClient, error)
- func FetchGNOI(ctx context.Context, dut binding.DUT) (gnoigo.Clients, error)
- func FetchGNSI(ctx context.Context, dut binding.DUT) (binding.GNSIClients, error)
- func FetchGRIBI(ctx context.Context, dut binding.DUT) (grpb.GRIBIClient, error)
- func FetchIxNetwork(ctx context.Context, ate binding.ATE) (*binding.IxNetwork, error)
- func FetchOTG(ctx context.Context, ate binding.ATE) (gosnappi.GosnappiApi, error)
- func FetchOTGGNMI(ctx context.Context, ate binding.ATE) (gpb.GNMIClient, error)
- func FetchP4RT(ctx context.Context, dut binding.DUT) (p4pb.P4RuntimeClient, error)
- func NewCLI(ctx context.Context, dut binding.DUT) (binding.CLIClient, error)
- func NewConsole(ctx context.Context, dut binding.DUT) (binding.ConsoleClient, error)
- func NewGNMI(ctx context.Context, dialer GNMIDialer) (gpb.GNMIClient, error)
- func NewGNOI(ctx context.Context, dut binding.DUT) (gnoigo.Clients, error)
- func NewGNSI(ctx context.Context, dut binding.DUT) (binding.GNSIClients, error)
- func NewGRIBI(ctx context.Context, dut binding.DUT) (grpb.GRIBIClient, error)
- func NewP4RT(ctx context.Context, dut binding.DUT) (p4pb.P4RuntimeClient, error)
- type GNMIDialer
Constants ¶
This section is empty.
Variables ¶
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 FetchGRIBI ¶
FetchGRIBI fetches the cached gRIBI client for the specified DUT.
func FetchIxNetwork ¶
FetchIxNetwork returns the cached IxNetwork client for the specified ATE.
func FetchOTGGNMI ¶
FetchOTGGNMI fetches the cached OTG GNMI client for the specified ATE.
func NewConsole ¶
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.
Types ¶
type GNMIDialer ¶
type GNMIDialer interface {
DialGNMI(context.Context, ...grpc.DialOption) (gpb.GNMIClient, error)
}
GNMIDialer is an interface for devices that can dial gNMI.