Update git submodules
[docs.git] / docs / user-guide / pcep-user-guide.rst
index 8cba92ecc27a7696656486b85649c4f740f8f6f9..69ec767bc46052ec224dfd55dc350a5ca63524de 100644 (file)
@@ -128,13 +128,43 @@ Configuration
 ^^^^^^^^^^^^^
 This capability is enabled by default. No additional configuration is required.
 
+Speaker Entity identifier
+'''''''''''''''''''''''''
+The Speaker Entity Identifier is an optional
+TLV that may be included in the OPEN Object when a PCEP speaker
+wishes to determine if state synchronization can be skipped when a
+PCEP session is restarted.
+
+**URL:** ``/restconf/config/network-topology:network-topology/topology/pcep-topology/node/43.43.43.43``
+
+**Method:** ``PUT``
+
+**Content-Type:** ``application/xml``
+
+**Request Body:**
+
+.. code-block:: xml
+   :linenos:
+   :emphasize-lines: 2,4
+
+
+    <node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
+        <node-id>43.43.43.43</node-id>
+        <session-config xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:config">
+            <speaker-entity-id-value xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:sync:optimizations:config">AQIDBA==</speaker-entity-id-value>
+        </session-config>
+    </node>
+
+@line 2: **address** - A PCC IP address.
+
+@line 4: **Speaker Entity Identifier** - The Speaker Entity identifier assigned to PCEP Node.
+
 MD5 authentication configuration
 ''''''''''''''''''''''''''''''''
-The OpenDaylight PCEP implementation is supporting TCP MD5 for authentication.
-Sample configuration below shows how to set authentication password for a particular PCC.
-It is required to install ``odl-netconf-connector-ssh`` feature first.
+The OpenDaylight PCEP implementation supports TCP MD5 for authentication.
+The sample configuration below shows how to set authentication password for a particular PCC.
 
-**URL:** ``/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-pcep-topology-provider-cfg:pcep-topology-provider/pcep-topology``
+**URL:** ``/restconf/config/network-topology:network-topology/topology/pcep-topology/node/43.43.43.43``
 
 **Method:** ``PUT``
 
@@ -144,43 +174,19 @@ It is required to install ``odl-netconf-connector-ssh`` feature first.
 
 .. code-block:: xml
    :linenos:
-   :emphasize-lines: 26,27
-
-    <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-        <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">x:pcep-topology-provider</type>
-        <name>pcep-topology</name>
-        <data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
-            <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
-            <name>pingpong-binding-data-broker</name>
-        </data-provider>
-        <dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
-            <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:pcep">x:pcep-dispatcher</type>
-            <name>global-pcep-dispatcher</name>
-        </dispatcher>
-        <rpc-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
-            <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-rpc-registry</type>
-            <name>binding-rpc-broker</name>
-        </rpc-registry>
-        <scheduler xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
-            <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:programming:spi">x:instruction-scheduler</type>
-            <name>global-instruction-scheduler</name>
-        </scheduler>
-        <stateful-plugin xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
-            <type>pcep-topology-stateful</type>
-            <name>stateful07</name>
-        </stateful-plugin>
-        <topology-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">pcep-topology</topology-id>
-        <client xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
-            <address>43.43.43.43</address>
-            <password>topsecret</password>
-        </client>
-    </module>
+   :emphasize-lines: 2,4
 
-@line 26: **address** - A PCC IP address.
 
-@line 27: **password** - MD5 authentication phrase.
+    <node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
+        <node-id>43.43.43.43</node-id>
+        <session-config xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:config">
+            <password>topsecret</password>
+        </session-config>
+    </node>
+
+@line 2: **address** - A PCC IP address.
 
-.. warning:: The PCE (*pcep-topology-provider*) configuration is going to be changed in Carbon release - moving to configuration datastore.
+@line 4: **password** - MD5 authentication phrase.
 
 LSP State Database
 ^^^^^^^^^^^^^^^^^^
