path: root/control/
diff options
authorMatthew Barth <>2019-02-18 12:23:38 -0600
committerMatthew Barth <>2019-02-18 13:01:02 -0600
commit59096e50db52d85d2252bb5c7de054bd3c8156c5 (patch)
tree5773a3401c7f9f6eb1a698594ce3c65964565d21 /control/
parent70b2e7da829b9b11f4fa4d9141383a5dbc63e6e1 (diff)
Generate zone property persist configs
Each zone object's hosted interfaces' properties can be configured to be persisted or not at compile time. Those properties configured to be persisted are set to be persisted after the initial value is set. When this value doesnt change on a system, there's no need to persist it since the initial value is compiled into the fan control application per zone. Once this value is changed and therefore persisted, upon a application restart, initially the value would be what's compiled in until its configured again to be persisted and then restored. Tested: Current property always set to what's persisted between restarts Nothing persisted when Current property doesnt change from default Change-Id: I93109730796af2058ecab0e78e612b7919886b33 Signed-off-by: Matthew Barth <>
Diffstat (limited to 'control/')
1 files changed, 9 insertions, 1 deletions
diff --git a/control/ b/control/
index e875e32..a5e4809 100755
--- a/control/
+++ b/control/
@@ -702,8 +702,16 @@ def getIfacesInZone(zone_ifaces):
props = []
for p in i['properties']:
prop = {}
- prop['name'] = str(p['name']).lower()
+ prop['name'] = p['name']
+ prop['func'] = str(p['name']).lower()
prop['type'] = parse_cpp_type(p['type'])
+ if ('persist' in p):
+ persist = p['persist']
+ if (persist is not None):
+ if (isinstance(persist, bool)):
+ prop['persist'] = 'true' if persist else 'false'
+ else:
+ prop['persist'] = 'false'
vals = []
for v in p['values']:
val = v['value']
OpenPOWER on IntegriCloud