Skip to content

Commit

Permalink
add gnmirpc to oc paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ElodinLaarz authored Sep 26, 2024
1 parent 0257e85 commit 48702fd
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 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,37 @@ message OCPathConstraint {
string platform_type = 1;
}
}

// GNMIRpc describes expected (or supported) behavior for a particular
// Openconfig path.
message GNMIRpc {
bool get = 1;
bool set = 2;
bool subscribe = 3;

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

// SubscriptionMode 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 SubscriptionMode {
NO_STREAMING_SUPPORT = 0; // No requirement / support for streaming path.
TARGET_DEFINED = 1; // The target selects for each element.
ON_CHANGE = 2; // The target sends an update on element value change.
SAMPLE = 3; // The target samples values according to the interval.
}
repeated SubscriptionMode sub_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;
}

0 comments on commit 48702fd

Please sign in to comment.