@@ -89,3 +89,53 @@ message TimeRange {
8989 int64 start = 1 ; // Nanoseconds since the epoch
9090 int64 end = 2 ; // Nanoseconds since the epoch
9191}
92+ // Commit confirmed extension allows automated revert of the configuration after
93+ // certain duration if an explicit confirmation is not issued. It allows
94+ // explicit cancellation of the commit during the rollback window. There cannot
95+ // be more than one commit active at a given time. The document about gNMI
96+ // commit confirmed can be found at
97+ // https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-commit-confirmed.md
98+ message Commit {
99+ // ID is provided by the client during the commit request. During confirm and
100+ // cancel actions the provided ID should match the ID provided during commit.
101+ // If ID is not passed in any actions server shall return error.
102+ // Required.
103+ string id = 1 ;
104+ oneof action {
105+ // commit action creates a new commit. If a commit is on-going, server
106+ // returns error.
107+ CommitRequest commit = 2 ;
108+ // confirm action will confirm an on-going commit, the ID provided during
109+ // confirm should match the on-going commit ID.
110+ CommitConfirm confirm = 3 ;
111+ // cancel action will cancel an on-going commit, the ID provided during
112+ // cancel should match the on-going commit ID.
113+ CommitCancel cancel = 4 ;
114+ // set rollback duration action sets the rollback duration of an on-going commit
115+ // to a new value.
116+ // The ID provided with the Commit message should match the on-going commit ID.
117+ CommitSetRollbackDuration set_rollback_duration = 5 ;
118+ }
119+ }
120+
121+ // CommitRequest is used to create a new confirmed commit. It hold additional
122+ // parameter requried for commit action.
123+ message CommitRequest {
124+ // Maximum duration to wait for a confirmaton before reverting the commit.
125+ google.protobuf.Duration rollback_duration = 1 ;
126+ }
127+
128+ // CommitConfirm is used to confirm an on-going commit. It hold additional
129+ // parameter requried for confirm action.
130+ message CommitConfirm {}
131+
132+ // CommitCancel is used to cancel an on-going commit. It hold additional
133+ // parameter requried for cancel action.
134+ message CommitCancel {}
135+
136+ // CommitSetRollbackDuration is used to set the existing rollback duration value
137+ // of an on-going commit to a new desired value.
138+ message CommitSetRollbackDuration {
139+ // Maximum duration to wait for a confirmaton before reverting the commit.
140+ google.protobuf.Duration rollback_duration = 1 ;
141+ }
0 commit comments