Skip to content
Open
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
25 changes: 16 additions & 9 deletions release/models/keychain/openconfig-keychain.yang
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ module openconfig-keychain {
which may be then referenced by other models such as routing protocol
management.";

oc-ext:openconfig-version "0.5.0";
oc-ext:openconfig-version "0.6.0";

revision "2024-05-30" {
revision "2026-05-18" {
description
"Update description of send-and-receive.";
reference "0.6.0";
}

revision "2024-05-30" {
description
"Update key-id to a union of hex-string-prefixed and uint64.";
reference "0.5.0";
Expand Down Expand Up @@ -106,14 +112,15 @@ revision "2024-05-30" {

leaf send-and-receive {
type boolean;
description
"When this is set to true (the default value), the specified
send lifetime is also used in the receive direction. When set
to false, the device should use the specified receive-lifetime
for the receive direction (asymmetric mode). If send-and-receive
is false, and the device does not support asymmetric configuration,
the config should be rejected as unsupported.";
default true;
description
"When this is set to true (the default value), the specified send-lifetime
is also used in the receive direction; configuration of a distinct
receive-lifetime is not valid in that case and the server should reject it
as an invalid configuration. When set to false, the device uses the
configured receive-lifetime for the receive direction (asymmetric mode).
If send-and-receive is false and the device does not support asymmetric
configuration, the server should reject the config as unsupported.";
Comment on lines +116 to +123

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The indentation of the description text is inconsistent; lines 118-123 have an extra leading space compared to line 117.

Additionally, while the updated description clarifies that configuring a distinct receive-lifetime is invalid when send-and-receive is true, this constraint should be enforced programmatically using a must statement. This ensures that the server correctly rejects invalid configurations as stated in the description and the PR objectives.

      description
        "When this is set to true (the default value), the specified send-lifetime
        is also used in the receive direction; configuration of a distinct
        receive-lifetime is not valid in that case and the server should reject it
        as an invalid configuration. When set to false, the device uses the
        configured receive-lifetime for the receive direction (asymmetric mode).
        If send-and-receive is false and the device does not support asymmetric
        configuration, the server should reject the config as unsupported.";
      must "not(.) or not(../../../receive-lifetime/config/start-time or ../../../receive-lifetime/config/end-time)" {
        error-message "Distinct receive-lifetime cannot be configured when send-and-receive is true";
      }

}
}

Expand Down
Loading