Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add gnmirpc to oc paths #3463

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions proto/ocpaths.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ message OCPath {
// A set of opaque tags that are used for this path. These tags can be used
// to group paths according to use-case specific criteria.
repeated string tags = 4;

// GNMIRpc describes expected (or supported) behavior for a particular
// Openconfig path.
GNMIRpc gnmi_rpc = 5;
}

// OCPathConstraint enumerates platform_types that are required to be supported
Expand All @@ -76,3 +80,39 @@ message OCPathConstraint {
string platform_type = 1;
}
}

// GNMIRpc describes expected (or supported) behavior for a particular
// Openconfig path.
message GNMIRpc {
bool get = 1;
dplore marked this conversation as resolved.
Show resolved Hide resolved
bool set = 2;
bool subscribe = 3;

// SubscribeMode, describes how updates are triggered for the request.
enum SubscribeMode {
UNSPECIFIED_SUBSCRIBE_MODE = 0;
NO_READ_SUPPORT = 1; // No requirement / support for path.
STREAM = 2; // Values streamed by the target (Sec. 3.5.1.5.2).
ONCE = 3; // Values sent once-off by the target (Sec. 3.5.1.5.1).
POLL = 4; // Values sent in response to a poll request (Sec. 3.5.1.5.3).
}
repeated SubscribeMode sub_mode = 4;

// StreamMode is the mode of a streamed subscription, specifying how the
// target must return values for that subscription.
// Reference: gNMI Specification Section 3.5.1.3
enum StreamMode {
UNSPECIFIED_STREAM_MODE = 0;
NO_STREAMING_SUPPORT = 1; // No requirement / support for streaming path.
TARGET_DEFINED = 2; // The target selects for each element.
ON_CHANGE = 3; // The target sends an update on element value change.
SAMPLE = 4; // The target samples values according to the interval.
}
repeated StreamMode stream_mode = 5;

// If listed as part of a requirement, sample_interval_nanoseconds is the
// maximum allowable interval between updates.
// If listed as part of the description of level of support, it should be the
// smallest, recommended value.
uint64 sample_interval_nanoseconds = 6;
}
Loading