Matteo Scandolo | d02b79b | 2019-12-05 16:42:13 -0800 | [diff] [blame] | 1 | .. _OLT State Machine: |
| 2 | |
| 3 | OLT State Machine |
| 4 | ================= |
| 5 | |
| 6 | In ``BBSim`` the device state is created using a state machine |
| 7 | library: `fsm <https://github.com/looplab/fsm>`__. |
| 8 | |
| 9 | Here is a list of possible states for an OLT in BBSim: |
| 10 | |
| 11 | .. list-table:: OLT States |
| 12 | :header-rows: 1 |
| 13 | |
| 14 | * - |
| 15 | - Initialized |
| 16 | - Enabled |
| 17 | - Disabled |
| 18 | - Deleted |
| 19 | * - Data model is created for OLT, NNIs, PONs and ONUs |
| 20 | - Starts the listener on the NNI interface and the DHCP server, |
| 21 | Starts the OLT gRPC server, |
| 22 | Moves the ONUs to ``initialized`` state |
| 23 | - Sends OLT, NNIs and PONs ``UP`` indications |
| 24 | Transition the ONUs into ``discovered`` state |
| 25 | - Transition the ONUs into ``disabled`` state |
| 26 | Sends OLT, NNIs and PONs ``UP`` indications |
| 27 | - Stops the OLT gRPC Server |
| 28 | |
| 29 | Below is a diagram of the state machine allowed transitions: |
| 30 | |
| 31 | .. graphviz:: |
| 32 | |
| 33 | digraph { |
| 34 | rankdir=TB |
| 35 | newrank=true |
| 36 | graph [pad="1,1" bgcolor="#cccccc"] |
| 37 | node [style=filled] |
| 38 | |
| 39 | created -> initialized -> enabled -> disabled -> deleted |
| 40 | disabled -> enabled |
| 41 | deleted -> initialized |
Zack Williams | 4b0ef4d | 2019-12-18 14:25:20 -0700 | [diff] [blame] | 42 | } |
| 43 | |