[BGPCEP-482] POSTing an openconfig neghbor fails Created: 15/Jun/16  Updated: 03/Mar/19  Resolved: 01/Aug/16

Status: Resolved
Project: bgpcep
Component/s: BGP
Affects Version/s: Bugzilla Migration
Fix Version/s: Bugzilla Migration

Type: Bug
Reporter: Tom Pantelis Assignee: Claudio David Gasparini
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by NETCONF-223 IAE Caused by missing mandatory desce... Resolved
External issue ID: 6069

 Description   

I was following the user guide, https://wiki.opendaylight.org/view/BGP_LS_PCEP:Beryllium_User_Guide#BGP_Peer_3, to add a peer neighbor but it failed with:

java.lang.IllegalArgumentException: Node (http://openconfig.net/yang/bgp?revision=2015-10-09)bgp is missing mandatory descendant /(http://openconfig.net/yang/bgp?revision=2015-10-09)global/config/as

The global container is a sibling of neighbors but it has a mandatory child descendant. The only way I could get it to work as is was to PUT the entire bgp tree in order to include global and the mandatory leaf:

<bgp xmlns="http://openconfig.net/yang/bgp">
<global>
<config>
<as>64496</as>
</config>
</global>
...
<neighbors>
<neighbor>
<neighbor-address>192.0.2.1</neighbor-address>
...
</neighbor>
</neighbors>
</bgp>

This is not very usable. After adding "presence" to the global container, it works as expected as per the guide.



 Comments   
Comment by Milos Fabian [ 16/Jun/16 ]

Tom,
you tried to configure neighbor while global container was not present in DS?
Did you install bgp feature? - There is an default sample initial configuration, so global configuration would appear instantly.

Anyway, this behavior is pretty much expected - the BGP/Global needs to be configured first and then neighbors.

Comment by Tom Pantelis [ 16/Jun/16 ]

The global container defined in 41-bgp-example.xml was present via restconf. This issue is related to the mandatory leaf checking that was added in yangtools in Be. Without the global container specified as "presence", yangtools expects you to specify all mandatory leaf descendants even if they're already present in the tree.

Comment by Milos Fabian [ 17/Jun/16 ]

Works for me (Beryllium-SR2):
1. install features - odl-bgpcep-bgp odl-netconf-connector-ssh odl-restconf-all
2. Check global configuration is present - http://localhost:8181/restconf/config/openconfig-bgp:bgp/global
3. configure a new neighbor following https://wiki.opendaylight.org/view/BGP_LS_PCEP:Beryllium_User_Guide#BGP_Peer_3
4. check Neighbor is present in BGP OpenConfig, new Peer is configured (config-subsystem module)

Comment by Tom Pantelis [ 17/Jun/16 ]

Interesting. I tried it on master - can you verify on master? Also I realized afterward I didn't have the odl-netconf-connector-ssh installed but I don't think that's related b/c I saw the global model when I did a GET.

Comment by Milos Fabian [ 20/Jun/16 ]

Confirming - failure happens when using Boron (master branch).

Comment by Claudio David Gasparini [ 22/Jul/16 ]

https://git.opendaylight.org/gerrit/#/c/42299/

Generated at Wed Feb 07 19:13:11 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.