Commit graph

491 commits

Author SHA1 Message Date
Y Bharath eff5a9023a yang: Corrected pyang errors in frr-pathd.yang
Corrected pyang warnings and errors in frr-pathd.yang

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-16 12:47:31 +05:30
Y Bharath 8c2e01e245 yang: Pyang errors in frr-bfdd.yang
Corrected pyang errors in frr-bfdd.yang

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-08 14:27:28 +05:30
Russ White 90b004cd46
Merge pull request #18543 from y-bharath14/srib-yang-v8
yang: Corrected pyang errors in frr-zebra.yang
2025-04-01 17:30:30 -04:00
Y Bharath 094072e948 yang: Corrected pyang errors in frr-zebra.yang
Corrected pyang warnings or errors in frr-zebra.yang

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-03-29 19:36:58 +05:30
Donald Sharp 749dc0c966 yang: Limit eigrp to just 1 instance per vrf
Currently EIGRP has built in yang code that expects only
1 ASN used per vrf.  Let's just limit the operator from
putting themselves in a bad position by allowing something like
this:

router eigrp 33
....
!
router eigrp 99
...
!

no router eigrp 99 would crash because of assumptions
made in the yang processing.

Let's just hard code that assumption into the EIGRP yang
at the moment such that it will not allow you to enter
a `router eigrp 99` instance at all.

This is purely a software limitation to prevent the code
from violating it's current assumptions.  I do not see
much need to support this at this point in time so I
fixed the problem this way instead of having to possibly
touch a bunch of code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-03-27 08:51:05 -04:00
Y Bharath 99b617954e yang: Fixed pyang errors at frr-isisd.yang
Fixed pyang errors at frr-isisd.yang

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-03-26 12:46:08 +05:30
Y Bharath 9689556728 yang: Code inline with RFC 8407 rules
Code inline with RFC 8407 rules

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-03-20 12:11:46 +05:30
Russ White 4b6e0ba1a1
Merge pull request #18349 from donaldsharp/more_yang_state
More yang state
2025-03-18 11:02:28 -04:00
Y Bharath d7839f5ddd yang: Fixed pyang errors at frr-bgp-common.yang
Fixed pyang errors at frr-bgp-common.yang

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-03-14 14:31:52 +05:30
Donald Sharp 9bf22f603e zebra: Add mpls-forwarding to yang state model
The mpls-forwarding state was missing from the model
add it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-03-07 22:24:42 -05:00
Christian Hopps e47a0557e5
Merge pull request #18293 from y-bharath14/srib-yang-v4
yang: Imported modules are not in use
2025-03-05 00:58:44 -05:00
Y Bharath 9d3c89520f yang: Imported modules are not in use
Imported modules are not in use

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-03-04 21:46:08 +05:30
Russ White 93c2dc28bc
Merge pull request #18306 from LabNConsulting/aceelindem/bfd-log-session-changes
bfdd: Add "log-session-changes" command to BFD configuration and operational state via YANG Northbound API.
2025-03-04 09:48:36 -05:00
Russ White 0b094a772c
Merge pull request #18253 from dksharp5/yang_zebra
Allow retrieval of v4/v6 forwarding state via NB
2025-03-04 09:25:24 -05:00
Acee Lindem 4b0aeb6b29 yang: Add "log-session-changes" to BFD common session parameters.
Signed-off-by: Acee Lindem <acee@lindem.com>
2025-03-03 20:57:48 +00:00
Donna Sharp 9a073f663f zebra: allow retrieval of ipv6 forwarding state
Allow the retrieval of ipv6 forwarding state from
within the yang framework as that it was missing.

Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2025-03-01 14:45:18 -05:00
Donna Sharp 453154497e zebra: allow retrieval of ip forwarding state
There was no ability to retrieve the ip-forwarding state
of zebra.  Add this to yang under the state container.

Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2025-03-01 14:39:07 -05:00
Philippe Guibert 7ab6817037 yang: enlarge community-limit count from [1-1024] to [0-1024]
It should be possible to configure the community-limit count to 0.

