Documentation ¶
Overview ¶
Package common defines operations that are used within the gNMITest framework for multiple tests.
Index ¶
- func Connect(ctx context.Context, a *tpb.Connection) (gpb.GNMIClient, func(), error)
- func ContextWithAuth(ctx context.Context, creds *resolver.Credentials) context.Context
- func ListenerTCPPort(n net.Listener) (uint64, error)
- func ResolveCredentials(ctx context.Context, c *tpb.Connection) (*resolver.Credentials, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(ctx context.Context, a *tpb.Connection) (gpb.GNMIClient, func(), error)
Connect opens a new gRPC connection to the target speciifed by the ConnectionArgs. It returns the gNMI Client connection, and a function which can be called to close the connection. If an error is encountered during opening the connection, it is returned.
func ContextWithAuth ¶
ContextWithAuth adds authentication details from the supplied credentials to ctx.
func ListenerTCPPort ¶
ListenerTCPPort returns the TCP port that is associated with the listener provided.
func ResolveCredentials ¶
func ResolveCredentials(ctx context.Context, c *tpb.Connection) (*resolver.Credentials, error)
ResolveCredentials takes an input Connection protobuf message and resolves the credentials within it using the resolver library.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package report contains common helpers to process report proto messages.
|
Package report contains common helpers to process report proto messages. |
Package testerror contains List type that implements error interface.
|
Package testerror contains List type that implements error interface. |