-
Bug
-
Resolution: Done
-
None
-
Post-Helium
-
None
-
Operating System: All
Platform: All
-
3077
This is basically what CONTROLLER-1281 wanted to be.
Any attempt to add a BGP peer (with peer-type specified) through RESTCONF will be rejected.
Steps to reproduce:
1. ODL_ROOT=<where_yourODL_installation_lives>
2. Boot ODL.
3. Install features "odl-restconf", "odl-bgppcep-bgp-all" and "odl-netconf-connector-all".
4. Wait for ODL to fully load (run "top" in another console and wait until CPU usage of the massive Java process stays below 5%).
5. curl -v -u 'admin:admin' -X POST -H "Content-Type:application/xml" -d '<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer</type>
<name>example-bgp-peer</name>
<host xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.1</host>
<holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">180</holdtimer>
<peer-role xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">Ebgp</peer-role>
<rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">x:rib</type>
<name>example-bgp-rib</name>
</rib>
<peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer-registry</type>
<name>global-bgp-peer-registry</name>
</peer-registry>
<advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
<name>ipv4-unicast</name>
</advertized-table>
<advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
<name>ipv6-unicast</name>
</advertized-table>
<advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
<name>linkstate</name>
</advertized-table>
</module>' 127.0.0.1:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules
which leads to this response (code 400):
{"errors":{"error":[
]}}
6. Replacing "Ebgp" with "ebgp" in the curl data leads to another response (code 500):
{"errors":{"error":[
]}}
7. Neither POST generates anything in karaf.log, which is itself a minor bug.
Based on discussion in CONTROLLER-1281 setting this bug to depend on CONTROLLER-1050.
Change in BGP (to not use leafs of enum type) would fix this bug too.
- is blocked by
-
CONTROLLER-1050 Proper support for ENUMs in Netconf northbound
- Resolved