Fixes: f19b8668b3 ("bgpd: add 'match community-count' command to restrict comm count")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-02-27 22:25:52 +01:00
Philippe Guibert c3084cacf4 bgpd: add 'match extcommunity-count' command to restrict comm count
Add a mechanism in route-map to filter out route-map which have a list
of extended communities greater than the given number.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-02-27 22:25:52 +01:00
Donald Sharp f62ab436e6
Merge pull request #18237 from LabNConsulting/chopps/oper-walk-tree
support pre-built oper state in libyang tree
2025-02-26 11:19:11 -05:00
Christian Hopps bce25cf43b tests: add oper test using existing libyang state tree
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-02-26 13:38:42 +00:00
Carmine Scarpitta 99742410bf yang: Extend staticd YANG model to support the SRv6 uA behavior
The SRv6 uA behavior is associated with a L3 adjacency.

This commit extends the staticd YANG model by adding two leafs
`interface` and `next-hop` under the `static-sids` container. This
extension allows us to associate an interface and a nexthop when
configuring an SRv6 uA SID.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-26 07:19:51 +01:00
Donald Sharp 03ebdc3c4a zebra: Add operational retrieval of Multipath Number
The multipath number specified is not available through
the yang data and is not retrievable.  Make it so.
At this point in time do not allow this to be set from
yang.  Perhaps in the future.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-02-23 11:14:47 -05:00
Y Bharath a05799bd8b yang: Corrected Pyang errors or warnings
Corrected Pyang errors or warnings at frr-route-types.yang file

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-02-21 15:03:31 +05:30
David Lamparter b84493132c pimd: allow restricting neighbors per interface
Just filter incoming packets against a specified prefix-list.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-02-19 09:49:06 -03:00
Donald Sharp 23fc4ce666
Merge pull request #18111 from opensourcerouting/gmp-leave
pimd,pim6d: support IGMPv2/MLDv1 immediate leave
2025-02-19 07:21:00 -05:00
Christian Hopps e241882d8f
Merge pull request #18139 from y-bharath14/srib-yang-v2
yang: Default value for a key leaf to be ignored
2025-02-17 05:13:57 -05:00
David Lamparter df9517c95a pimd: add IGMPv2/MLDv1 immediate-leave
(Somewhat) useful when dealing with an interface that has only one host
attached.  Only works for IGMPv2 and MLDv1, other protocol versions have
no leave message.

Co-authored-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-02-13 12:45:47 -03:00
Jafar Al-Gharaibeh f70530c8e8
Merge pull request #18032 from opensourcerouting/gmp-limit
pimd,pim6d: implement GMP group / source limits
2025-02-13 09:32:07 -06:00
Y Bharath 4f7b45f28b yang: Default value for a key leaf to be ignored
In YANG, key leaves are used to uniquely identify list entries, and they
cannot have default values

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-02-13 17:10:46 +05:30
Y Bharath 3b9191fcc9 yang: Reorder the revision statements
According to the YANG specification, the revision statements should be
ordered with the most recent revision first

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-02-12 12:13:06 +05:30
David Lamparter f07d379b74 pimd: implement IGMP group/source count limit
For groups we can just look at the length of the list, for sources we
need to count them on a per-interface level.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-02-10 15:40:07 -03:00
Russ White 24fa9eede4
Merge pull request #16593 from baozhen-H3C/202408151540
isisd: 'tiebreaker' command line funtionality is inconsistent with its implementation
2025-02-04 11:39:29 -05:00
Russ White adeb30d8f3
Merge pull request #17336 from forrestchu/sbfd
implement SBFD
2025-02-04 06:36:43 -05:00
b29332 27413dd24a isisd: 'tiebreaker' command line funtionality is inconsistent with its implementation
The command fast-reroute lfa tiebreaker [downstream | lowest-backup-metric | node-protecting] index (1-255) [level-1 | level-2] will overwrite configurations with the same index but different types. This is because the index is set as the key in frr-isisd.yang. However, the lfa_tiebreaker_cmp function uses a tuple (index, type) as the key. Therefore, the yang file should be modified to stay in sync with the business logic.

Test Scenario:
On RouterA, first configure fast-reroute lfa tiebreaker downstream index 100 level-1, then configure fast-reroute lfa tiebreaker lowest-backup-metric index 100 level-1, and check the configuration:

