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

Addition of BFD sessions subtree under interface in openconfig-bfd.yang #1137

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
103 changes: 102 additions & 1 deletion release/models/bfd/openconfig-bfd.yang
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ module openconfig-bfd {
"An OpenConfig model of Bi-Directional Forwarding Detection (BFD)
configuration and operational state.";

oc-ext:openconfig-version "0.3.0";
oc-ext:openconfig-version "0.3.1";
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're adding a feature here, let's make this be a minor release - i.e., this should be 0.4.0.

Copy link
Member

Choose a reason for hiding this comment

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

@Pull-eckermann please update version to 0.4.0. Thanks!


revision "2024-06-26" {
description
"Add sessions subtree at interface level for configuration of
static BFD single-hop sessions.";
reference "0.3.1";
}

revision "2024-03-05" {
description
Expand Down Expand Up @@ -508,6 +515,99 @@ module openconfig-bfd {
uses bfd-session-microbfd-common;
}

grouping bfd-interface-session-config {
description
"Configuration parameters for a static BFD single-hop session on an interface.";

leaf local-address {
type oc-inet:ip-address;
description
"The local IP address used by the system for the single-hop BFD session
specified.";
}

leaf remote-address {
type oc-inet:ip-address;
description
"The remote IP destination that should be used by the system for
the single-hop BFD session specified.";
}

leaf admin-down {
Copy link
Contributor

Choose a reason for hiding this comment

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

We've generally used enabled as this leaf's name -- and have zero called admin-down, so let's go for some consistency here and use enabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was also raised some time ago whether or not this should have been corrected for those that veered but current stats look like:

$ find . -name "*.yang" | xargs grep -E "leaf enable(d?) {" | awk '{print $3}' | sort | uniq -c
     15 enable
     51 enabled

Copy link
Member

Choose a reason for hiding this comment

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

@Pull-eckermann please rename this leaf to enabled

type boolean;
description
"When this leaf is set to true then the single-hop BFD session
is administratively down.";
}

leaf demand-mode {
type boolean;
description
"When this leaf is set to true then the single-hop BFD session
is operating in demand-mode.";
}
}

grouping bfd-interface-session-state {
// placeholder
description
"Operational state parameters relating to the static BFD single-hop session
running on the interface.";
}

grouping bfd-interface-sessions-structural {
description
"Structural grouping for static BFD single-hop sessions configuration on interface
and state parameters.";

container sessions {
description
"Parameters relating to static BFD single-hop sessions associated with the interface.";

list session {
key "local-address remote-address";

description
"This list contains configuration and state parameters
relating to interface static BFD single-hop session.";
reference
"RFC5881 - Bidirectional Forwarding Detection
(BFD) for IPv4 and IPv6 (Single Hop).";

leaf local-address {
type leafref {
path "../config/local-address";
}
description
"A reference to the local-address for the BFD single-hop
session";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
session";
session.";

}
leaf remote-address {
type leafref {
path "../config/remote-address";
}
description
"A reference to the remote-address for the BFD single-hop
session";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
session";
session.";

}

container config {
description
"Configuration parameters for the static BFD single-hop session.";
uses bfd-interface-session-config;
}

container state {
config false;
description
"Operational state parameters for the static BFD single-hop session.";
uses bfd-interface-session-config;
uses bfd-interface-session-state;
}
}
}
}

grouping bfd-interface-microbfd-structural {
description
"Structural grouping for micro-bfd configuration and state
Expand Down Expand Up @@ -650,6 +750,7 @@ module openconfig-bfd {

uses oc-if:interface-ref;

uses bfd-interface-sessions-structural;
uses bfd-interface-microbfd-structural;
uses bfd-interface-peer-structural;
}
Expand Down
Loading