Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1283

Unable to configure BGP peer-role through RESTCONF

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • None
    • Post-Helium
    • netconf
    • 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":[

      {"error-type":"protocol","error-tag":"malformed-message","error-message":"Error parsing input: Invalid value 'Ebgp' for enum type. Allowed values are: [ebgp, ibgp, rr-client]"}

      ]}}

      6. Replacing "Ebgp" with "ebgp" in the curl data leads to another response (code 500):
      {"errors":{"error":[

      {"error-type":"application","error-tag":"operation-failed","error-message":"Error creating data"}

      ]}}

      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.

            mmarsale@cisco.com Maros Marsalek
            vrpolak Vratko Polak
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: