forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Thermalctld] Update thermal info to CHASSIS_STATE_DB (sonic-net#101)
Enhance thermalctld to write to chassis state-DB on a modular chassis HLD: sonic-net/SONiC#646 In a modular chassis, the thermal information from all line-cards will be updated to the chassis state-DB in the control-card. Additionally, minimum and maximum temperatures will be recorded. The fan control algorithm used by certain vendors will require this information.
- Loading branch information
1 parent
05c79de
commit 8c2a5cc
Showing
4 changed files
with
113 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
STATE_DB = '' | ||
|
||
CHASSIS_STATE_DB = '' | ||
|
||
class Table: | ||
def __init__(self, db, table_name): | ||
self.table_name = table_name | ||
self.mock_dict = {} | ||
|
||
def _del(self, key): | ||
del self.mock_dict[key] | ||
pass | ||
|
||
def set(self, key, fvs): | ||
self.mock_dict[key] = fvs.fv_dict | ||
pass | ||
|
||
def get(self, key): | ||
if key in self.mock_dict: | ||
return self.mock_dict[key] | ||
return None | ||
|
||
def get_size(self): | ||
return (len(self.mock_dict)) | ||
|
||
class FieldValuePairs: | ||
def __init__(self, fvs): | ||
pass | ||
def __init__(self, fvs): | ||
self.fv_dict = dict(fvs) | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters