Commit ba7956e
committed
Node refactoring
* Add a base class with abstract methods that every device has to
implement
* Rename init_node to _detect_device_type() because that is what it is
* Renamed init_boot_time to init_dev_data because it captures better
what we're trying to do.
* Add _init_rest to test connectivity/auth
* Have all derived Device classes implement init_dev_data() rather than
having half of them do init_node, and the others do init_boot_time.
* Rename all internal functions to start with _. Only run, post_commands
and initialize ought to be called from outside the class.
* Got rid of the _status field because its only purpose was to determine
if a device's type was unknown and so we needed to continue to run the
automatic device type determination logic.
* Added substantial commentary at the start of the device class to
explain the workings of this class, its assumptions and its
weaknesses.
* Get rid of sigend, which was used to catch and terminate the Node
runner when the user hit Ctrl-C. Ctrl-C driven termination is handled
elsewhere now.
* Add docstrings to all public class methods.
Signed-off-by: Dinesh Dutt <[email protected]>1 parent 5f9d879 commit ba7956e
2 files changed
+801
-644
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 123 | | |
128 | 124 | | |
129 | 125 | | |
| |||
0 commit comments