Added JSON and XML payloads tabs with RFC 8040 URL 72/90572/15
authorAman <170030039@iitdh.ac.in>
Mon, 22 Jun 2020 16:53:54 +0000 (22:23 +0530)
committerRobert Varga <nite@hq.sk>
Mon, 7 Sep 2020 13:09:11 +0000 (13:09 +0000)
Modified docs/bgp/bgp-user-guide-route-refresh-capability.rst by adding JSON,XML examples with corresponding sphinx tabs

Change-Id: I277e40fb90b1140d9c59ff492024db0361836718
Signed-off-by: Aman <170030039@iitdh.ac.in>
docs/bgp/bgp-user-guide-route-refresh-capability.rst

index 1d28ae78cdf8e3b77e8aeb50bc3072b789b9c2f1..bd7c31cf904ef55c99874f668ce4e55fd78b4e22 100644 (file)
@@ -19,19 +19,41 @@ To send a Route Refresh request from OpenDaylight BGP speaker instance to its ne
 
 **URL:** ``/restconf/operations/bgp-peer-rpc:route-refresh-request``
 
+**RFC8040 URL:** ``/rests/data/bgp-peer-rpc:route-refresh-request?content=non-config``
+
 **Method:** ``POST``
 
-**Content-Type:** ``application/xml``
+.. tabs::
+
+   .. tab:: XML
+
+      **Content-Type:** ``application/xml``
+
+      **Request Body:**
+
+      .. code-block:: xml
+
+         <input xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc">
+             <afi xmlns:types="urn:opendaylight:params:xml:ns:yang:bgp-types">types:ipv4-address-family</afi>
+             <safi xmlns:types="urn:opendaylight:params:xml:ns:yang:bgp-types">types:unicast-subsequent-address-family</safi>
+             <peer-ref xmlns:rib="urn:opendaylight:params:xml:ns:yang:bgp-rib">/rib:bgp-rib/rib:rib[rib:id="bgp-example"]/rib:peer[rib:peer-id="bgp://10.25.1.9"]</peer-ref>
+         </input>
+
+   .. tab:: JSON
+
+      **Content-Type:** ``application/json``
 
-**Request Body:**
+      **Request Body:**
 
-.. code-block:: xml
+      .. code-block:: json
 
-   <input xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc">
-       <afi xmlns:types="urn:opendaylight:params:xml:ns:yang:bgp-types">types:ipv4-address-family</afi>
-       <safi xmlns:types="urn:opendaylight:params:xml:ns:yang:bgp-types">types:unicast-subsequent-address-family</safi>
-       <peer-ref xmlns:rib="urn:opendaylight:params:xml:ns:yang:bgp-rib">/rib:bgp-rib/rib:rib[rib:id="bgp-example"]/rib:peer[rib:peer-id="bgp://10.25.1.9"]</peer-ref>
-   </input>
+         {
+             "bgp-peer-rpc:input": {
+                 "afi": "bgp-types:ipv4-address-family",
+                 "safi": "bgp-types:unicast-subsequent-address-family",
+                 "peer-ref": "/rib:bgp-rib/rib:rib[rib:id=\"bgp-example\"]/rib:peer[rib:peer-id=\"bgp://10.25.1.9\"]"
+             }
+         }
 
 References
 ^^^^^^^^^^
@@ -56,14 +78,34 @@ To release neighbor session, invoke RPC:
 
 **URL:** ``/restconf/operations/bgp-peer-rpc:reset-session``
 
+**RFC8040 URL:** ``/rests/data/bgp-peer-rpc:reset-session?content=non-config``
+
 **Method:** ``POST``
 
-**Content-Type:** ``application/xml``
+.. tabs::
+
+   .. tab:: XML
+
+      **Content-Type:** ``application/xml``
+
+      **Request Body:**
+
+      .. code-block:: xml
+
+         <input xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc">
+             <peer-ref xmlns:rib="urn:opendaylight:params:xml:ns:yang:bgp-rib">/rib:bgp-rib/rib:rib[rib:id="bgp-example"]/rib:peer[rib:peer-id="bgp://10.25.1.9"]</peer-ref>
+         </input>
+
+   .. tab:: JSON`
+
+      **Content-Type:** ``application/json``
 
-**Request Body:**
+      **Request Body:**
 
-.. code-block:: xml
+      .. code-block:: json
 
-   <input xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc">
-       <peer-ref xmlns:rib="urn:opendaylight:params:xml:ns:yang:bgp-rib">/rib:bgp-rib/rib:rib[rib:id="bgp-example"]/rib:peer[rib:peer-id="bgp://10.25.1.9"]</peer-ref>
-   </input>
+         {
+             "bgp-peer-rpc:input": {
+                 "peer-ref": "/rib:bgp-rib/rib:rib[rib:id=\"bgp-example\"]/rib:peer[rib:peer-id=\"bgp://10.25.1.9\"]"
+             }
+         }