Documentation
¶
Index ¶
- Variables
- func CheckDeviceValue(t *testing.T, deviceGnmiClient client.Impl, ...)
- func CheckGNMIValue(t *testing.T, gnmiClient client.Impl, paths []protoutils.DevicePath, ...)
- func CheckGNMIValues(t *testing.T, gnmiClient client.Impl, paths []protoutils.DevicePath, ...)
- func GetDeviceGNMIClientOrFail(t *testing.T, simulator env.SimulatorEnv) client.Impl
- func GetDevicePath(device string, path string) []protoutils.DevicePath
- func GetDevicePathWithValue(device string, path string, value string, valueType string) []protoutils.DevicePath
- func GetDevicePaths(devices []string, paths []string) []protoutils.DevicePath
- func GetDevicePathsWithValues(devices []string, paths []string, values []string) []protoutils.DevicePath
- func GetGNMIClientOrFail(t *testing.T) client.Impl
- func GetGNMIValue(ctx context.Context, c client.Impl, paths []protoutils.DevicePath) ([]protoutils.DevicePath, []*gnmi_ext.Extension, error)
- func GetSimulatorExtensions() []*gnmi_ext.Extension
- func MakeContext() context.Context
- func MakeProtoPath(target string, path string) string
- func SetGNMIValue(ctx context.Context, c client.Impl, updatePaths []protoutils.DevicePath, ...) (string, []*gnmi_ext.Extension, error)
- func SetGNMIValueOrFail(t *testing.T, gnmiClient client.Impl, updatePaths []protoutils.DevicePath, ...) network.ID
- func WaitForDevice(t *testing.T, predicate func(*device.Device) bool, timeout time.Duration) bool
- func WaitForDeviceAvailable(t *testing.T, deviceID device.ID, timeout time.Duration) bool
- func WaitForDeviceUnavailable(t *testing.T, deviceID device.ID, timeout time.Duration) bool
- func WaitForNetworkChangeComplete(t *testing.T, networkChangeID network.ID, wait time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
var NoExtensions = make([]*gnmi_ext.Extension, 0)
NoExtensions can be used on a request that does not need extension values
var NoPaths = make([]protoutils.DevicePath, 0)
NoPaths can be used on a request that does not need path values
Functions ¶
func CheckDeviceValue ¶
func CheckDeviceValue(t *testing.T, deviceGnmiClient client.Impl, devicePaths []protoutils.DevicePath, expectedValue string)
CheckDeviceValue makes sure a value has been assigned properly to a device path by querying GNMI
func CheckGNMIValue ¶
func CheckGNMIValue(t *testing.T, gnmiClient client.Impl, paths []protoutils.DevicePath, expectedValue string, expectedExtensions int, failMessage string)
CheckGNMIValue makes sure a value has been assigned properly by querying the onos-config northbound API
func CheckGNMIValues ¶
func CheckGNMIValues(t *testing.T, gnmiClient client.Impl, paths []protoutils.DevicePath, expectedValues []string, expectedExtensions int, failMessage string)
CheckGNMIValues makes sure a list of values has been assigned properly by querying the onos-config northbound API
func GetDeviceGNMIClientOrFail ¶
GetDeviceGNMIClientOrFail creates a GNMI client to a device. If there is an error, the test is failed
func GetDevicePath ¶
func GetDevicePath(device string, path string) []protoutils.DevicePath
GetDevicePath creates a device path
func GetDevicePathWithValue ¶
func GetDevicePathWithValue(device string, path string, value string, valueType string) []protoutils.DevicePath
GetDevicePathWithValue creates a device path with a value to set
func GetDevicePaths ¶
func GetDevicePaths(devices []string, paths []string) []protoutils.DevicePath
GetDevicePaths creates multiple device paths
func GetDevicePathsWithValues ¶
func GetDevicePathsWithValues(devices []string, paths []string, values []string) []protoutils.DevicePath
GetDevicePathsWithValues creates multiple device paths with values to set
func GetGNMIClientOrFail ¶
GetGNMIClientOrFail makes a GNMI client to use for requests. If creating the client fails, the test is failed.
func GetGNMIValue ¶
func GetGNMIValue(ctx context.Context, c client.Impl, paths []protoutils.DevicePath) ([]protoutils.DevicePath, []*gnmi_ext.Extension, error)
GetGNMIValue generates a GET request on the given client for a Path on a device
func GetSimulatorExtensions ¶
GetSimulatorExtensions creates the default set of extensions for a simulated device
func MakeContext ¶
MakeContext returns a new context for use in GNMI requests
func MakeProtoPath ¶
MakeProtoPath returns a Path: element for a given target and Path
func SetGNMIValue ¶
func SetGNMIValue(ctx context.Context, c client.Impl, updatePaths []protoutils.DevicePath, deletePaths []protoutils.DevicePath, extensions []*gnmi_ext.Extension) (string, []*gnmi_ext.Extension, error)
SetGNMIValue generates a SET request on the given client for update and delete paths on a device
func SetGNMIValueOrFail ¶
func SetGNMIValueOrFail(t *testing.T, gnmiClient client.Impl, updatePaths []protoutils.DevicePath, deletePaths []protoutils.DevicePath, extensions []*gnmi_ext.Extension) network.ID
SetGNMIValueOrFail does a GNMI set operation to the given client, and fails the test if there is an error
func WaitForDevice ¶
WaitForDevice waits for a device to match the given predicate
func WaitForDeviceAvailable ¶
WaitForDeviceAvailable waits for a device to become available
func WaitForDeviceUnavailable ¶
WaitForDeviceUnavailable waits for a device to become available
Types ¶
This section is empty.