@@ -942,9 +948,7 @@ Segment Identifier (SID) is encoded as a MPLS label.
 
 Configuration
 '''''''''''''
-This capability is enabled by default.
-In PCEP-SR draft version 6, SR Explicit Route Object/Record Route Object subobjects IANA code points change was proposed.
-In order to use the latest code points, a configuration should be changed in following way:
+This capability is enabled by default. In order to disable it, a configuration should be changed as follows:
 
 **URL:** ``/restconf/config/pcep-segment-routing-app-config:pcep-segment-routing-app-config``
 
@@ -956,11 +960,38 @@ In order to use the latest code points, a configuration should be changed in fol
 
 .. code-block:: xml
    :linenos:
+   :emphasize-lines: 2
+
+   <pcep-segment-routing-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:segment-routing-app-config">
+      <sr-capable>false</sr-capable>
+   </pcep-segment-routing-config>
+
+@line 2: **sr-capable** - True if capability is supported.
+
+IANA code points
+''''''''''''''''
+
+In PCEP-SR draft version 6, SR Explicit Route Object/Record Route Object subobjects IANA code points change was proposed.
+In order to use the latest code points, a configuration should be changed as follows:
+
+**URL:** ``/restconf/config/pcep-segment-routing-app-config:pcep-segment-routing-config``
+
+**Method:** ``PUT``
+
+**Content-Type:** ``application/xml``
+
+**Request Body:**
+
+.. code-block:: xml
+   :linenos:
+   :emphasize-lines: 2
 
    <pcep-segment-routing-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:segment-routing-app-config">
       <iana-sr-subobjects-type>true</iana-sr-subobjects-type>
    </pcep-segment-routing-config>
 
+@line 2: **iana-sr-subobjects-type** - True if IANA code points should be used.
+
 LSP Operations for PCEP SR
 ''''''''''''''''''''''''''
 The PCEP SR extension defines new ERO subobject - *SR-ERO subobject* capable of carrying a SID.
@@ -1181,6 +1212,130 @@ Following RPC example illustrates a request for the LSP re-synchronization:
 
 @line 3: **name** - The LSP name. If this parameter is omitted, re-synchronization is requested for all PCC's LSPs.
 
+Node session statistics
+----------------------------
+
+The PCEP statistics provides information about PCE <-> PCC session and its stateful listener (topology-provider).
+
+Usage
+'''''
+
+**URL:** ``/restconf/operational/network-topology:network-topology/topology/pcep-topology/node/pcc:%2F%2F43.43.43.43/pcep-session-state``
+
+**Method:** ``GET``
+
+**Response Body:**
+
+.. code-block:: xml
+   :linenos:
+   :emphasize-lines: 3,4,5,6,7,8,9,10,13,14,15,16,19,20,21,22,25,26,27,28,31,32,33,35,36,37
+
+   <pcep-session-state xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:stats">
+      <messages>
+         <last-received-rpt-msg-timestamp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">1512640592</last-received-rpt-msg-timestamp>
+         <sent-upd-msg-count xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">0</sent-upd-msg-count>
+         <received-rpt-msg-count xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">2</received-rpt-msg-count>
+         <sent-init-msg-count xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">0</sent-init-msg-count>
+         <sent-msg-count>0</sent-msg-count>
+         <last-sent-msg-timestamp>0</last-sent-msg-timestamp>
+         <unknown-msg-received>0</unknown-msg-received>
+         <received-msg-count>2</received-msg-count>
+         <error-messages>
+            <last-sent-error></last-sent-error>
+            <received-error-msg-count>0</received-error-msg-count>
+            <sent-error-msg-count>0</sent-error-msg-count>
+            <last-received-error></last-received-error>
+         </error-messages>
+         <reply-time>
+            <average-time>0</average-time>
+            <min-time>0</min-time>
+            <max-time>0</max-time>
+         </reply-time>
+      </messages>
+      <peer-pref>
+         <keepalive>30</keepalive>
+         <deadtimer>120</deadtimer>
+         <ip-address>127.0.0.1</ip-address>
+         <session-id>0</session-id>
+      </peer-pref>
+      <local-pref>
+         <keepalive>30</keepalive>
+         <deadtimer>120</deadtimer>
+         <ip-address>127.0.0.1</ip-address>
+         <session-id>0</session-id>
+      </local-pref>
+      <peer-capabilities>
+         <stateful xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">true</stateful>
+         <instantiation xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">true</instantiation>
+         <active xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">true</active>
+      </peer-capabilities>
+      <session-duration>0:00:00:18</session-duration>
+      <delegated-lsps-count>1</delegated-lsps-count>
+      <synchronized>true</synchronized>
+   </pcep-session-state>
+
+@line 3: **last-received-rpt-msg-timestamp** - The timestamp of last received PCRpt message.
+
+@line 4: **sent-upd-msg-count** - The number of sent PCUpd messages.
+
+@line 5: **received-rpt-msg-count** - The number of received PcRpt messages.
+
+@line 6: **sent-init-msg-count** - The number of sent PCInitiate messages.
+
+@line 7: **sent-msg-count** - Total number of sent PCEP messages.
+
+@line 8: **last-sent-msg-timestamp** - The timestamp of last sent message.
+
+@line 9: **unknown-msg-received** - The number of received unknown messages.
+
+@line 10: **received-msg-count** - Total number of received PCEP messages.
+
+@line 13: **last-sent-error** - Type/value tuple of last sent error.
+
+@line 14: **received-error-msg-count** - Total number of received PCErr messages.
+
+@line 15: **sent-error-msg-count** - Total number of sent PCErr messages.
+
+@line 16: **last-received-error** - Type/value tuple of last sent error.
+
+@line 19: **keepalive** - Advertised keep-alive value.
+
+@line 20: **deadtimer** - Advertised deadtimer value.
+
+@line 21: **ip-address** - Peer's IP address.
+
+@line 22: **session-id** - Peer's session identifier.
+
+@line 25: **keepalive** - Advertised keep-alive value.
+
+@line 26: **deadtimer** - Advertised deadtimer value.
+
+@line 27: **ip-address** - Peer's IP address.
+
+@line 28: **session-id** - Peer's session identifier.
+
+@line 31: **stateful** - Represents peer's stateful/stateless capability.
+
+@line 32: **instantiation** - Represents peer's instantiation capability.
+
+@line 33: **active** - Represents peer's LSP update capability.
+
+@line 35: **session-duration** - Elapsed time (in d:H:m:s) from session-up until last statistic update.
+
+@line 36: **delegated-lsps-count** - The number of delegated LSPs (tunnels) from PCC.
+
+@line 37: **synchronized** - Represents synchronization status.
+
+CLI
+---
+
+PCEP Karaf Console (odl-bgpcep-pcep-cli) provides a CLI feature to read session statistics per node.
+
+.. code-block:: bash
+   :linenos:
+
+   opendaylight-user@root> pcep:node-state -topology-id pcep-topology -node-id pcc://43.43.43.43
+
 Test tools
 ----------
 PCC Mock
@@ -1368,7 +1523,7 @@ PCEP is not working...
 
 Bug reporting
 ^^^^^^^^^^^^^
-Before you report a bug, check `BGPCEP Bugzilla <https://bugs.opendaylight.org/buglist.cgi?list_id=65849&product=bgpcep&resolution=--->`_ to ensure same/similar bug is not already filed there.
+Before you report a bug, check `BGPCEP Jira <https://jira.opendaylight.org/projects/BGPCEP/issues/BGPCEP-589?filter=allopenissues>`_ to ensure same/similar bug is not already filed there.
 
 Write an e-mail to bgpcep-users@lists.opendaylight.org and provide following information: