|
5 | 5 | # Contact email: ian@botts-inc.com |
6 | 6 | # ============================================================================== |
7 | 7 |
|
| 8 | +from conSys4Py.con_sys_api import ConnectedSystemsRequestBuilder, ConnectedSystemAPIRequest |
| 9 | + |
| 10 | +from oshconnect import Node |
| 11 | +from oshconnect.datasource.datasource import DataSource |
| 12 | +from oshconnect.styling.styling import Styling |
| 13 | +from oshconnect.timemanagement.timemanagement import TimeManagement |
| 14 | +from oshconnect.datastore.datastore import DataStore |
| 15 | + |
| 16 | + |
8 | 17 | class OSHConnect: |
9 | | - datasource: DataSourceAPI |
| 18 | + datasource: DataSource |
10 | 19 | datastore: DataStoreAPI |
11 | 20 | styling: StylingAPI |
12 | | - timestream: TimeStreamAPI |
| 21 | + timestream: TimeManagement |
| 22 | + _nodes: list[Node] |
| 23 | + _cs_api_builder: ConnectedSystemsRequestBuilder |
| 24 | + |
| 25 | + def __init__(self, **kwargs): |
| 26 | + if 'nodes' in kwargs: |
| 27 | + self._nodes = kwargs['nodes'] |
| 28 | + |
| 29 | + def add_node(self, node: Node): |
| 30 | + self._nodes.append(node) |
| 31 | + |
| 32 | + def remove_node(self, node_id: str): |
| 33 | + # list of nodes in our node list that do not have the id of the node we want to remove |
| 34 | + self._nodes = [node for node in self._nodes if node.get_id() != node_id] |
13 | 35 |
|
14 | 36 | def save_config(self, config: dict): |
15 | 37 | pass |
@@ -56,8 +78,8 @@ def get_visualization_recommendations(self, streams: list): |
56 | 78 | def discover_datastreams(self, streams: list): |
57 | 79 | pass |
58 | 80 |
|
59 | | - def discover_systems(self, systems: list): |
60 | | - pass |
| 81 | + def discover_systems(self): |
| 82 | + sys_list = systems.list_all_systems() |
61 | 83 |
|
62 | 84 | def discover_controlstreams(self, streams: list): |
63 | 85 | pass |
|
0 commit comments