Skip to content

Commit 18f6f62

Browse files
committed
isis: enable "poi-tlv" feature from the IS-IS YANG module
The "poi-tlv" feature enables the "poi-tlv" configuration leaf, which is equivalent to the "purge-originator" leaf we added in our IS-IS augmentation module. Enable this feature and remove our augmentation, since we want to comply with the IETF module as much as possible. Signed-off-by: Renato Westphal <[email protected]>
1 parent 92eae0b commit 18f6f62

File tree

6 files changed

+14
-20
lines changed

6 files changed

+14
-20
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Holo supports the following Internet Standards:
243243
| ietf-ipv4-unicast-routing@2018-03-13 | 100.00% | 100.00% | - | - | [100.00%](https://holo-routing.github.io/ietf-yang-coverage/[email protected]) |
244244
| ietf-ipv6-unicast-routing@2018-03-13 | 40.62% | 100.00% | - | - | [45.71%](https://holo-routing.github.io/ietf-yang-coverage/[email protected]) |
245245
| ietf-isis-sr-mpls@2025-05-06 | 15.38% | 57.27% | - | - | [52.85%](https://holo-routing.github.io/ietf-yang-coverage/[email protected]) |
246-
| ietf-isis@2022-10-19 | 95.52% | 70.16% | 100.00% | 100.00% | [81.07%](https://holo-routing.github.io/ietf-yang-coverage/[email protected]) |
246+
| ietf-isis@2022-10-19 | 95.56% | 70.16% | 100.00% | 100.00% | [81.10%](https://holo-routing.github.io/ietf-yang-coverage/[email protected]) |
247247
| ietf-key-chain@2017-06-15 | 100.00% | 100.00% | - | - | [100.00%](https://holo-routing.github.io/ietf-yang-coverage/[email protected]) |
248248
| ietf-mpls-ldp@2022-03-14 | 86.96% | 92.31% | 100.00% | 100.00% | [92.38%](https://holo-routing.github.io/ietf-yang-coverage/[email protected]) |
249249
| ietf-mpls@2020-12-18 | 0.00% | 57.14% | - | - | [35.29%](https://holo-routing.github.io/ietf-yang-coverage/[email protected]) |

holo-isis/src/northbound/configuration.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ pub struct InstanceCfg {
102102
pub lsp_mtu: u16,
103103
pub lsp_lifetime: u16,
104104
pub lsp_refresh: u16,
105+
pub purge_originator: bool,
105106
pub metric_type: LevelsCfg<MetricType>,
106107
pub default_metric: LevelsCfg<u32>,
107108
pub auth: LevelsOptCfg<AuthCfg>,
@@ -118,7 +119,6 @@ pub struct InstanceCfg {
118119
pub overload_status: bool,
119120
pub mt: HashMap<MtId, InstanceMtCfg>,
120121
pub summaries: JointPrefixMap<IpNetwork, SummaryCfg>,
121-
pub purge_originator: bool,
122122
pub att_suppress: bool,
123123
pub att_ignore: bool,
124124
pub sr: InstanceSrCfg,
@@ -364,6 +364,11 @@ fn load_callbacks() -> Callbacks<Instance> {
364364
let event_queue = args.event_queue;
365365
event_queue.insert(Event::RefreshLsps);
366366
})
367+
.path(isis::poi_tlv::PATH)
368+
.modify_apply(|instance, args| {
369+
let enabled = args.dnode.get_bool();
370+
instance.config.purge_originator = enabled;
371+
})
367372
.path(isis::metric_type::value::PATH)
368373
.modify_apply(|instance, args| {
369374
let metric_type = args.dnode.get_string();
@@ -853,11 +858,6 @@ fn load_callbacks() -> Callbacks<Instance> {
853858

854859
mt_cfg.default_metric.l2 = None;
855860
})
856-
.path(isis::purge_originator::PATH)
857-
.modify_apply(|instance, args| {
858-
let enabled = args.dnode.get_bool();
859-
instance.config.purge_originator = enabled;
860-
})
861861
.path(isis::attached_bit::suppress_advertisement::PATH)
862862
.modify_apply(|instance, args| {
863863
let enabled = args.dnode.get_bool();
@@ -2445,6 +2445,7 @@ impl Default for InstanceCfg {
24452445
let lsp_mtu = isis::lsp_mtu::DFLT;
24462446
let lsp_lifetime = isis::lsp_lifetime::DFLT;
24472447
let lsp_refresh = isis::lsp_refresh::DFLT;
2448+
let purge_originator = isis::poi_tlv::DFLT;
24482449
let metric_type = isis::metric_type::value::DFLT;
24492450
let metric_type = LevelsCfg {
24502451
all: MetricType::try_from_yang(metric_type).unwrap(),
@@ -2468,7 +2469,6 @@ impl Default for InstanceCfg {
24682469
let spf_time_to_learn =
24692470
isis::spf_control::ietf_spf_delay::time_to_learn::DFLT;
24702471
let overload_status = isis::overload::status::DFLT;
2471-
let purge_originator = isis::purge_originator::DFLT;
24722472
let att_suppress = isis::attached_bit::suppress_advertisement::DFLT;
24732473
let att_ignore = isis::attached_bit::ignore_reception::DFLT;
24742474

@@ -2480,6 +2480,7 @@ impl Default for InstanceCfg {
24802480
lsp_mtu,
24812481
lsp_lifetime,
24822482
lsp_refresh,
2483+
purge_originator,
24832484
metric_type,
24842485
default_metric,
24852486
auth: Default::default(),
@@ -2496,7 +2497,6 @@ impl Default for InstanceCfg {
24962497
overload_status,
24972498
mt: Default::default(),
24982499
summaries: Default::default(),
2499-
purge_originator,
25002500
att_suppress,
25012501
att_ignore,
25022502
sr: Default::default(),

holo-isis/tests/conformance/pdu-lsp-purge-originator1/01-input-northbound-config-change.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"type": "ietf-isis:isis",
1010
"name": "test",
1111
"ietf-isis:isis": {
12-
"holo-isis:purge-originator": true,
13-
"@holo-isis:purge-originator": {
12+
"ietf-isis:poi-tlv": true,
13+
"@ietf-isis:poi-tlv": {
1414
"yang:operation": "replace",
1515
"yang:orig-default": true,
1616
"yang:orig-value": "false"

holo-isis/tests/conformance/pdu-lsp-purge-originator2/01-input-northbound-config-change.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"type": "ietf-isis:isis",
1010
"name": "test",
1111
"ietf-isis:isis": {
12-
"holo-isis:purge-originator": true,
13-
"@holo-isis:purge-originator": {
12+
"ietf-isis:poi-tlv": true,
13+
"@ietf-isis:poi-tlv": {
1414
"yang:operation": "replace",
1515
"yang:orig-default": true,
1616
"yang:orig-value": "false"

holo-yang/modules/augmentations/holo-isis.yang

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,6 @@ module holo-isis {
9595
+ "rt:control-plane-protocol/isis:isis" {
9696
description
9797
"IS-IS instance augmentations";
98-
leaf purge-originator {
99-
type boolean;
100-
default false;
101-
description
102-
"Enable support for purge originator identification as specified
103-
in RFC 6232.";
104-
}
10598
container attached-bit {
10699
description "Configuration related to the ATT bit.";
107100

holo-yang/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ pub static YANG_FEATURES: Lazy<HashMap<&'static str, Vec<&'static str>>> =
281281
"multi-topology",
282282
"node-flag",
283283
"nlpid-control",
284+
"poi-tlv",
284285
"te-rid",
285286
],
286287
"ietf-ospf" => vec![

0 commit comments

Comments
 (0)