feature\898:

Fixed the resetting operating state to set compromised or overwhelmed services or operating system back to a good state. Added a reset count that switches the node into a good state.
Created a "SHUTTING DOWN" operating state to last for a (configurable) and a "BOOTING" operating state to last for a (configurable).
Created a test file to test the reset changes the node to a good state when its set to a COMPROMISED state. The last two test tests makes sure that the node boots and shutdowns correctly.
Lastly, updated the docs file as well.
This commit is contained in:
Brian Kanyora
2023-06-05 23:59:32 +01:00
parent a48b217cf3
commit 8b61fbebe4

View File

@@ -31,7 +31,7 @@ An inheritance model has been adopted in order to model nodes. All nodes have th
* Name * Name
* Type (e.g. computer, switch, RTU - enumeration)​ * Type (e.g. computer, switch, RTU - enumeration)​
* Priority (P1, P2, P3, P4 or P5 - enumeration)​ * Priority (P1, P2, P3, P4 or P5 - enumeration)​
* Hardware State (ON, OFF, RESETTING - enumeration)​ * Hardware State (ON, OFF, RESETTING, SHUTTING_DOWN, BOOTING - enumeration)​
Active Nodes also have the following attributes (Class: Active Node):​ Active Nodes also have the following attributes (Class: Active Node):​
@@ -106,6 +106,8 @@ The status changes that can be made to a node are as follows:
* ON * ON
* OFF * OFF
* RESETTING - when a status of resetting is entered, the node will automatically exit this state after a number of steps (as defined by the nodeResetDuration configuration item) after which it returns to an ON state * RESETTING - when a status of resetting is entered, the node will automatically exit this state after a number of steps (as defined by the nodeResetDuration configuration item) after which it returns to an ON state
* BOOTING
* SHUTTING_DOWN
* Active Nodes and Service Nodes: * Active Nodes and Service Nodes:
@@ -259,6 +261,8 @@ For the nodes, the following values are represented:
* 1 = ON * 1 = ON
* 2 = OFF * 2 = OFF
* 3 = RESETTING * 3 = RESETTING
* 4 = SHUTTING_DOWN
* 5 = BOOTING
* SoftwareState: * SoftwareState:
@@ -311,7 +315,7 @@ Each ``node_info`` contains the following:
.. code-block:: .. code-block::
[ [
hardware_state (0=none, 1=ON, 2=OFF, 3=RESETTING) hardware_state (0=none, 1=ON, 2=OFF, 3=RESETTING, 4=SHUTTING_DOWN, 5=BOOTING)
software_state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED) software_state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED)
file_system_state (0=none, 1=GOOD, 2=CORRUPT, 3=DESTROYED, 4=REPAIRING, 5=RESTORING) file_system_state (0=none, 1=GOOD, 2=CORRUPT, 3=DESTROYED, 4=REPAIRING, 5=RESTORING)
service1_state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED) service1_state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED)