summaryrefslogtreecommitdiffstats
path: root/yang (follow)
Commit message (Collapse)AuthorAgeFilesLines
* isisd: Add IS-IS-TE support per AreaOlivier Dugeon2019-04-251-8/+8
| | | | | | | | | | | | | Solve issue #4032 - Change MPLS-TE from global to per Area - Add new mpls_te_area structure to area in replacement of global variable isisMPLS_TE - Move mpls-te from global to instance in frr-isisd.yang - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c, isis_lsp.c and isis_zebra.c accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* Revert "isisd: Add IS-IS-TE support per Area"Russ White2019-04-231-8/+8
|
* Merge pull request #4137 from Orange-OpenSource/TERuss White2019-04-231-8/+8
|\ | | | | isisd: Add IS-IS-TE support per Area
| * Issue #4032: Add IS-IS-TE support per AreaOlivier Dugeon2019-04-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | - Change MPLS-TE from global to per Area - Add new mpls_te_area structure to area in replacement of global variable isisMPLS_TE - Move mpls-te frmo global to instance in frr-isisd.yang - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c, isis_lsp.c and isis_zebra.c accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | isisd: allow redistribute statements with both the route-map and metric optionsDmitrii Turlupov2019-04-161-16/+14
| | | | | | | | | | | | Fixes #4012. Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
* | yang: priority of isis commands in interface configurationDmitrii Turlupov2019-04-161-7/+7
|/ | | | | | | | | | Move down the "circuit-type" leaf in the isisd YANG module so that "ip[v6] router isis" will be the first commands displayed in the running configuration. Fixes #4028. Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
* Merge remote-tracking branch 'frr/master' into rip-vrfRenato Westphal2019-03-291-1/+6
|\ | | | | | | | | | | | | Merge commit to solve a bunch of conflicts with other PRs that were merged in the previous weeks. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * build: fix a whole bunch of *FLAGSDavid Lamparter2019-01-301-1/+1
| | | | | | | | | | | | | | | | | | - some target_CFLAGS that needed to include AM_CFLAGS didn't do so - libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all - consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@ - 2 dependencies were missing for clippy Signed-off-by: David Lamparter <equinox@diac24.net>
| * build, lib/yang: bake in extensions if possibleDavid Lamparter2019-01-241-0/+5
| | | | | | | | | | | | | | | | | | | | Starting with libyang 0.16.74, we can load internally embedded yang extensions instead of going through the file system/dlopen. Detect support for this at build time and use if available. NB: the fallback mechanism will go away in a short while. Signed-off-by: David Lamparter <equinox@diac24.net>
* | yang: sync the IETF module translator with the latest frr-ripd changesRenato Westphal2019-01-181-18/+18
| | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | ripngd: add vrf input parameter to the "clear-ripng-route" RPCRenato Westphal2019-01-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Description of the new parameter (adapted from the ietf-rip module): "VRF name identifying a specific RIPng instance. This leaf is optional for the rpc. If it is specified, the rpc will clear all routes in the specified RIPng instance; if it is not specified, the rpc will clear all routes in all RIPng instances."; Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | ripngd: make YANG operational-data VRF aware tooRenato Westphal2019-01-181-67/+67
| | | | | | | | | | | | | | Move the "state" container into the "instance" list and adapt the code accordingly. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | ripngd: add VRF supportRenato Westphal2019-01-181-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Turn the "instance" YANG presence-container into a YANG list keyed by the new "vrf" leaf. This is a backward incompatible change but this should be ok for now. * RIPng VRF instances can be configured even when the corresponding VRF doesn't exist. And a RIPng VRF instance isn't deleted when the corresponding VRF is deleted. For this to work, implement the ripng_instance_enable() and ripng_instance_disable() functions that are called to enable/disable RIPng routing instances when necessary. A RIPng routing instance can be enabled only when the corresponding VRF is enabled (this information comes from zebra and depends on the underlying VRF backend). Routing instances are stored in the new ripng_instances rb-tree (global variable). * Add a vrf pointer to the ripng structure instead of storing vrf_id only. This is much more convenient than using vrf_lookup_by_id() every time we need to get the vrf pointer from the VRF ID. The ripng->vrf pointer is updated whenever the VRF enable/disable hooks are called. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | ripd: add vrf input parameter to the "clear-rip-route" RPCRenato Westphal2019-01-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Description of the new parameter (adapted from the ietf-rip module): "VRF name identifying a specific RIP instance. This leaf is optional for the rpc. If it is specified, the rpc will clear all routes in the specified RIP instance; if it is not specified, the rpc will clear all routes in all RIP instances."; Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | ripd: make YANG operational-data VRF aware tooRenato Westphal2019-01-181-68/+68
| | | | | | | | | | | | | | Move the "state" container into the "instance" list and adapt the code accordingly. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | ripd: add VRF supportRenato Westphal2019-01-183-20/+29
|/ | | | | | | | | | | | | | | | | | | | | | | | * Turn the "instance" YANG presence-container into a YANG list keyed by the new "vrf" leaf. This is a backward incompatible change but this should be ok for now. * RIP VRF instances can be configured even when the corresponding VRF doesn't exist. And a RIP VRF instance isn't deleted when the corresponding VRF is deleted. For this to work, implement the rip_instance_enable() and rip_instance_disable() functions that are called to enable/disable RIP routing instances when necessary. A RIP routing instance can be enabled only when the corresponding VRF is enabled (this information comes from zebra and depends on the underlying VRF backend). Routing instances are stored in the new rip_instances rb-tree (global variable). * Add a vrf pointer to the rip structure instead of storing vrf_id only. This is much more convenient than using vrf_lookup_by_id() every time we need to get the vrf pointer from the VRF ID. The rip->vrf pointer is updated whenever the VRF enable/disable hooks are called. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd, yang: set default network-type to broadcastEmanuele Di Pascale2018-12-181-0/+1
| | | | | | | | | | | | | isisd has both a circ_type and a circ_type_config variable to track the network tpye of an interface. The former has no default, but the latter defaults to broadcast. Adding that default makes sure that the yang leaf won't be deleted, which is something that would not make sense from an isisd perspective. We will need to add an operational state leaf to match the potential difference between the configured network type and the actual network type, since the latter might be different based on the interface flags received from zebra. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd, yang: change type empty leafs to booleansEmanuele Di Pascale2018-12-181-17/+32
| | | | | | | | As requested by the reviewers. Additionally, added a check when setting a circuit on an interface to see if it is a loopback, and in that case, set it to passive. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd, yang: add configuration model and callback stubsEmanuele Di Pascale2018-12-182-0/+1392
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #3399 from opensourcerouting/ripngd-nb-retrofittingDonald Sharp2018-12-143-0/+347
|\ | | | | ripngd northbound conversion
| * yang, ripngd: add 'frr-ripngd.yang' and associated stub callbacksRenato Westphal2018-12-033-0/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce frr-ripngd.yang, which defines a model for managing the FRR ripngd daemon. Update the 'frr_yang_module_info' array of ripngd with the new 'frr-ripngd' module. Add two new files (ripng_cli.[ch]) which should contain all ripngd commands converted to the new northbound model. Centralizing all commands in a single place will facilitate the process of moving the CLI to a separate program in the future. Add automatically generated stub callbacks in ripng_northbound.c. These callbacks will be implemented gradually in the following commits. Add the confd.frr-ripngd.yang YANG module with annotations specific to the ConfD daemon. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | lib, tests: add support for keyless YANG listsRenato Westphal2018-12-091-2/+0
|/ | | | | | | | | | | | | | | | | | | | | | YANG allows lists without keys for operational data, in which case the list elements are uniquely identified using a positional index (starting from one). This commit does the following: * Remove the need to implement the 'get_keys' and 'lookup_entry' callbacks for keyless lists. * Extend nb_oper_data_iter_list() so that it special-cases keyless lists appropriately. Since both the CLI and the sysrepo plugin use nb_oper_data_iterate() to fetch operational data, both these northbound clients automatically gain the ability to understand keyless lists without additional changes. * Extend the confd plugin to special-case keyless lists as well. This was a bit painful to implement given ConfD's clumsy API, but keyless lists should work ok now. * Update the "test_oper_data" unit test to test keyless YANG lists in addition to regular lists. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib, tests: major rework in the operational-data callbacksRenato Westphal2018-11-262-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | The northbound infrastructure for operational data was subpar compared to the infrastructure for configuration data. This commit addresses most of the existing problems, making it possible to write operational-data callbacks for more complex YANG models. Summary of the changes: * Add support for nested YANG lists. * Add support for leaf-lists. * Add support for leafs of type "empty". * Introduce the "show yang operational-data XPATH" command, and write an unit test for it. The main purpose of this command is to make it easier to test the operational-data northbound callbacks. * Introduce the nb_oper_data_iterate() function, that can be used to iterate over operational data. Make the CLI and sysrepo use this function. * Since ConfD has a very peculiar API, it can't reuse the nb_oper_data_iterate() like the other northbound clients. In this case, adapt the existing ConfD callbacks to support the new features (and make some performance improvements in the process). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* yang: add .gitignoreDavid Lamparter2018-11-191-0/+2
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* yang: embed models into binariesDavid Lamparter2018-11-192-0/+99
| | | | | | | | | | | | | | This bakes our YANG models straight into the library/daemons, so they don't need to be loaded from /usr/share/yang. This makes the installation quite a bit more robust, as well as gets us halfway to running uninstalled. (The other half is baking in the extension type module.) The /usr/share/yang directory is still searched as a fallback, as well as for the experimental YANG model translator. This is likely to stay as is for the time being. Signed-off-by: David Lamparter <equinox@diac24.net>
* yang: add a module translator for ietf-rip.yangRenato Westphal2018-10-275-0/+475
| | | | | | | | | | | | | | | | | | | As it can be seen below, this translator covers only ~13% of the ietf-rip YANG module. Work must be done to increase that number. ripd> en ripd# conf t ripd(config)# yang module-translator load /tmp/frr-ietf-translator.json % Module translator "ietf" loaded successfully. ripd(config)# do show yang module-translator Family Module Deviations Coverage (%) ----------------------------------------------------------------------- ietf ietf-interfaces frr-deviations-ietf-interfaces 3.92 ietf ietf-routing frr-deviations-ietf-routing 1.56 ietf ietf-rip frr-deviations-ietf-rip 13.60 Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* yang, ripd: add 'frr-ripd.yang' and associated stub callbacksRenato Westphal2018-10-276-0/+801
| | | | | | | | | | | | | | | | | | | | | | | | Introduce frr-ripd.yang, which defines a model for managing the FRR ripd daemon. Also add frr-route-types.yang which defines typedefs for FRR route types. Update the 'frr_yang_module_info' array of ripd with the new 'frr-ripd' module. Add two new files (rip_cli.[ch]) which should contain all ripd commands converted to the new northbound model. Centralizing all commands in a single place will facilitate the process of moving the CLI to a separate program in the future. Add automatically generated stub callbacks in rip_northbound.c. These callbacks will be implemented gradually in the following commits. Add example JSON/XML ripd configurations in yang/examples/. Add the confd.frr-ripd.yang YANG module with annotations specific to the ConfD daemon. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* yang, lib: add 'frr-interface.yang' and associated stub callbacksRenato Westphal2018-10-272-0/+47
| | | | | | | | | | | | | Introduce frr-interface.yang, which defines a model for managing FRR interfaces. Update the 'frr_yang_module_info' array of all daemons that will implement this module. Add automatically generated stub callbacks in if.c. These callbacks will be implemented in the following commit. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib: introduce new northbound APIRenato Westphal2018-10-274-0/+178
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>