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

yang: fix wrong check for isis metric style #16188

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

anlancs
Copy link
Contributor

@anlancs anlancs commented Jun 8, 2024

Before:

anlan(config)# route isis ix
anlan(config-router)# metric-style transition
...
anlan(config-if)# isis metric 200
% Configuration failed.

Error type: validation
Error description: YANG error(s):
 Path: Data location "/frr-interface:lib/interface[name='x']/frr-isisd:isis/metric/level-1".
 Error: Must condition ". < 64 or /frr-isisd:isis/instance[area-tag = current()/../../area-tag]/metric-style = 'wide' or not(/frr-isisd:isis/instance[area-tag = current()/../../area-tag]/metric-style)" not satisfied.
 Path: Data location "/frr-interface:lib/interface[name='x']/frr-isisd:isis/metric/level-2".
 Error: Must condition ". < 64 or /frr-isisd:isis/instance[area-tag = current()/../../area-tag]/metric-style = 'wide' or not(/frr-isisd:isis/instance[area-tag = current()/../../area-tag]/metric-style)" not satisfied

After:

anlan(config)# route isis ix
anlan(config-router)# metric-style transition
...
anlan(config-if)# isis metric 200
anlan(config-if)#

@mwinter-osr
Copy link
Member

CI:rerun

Before:
```
anlan(config)# route isis ix
anlan(config-router)# metric-style transition
...
anlan(config-if)# isis metric 200
% Configuration failed.

Error type: validation
Error description: YANG error(s):
 Path: Data location "/frr-interface:lib/interface[name='x']/frr-isisd:isis/metric/level-1".
 Error: Must condition ". < 64 or /frr-isisd:isis/instance[area-tag = current()/../../area-tag]/metric-style = 'wide' or not(/frr-isisd:isis/instance[area-tag = current()/../../area-tag]/metric-style)" not satisfied.
 Path: Data location "/frr-interface:lib/interface[name='x']/frr-isisd:isis/metric/level-2".
 Error: Must condition ". < 64 or /frr-isisd:isis/instance[area-tag = current()/../../area-tag]/metric-style = 'wide' or not(/frr-isisd:isis/instance[area-tag = current()/../../area-tag]/metric-style)" not satisfied
```

After:
```
anlan(config)# route isis ix
anlan(config-router)# metric-style transition
...
anlan(config-if)# isis metric 200
anlan(config-if)#
```

Signed-off-by: anlan_cs <[email protected]>
@anlancs anlancs force-pushed the isisd/fix-metric-style branch from 7dd2dbe to ad1244f Compare June 11, 2024 11:31
Copy link
Member

@odd22 odd22 left a comment

Choose a reason for hiding this comment

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

Seems good for me

@odd22
Copy link
Member

odd22 commented Jun 11, 2024

Do you check that the yang model behave correctly in all situation? I mean < 64 if metric is not specified or equal to narrow, and greater or lower than 64 for wide or transition?

@anlancs
Copy link
Contributor Author

anlancs commented Jun 12, 2024

Yes, i have tested/passed all related cases locally. @odd22

Copy link
Member

@odd22 odd22 left a comment

Choose a reason for hiding this comment

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

LGTM

@odd22 odd22 merged commit 7b59adc into FRRouting:master Jun 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants