public icon indicating copy to clipboard operation
public copied to clipboard

add last configuration timestamp leaf

Open RonanMacF opened this issue 3 years ago • 6 comments

Some users may have a desire to know if the configuration on the box has changed. Subscribing to the entire tree could work, however, all the state leafs would have to be filtered out. This proposes a new leaf last-configuration-timestamp which represents the timestamp at which the last configuration was made on the box. E.g. an OpenConfig Set request would update this time stamp or a CLI configuration change on the box would update this timestamp. However, counters data being updated in the YANG tree does not update this timestamp. This provides a mean by which a user can subscribe to the leaf to determine if configuration was made on the box.

pyang output

module: openconfig-system
  +--rw system
     +--rw config
     |  +--rw hostname?       oc-inet:domain-name
     |  +--rw domain-name?    oc-inet:domain-name
     |  +--rw login-banner?   string
     |  +--rw motd-banner?    string
     +--ro state
     |  +--ro hostname?                       oc-inet:domain-name
     |  +--ro domain-name?                    oc-inet:domain-name
     |  +--ro login-banner?                   string
     |  +--ro motd-banner?                    string
     |  +--ro current-datetime?               oc-yang:date-and-time
     |  +--ro boot-time?                      oc-types:timeticks64
     |  +--ro software-version?               string
     |  +--ro last-configuration-timestamp?   oc-types:timeticks64

References

Resolves #545

RonanMacF avatar Sep 28 '22 14:09 RonanMacF

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Sep 28 '22 14:09 google-cla[bot]

Compatibility Report for commit 42ea585db0992822c50333aa0cff872c9b1beee0: ⛔ yanglint@SO 1.10.17

OpenConfigBot avatar Sep 28 '22 14:09 OpenConfigBot

yamllint is failing on unrelated code, the system module has passed

RonanMacF avatar Sep 28 '22 15:09 RonanMacF

Suggestion to move this under global state instead of config. Also, can you provide public links for reference to some vendor documentation that indicate some support for showing the last configuration changed time

This leaf will be implemented Arista Networks. This will be used to determine any out of band switch configuration. At the moment none of these documents are public.

RonanMacF avatar Sep 29 '22 13:09 RonanMacF

It's true that this is a new openconfig leaf, but the underlying functionality of storing the last configuration change timestamp is widely supported. There are CLI commands which expose this data today. I will add a couple of references for us in the PR description. I do this because it helps set a standard for pull requests that's needed for quality and to speed reviews of pull requests.

dplore avatar Sep 29 '22 16:09 dplore

Scheduled for OC operator review on Oct 4, 2022

dplore avatar Sep 29 '22 23:09 dplore

sorry about that, trailing removed.

RonanMacF avatar Oct 20 '22 11:10 RonanMacF

This was reviewed in the OC operators meeting on Oct 4 and 18th and comments have been addressed in the PR. Thanks @RonanMacF for the contribution.

dplore avatar Oct 20 '22 15:10 dplore