!
router isis 10
 fast-reroute lfa tiebreaker lowest-backup-metric index 100 level-1
exit
!

Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
2025-02-04 11:33:02 +00:00
David Lamparter 3671ce36fd staticd: fix botched staticd YANG for dst-src
The staticd YANG conversion completely f*cked up dst-src routes.
Stupidly enough, the correct thing is much simpler as seen by the amount
of deletes in this commit.

This does, unfortunately, involve a rather annoying YANG edge case with
what should reasonably be an optional leaf as part of a list key, which
is not possible.  It uses `::/0` as unconditional filler instead, since
that is semantically correct.

The `test_yang_mgmt` topotest needed to be adjusted after this to add
`src-prefix='::/0'`.

Fixes: 88fa5104a0 ("staticd : Configuration northbound implementation")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-01-28 15:40:17 +01:00
wumu.zsl 10e8a2e101 bfdd: modify frr-bfdd.yang for sbfd echo and sbfd init
Signed-off-by: wumu.zsl <wumu.zsl@alibaba-inc.com>
2025-01-23 01:27:02 +00:00
Jafar Al-Gharaibeh b2d62e50f1
Merge pull request #17882 from LabNConsulting/chopps/doc-update-mgmtd
small mgmtd-dev doc update and yanglint cleanup
2025-01-20 13:29:37 -06:00
Christian Hopps 885c5c496c yang: lint cleanup of test module
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-18 18:18:04 +00:00
Yuqing Zhao f792a215cd yang: Add SRv6 to frr-staticd YANG model
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Donatas Abraitis 705e6f881b
Merge pull request #17836 from pguibert6WIND/limit_comm_list_count
limit community list count
2025-01-17 12:44:24 +02:00
Donald Sharp 953d5fd526
Merge pull request #17799 from LabNConsulting/chopps/backend-yang-model
mgmtd backend yang model (depends on #17796)
2025-01-15 10:22:11 -05:00
Christian Hopps 5f2a927d7b lib: northbound/mgmtd: add backend model support
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-14 18:48:59 +00:00
Philippe Guibert bd4b8c3dac topotest: add a test to control the community-list count
Add a test to control the community-list count.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-14 13:59:45 +01:00
Philippe Guibert f19b8668b3 bgpd: add 'match community-count' command to restrict comm count
Add a mechanism in route-map to filter out route-map which have a list
of communities greater than the given number.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-14 13:59:42 +01:00
Nathan Bahr 8b00575fbb pimd,yang: Expand rpf-lookup-mode command
Add options for group-list and source-list, both of which take a prefix list name.
The prefix list is used to determine the lookup mode for specific sources and/or groups.
Any number of lookup modes can be configured as long as the combination of group
and source list is unique.
A global lookup mode (empty group and source lists) is always added and defaults to mrib-then-urib
as it currently functions. The global lookup mode can be changed as it current exists with the command
`rpf-lookup-mode MODE`.
When determinig which mode to use, match source (and group if provided) against the lists, if they are set.
If a lookup does not specify a group, then only use lookup modes that do not have a group list defined.
A lookup by definition will have a source, so no special handling there.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2025-01-09 21:58:22 +00:00
Christian Hopps e729676cfe tests: add test for new northbound get function
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-07 07:01:46 -05:00
Rafael Zalamena 3bebb7be92
Merge pull request #17252 from nabahr/mcast-mode
Fix PIMD RPF lookup mode and nexthop tracking
2024-12-16 09:57:31 -03:00
Nathan Bahr 10e2df6530 pimd,yang: Reimplement RPF lookup vty in router pim
Add rpf-lookup-mode MODE vty command under router pim block.
Including NB piping and config write. Using the mode still pending.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-12-13 17:36:34 +00:00
Nathan Bahr bf8728dcf6 zebra,yang: Completely remove multicast mode from zebra
Multicast mode belongs in PIM, so removing it completely from zebra.
Modified `show (ip|ipv6) rpf ADDRESS` to always lookup from SAFI_MULTICAST.
This means this command is now specific to the multicast table and does
not necessarily reflect the PIM RPF lookup, but that should be implemented
in PIM instead.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-12-12 13:50:31 +00:00