diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-05-09 06:34:57 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-27 20:16:12 +0200 |
commit | 8f90d89ba93a63dba121f0678ed2506b4ae530be (patch) | |
tree | 2aacfd2bfad40dc56b567fd898d0b02a59982f66 /ospfd | |
parent | yang, lib: add 'frr-interface.yang' and associated stub callbacks (diff) | |
download | frr-8f90d89ba93a63dba121f0678ed2506b4ae530be.tar.xz frr-8f90d89ba93a63dba121f0678ed2506b4ae530be.zip |
lib: retrofit interface commands to the new northbound model
The frr-interface YANG module models interfaces using a YANG list keyed
by the interface name and the interface VRF. Interfaces can't be keyed
only by their name since interface names might not be globally unique
when the netns VRF backend is in use. When using the VRF-Lite backend,
however, interface names *must* be globally unique. In this case, we need
to validate the uniqueness of interface names inside the appropriate
northbound callback since this constraint can't be expressed in the
YANG language. We must also ensure that only inactive interfaces can be
removed, among other things we need to validate in the northbound layer.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_vty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 652c47387..52652821d 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -460,7 +460,7 @@ DEFUN (ospf_passive_interface, return CMD_SUCCESS; } if (ospf->vrf_id != VRF_UNKNOWN) - ifp = if_get_by_name(argv[1]->arg, ospf->vrf_id, 0); + ifp = if_get_by_name(argv[1]->arg, ospf->vrf_id); if (ifp == NULL) { vty_out(vty, "interface %s not found.\n", (char *)argv[1]->arg); @@ -533,7 +533,7 @@ DEFUN (no_ospf_passive_interface, } if (ospf->vrf_id != VRF_UNKNOWN) - ifp = if_get_by_name(argv[2]->arg, ospf->vrf_id, 0); + ifp = if_get_by_name(argv[2]->arg, ospf->vrf_id); if (ifp == NULL) { vty_out(vty, "interface %s not found.\n", (char *)argv[2]->arg); |