You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the yang module openconfig-bgp, where a bgp neighbor may have multiple afi-safis configured, the afi-safi list is defined like so:
list afi-safi {
key "afi-safi-name";
description
"AFI,SAFI configuration available for the
neighbour or group";
leaf afi-safi-name {
type leafref {
path "../config/afi-safi-name";
}
description
"Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list";
}
And, the leafref for afi-safi-name points to:
leaf afi-safi-name {
type identityref {
base oc-bgp-types:AFI_SAFI_TYPE;
}
description "AFI,SAFI";
}
Ideally, the leafref would offer the same completions as offered by the identityref leaf, and furthermore would not allow non-conforming entries.
clixon> set bgp neighbors neighbor 1.2.3.4 afi-safis afi-safi ?
<afi-safi-name> Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list
clixon> set bgp neighbors neighbor 1.2.3.4 afi-safis afi-safi foo config afi-safi-name ?
<afi-safi-name> AFI,SAFI
oc-bgp-types:IPV4_FLOWSPEC AFI,SAFI
oc-bgp-types:IPV4_LABELED_UNICAST AFI,SAFI
oc-bgp-types:IPV4_UNICAST AFI,SAFI
oc-bgp-types:IPV6_LABELED_UNICAST AFI,SAFI
oc-bgp-types:IPV6_UNICAST AFI,SAFI
oc-bgp-types:L2VPN_EVPN AFI,SAFI
oc-bgp-types:L2VPN_VPLS AFI,SAFI
oc-bgp-types:L3VPN_IPV4_MULTICAST AFI,SAFI
oc-bgp-types:L3VPN_IPV4_UNICAST AFI,SAFI
oc-bgp-types:L3VPN_IPV6_MULTICAST AFI,SAFI
oc-bgp-types:L3VPN_IPV6_UNICAST AFI,SAFI
oc-bgp-types:LINKSTATE AFI,SAFI
oc-bgp-types:LINKSTATE_SPF AFI,SAFI
oc-bgp-types:LINKSTATE_VPN AFI,SAFI
oc-bgp-types:SRTE_POLICY_IPV4 AFI,SAFI
oc-bgp-types:SRTE_POLICY_IPV6 AFI,SAFI
oc-bgp-types:VPNV4_FLOWSPEC AFI,SAFI
clixon> set bgp neighbors neighbor 1.2.3.4 afi-safis afi-safi foo config afi-safi-name foo
clixon> show
...
afi-safis {
afi-safi {
afi-safi-name foo;
config {
afi-safi-name foo;
...
The text was updated successfully, but these errors were encountered:
* Closer adherence to RFC 7950. Some of this is changed behavior, some is new feature.
* Essentially instead of looking at the referring leaf, context is referred(target) node
* Validation uses referred node
* Validation changed to use type of referred node, instead of just "string"
* Auto-cli
* Changed to use type of referred node for typecheck
* Completion uses referred node
* Required instance / less strict validation
* New: Leafrefs must refer to existing data leaf ONLY IF YANG `required-instance` is true
* Previous: All leafrefs must refer to existing data leaf node
* Fixed: [Autocli does not offer completions for leafref to identityref #254](#254)
After reading RFC 7950 more thoroughly, several leafref issues needed to be modified, where the problem reported in this issue is a sub part. The larger issue was to move the typecheck/validation/completion from the "referring" node (the leafref) to the "referred node) (the identityref in this example.
Given the yang module openconfig-bgp, where a bgp neighbor may have multiple
afi-safis
configured, theafi-safi
list is defined like so:And, the leafref for
afi-safi-name
points to:Ideally, the leafref would offer the same completions as offered by the identityref leaf, and furthermore would not allow non-conforming entries.
The text was updated successfully, but these errors were encountered: