Skip to content

Commit 75fe8cc

Browse files
python: reformat using black
Code cannot currently be submitted to this repo because it fails in the unit-test phase. Attempt to reformat the code using `black` to hopefully make pycodestyle happier. Signed-off-by: Patrick Williams <[email protected]> Change-Id: I17aa506471ceade224bcab5b2fa0dc8cd7a88c0a
1 parent 77b241c commit 75fe8cc

27 files changed

+4474
-2680
lines changed

configs/Barreleye.py

+639-362
Large diffs are not rendered by default.

configs/Firestone.py

+563-347
Large diffs are not rendered by default.

configs/Garrison.py

+563-347
Large diffs are not rendered by default.

configs/Lanyang.py

+581-302
Large diffs are not rendered by default.

configs/Palmetto.py

+79-78
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,92 @@
1-
## System states
2-
## state can change to next state in 2 ways:
3-
## - a process emits a GotoSystemState signal with state name to goto
4-
## - objects specified in EXIT_STATE_DEPEND have started
1+
# System states
2+
# state can change to next state in 2 ways:
3+
# - a process emits a GotoSystemState signal with state name to goto
4+
# - objects specified in EXIT_STATE_DEPEND have started
55
SYSTEM_STATES = [
6-
'BASE_APPS',
7-
'BMC_STARTING',
8-
'BMC_READY',
9-
'HOST_POWERING_ON',
10-
'HOST_POWERED_ON',
11-
'HOST_BOOTING',
12-
'HOST_BOOTED',
13-
'HOST_POWERED_OFF',
6+
"BASE_APPS",
7+
"BMC_STARTING",
8+
"BMC_READY",
9+
"HOST_POWERING_ON",
10+
"HOST_POWERED_ON",
11+
"HOST_BOOTING",
12+
"HOST_BOOTED",
13+
"HOST_POWERED_OFF",
1414
]
1515

1616
EXIT_STATE_DEPEND = {
17-
'BASE_APPS' : {
18-
'/org/openbmc/sensors': 0,
19-
},
20-
'BMC_STARTING' : {
21-
'/org/openbmc/control/chassis0': 0,
22-
'/org/openbmc/control/power0' : 0,
23-
'/org/openbmc/control/led/identify' : 0,
24-
'/org/openbmc/control/host0' : 0,
25-
'/org/openbmc/control/flash/bios' : 0,
26-
}
17+
"BASE_APPS": {
18+
"/org/openbmc/sensors": 0,
19+
},
20+
"BMC_STARTING": {
21+
"/org/openbmc/control/chassis0": 0,
22+
"/org/openbmc/control/power0": 0,
23+
"/org/openbmc/control/led/identify": 0,
24+
"/org/openbmc/control/host0": 0,
25+
"/org/openbmc/control/flash/bios": 0,
26+
},
2727
}
2828

2929
ID_LOOKUP = {
30-
'FRU' : {
31-
0x0d : '<inventory_root>/system/chassis',
32-
0x34 : '<inventory_root>/system/chassis/motherboard',
33-
0x01 : '<inventory_root>/system/chassis/motherboard/cpu',
34-
0x02 : '<inventory_root>/system/chassis/motherboard/membuf',
35-
0x03 : '<inventory_root>/system/chassis/motherboard/dimm0',
36-
0x04 : '<inventory_root>/system/chassis/motherboard/dimm1',
37-
0x05 : '<inventory_root>/system/chassis/motherboard/dimm2',
38-
0x06 : '<inventory_root>/system/chassis/motherboard/dimm3',
39-
0x35 : '<inventory_root>/system',
40-
},
41-
'FRU_STR' : {
42-
'PRODUCT_15' : '<inventory_root>/system',
43-
'CHASSIS_2' : '<inventory_root>/system/chassis',
44-
'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu',
45-
'BOARD_2' : '<inventory_root>/system/chassis/motherboard/membuf',
46-
'BOARD_14' : '<inventory_root>/system/chassis/motherboard',
47-
'PRODUCT_3' : '<inventory_root>/system/chassis/motherboard/dimm0',
48-
'PRODUCT_4' : '<inventory_root>/system/chassis/motherboard/dimm1',
49-
'PRODUCT_5' : '<inventory_root>/system/chassis/motherboard/dimm2',
50-
'PRODUCT_6' : '<inventory_root>/system/chassis/motherboard/dimm3',
51-
},
52-
'SENSOR' : {
53-
0x34 : '<inventory_root>/system/chassis/motherboard',
54-
0x37 : '<inventory_root>/system/chassis/motherboard/refclock',
55-
0x38 : '<inventory_root>/system/chassis/motherboard/pcieclock',
56-
0x39 : '<inventory_root>/system/chassis/motherboard/todclock',
57-
0x3A : '<inventory_root>/system/chassis/apss',
58-
0x2f : '<inventory_root>/system/chassis/motherboard/cpu',
59-
0x22 : '<inventory_root>/system/chassis/motherboard/cpu/core1',
60-
0x23 : '<inventory_root>/system/chassis/motherboard/cpu/core2',
61-
0x24 : '<inventory_root>/system/chassis/motherboard/cpu/core3',
62-
0x25 : '<inventory_root>/system/chassis/motherboard/cpu/core4',
63-
0x26 : '<inventory_root>/system/chassis/motherboard/cpu/core5',
64-
0x27 : '<inventory_root>/system/chassis/motherboard/cpu/core6',
65-
0x28 : '<inventory_root>/system/chassis/motherboard/cpu/core9',
66-
0x29 : '<inventory_root>/system/chassis/motherboard/cpu/core10',
67-
0x2a : '<inventory_root>/system/chassis/motherboard/cpu/core11',
68-
0x2b : '<inventory_root>/system/chassis/motherboard/cpu/core12',
69-
0x2c : '<inventory_root>/system/chassis/motherboard/cpu/core13',
70-
0x2d : '<inventory_root>/system/chassis/motherboard/cpu/core14',
71-
0x2e : '<inventory_root>/system/chassis/motherboard/membuf',
72-
0x1e : '<inventory_root>/system/chassis/motherboard/dimm0',
73-
0x1f : '<inventory_root>/system/chassis/motherboard/dimm1',
74-
0x20 : '<inventory_root>/system/chassis/motherboard/dimm2',
75-
0x21 : '<inventory_root>/system/chassis/motherboard/dimm3',
76-
0x09 : '/org/openbmc/sensors/host/BootCount',
77-
0x05 : '/org/openbmc/sensors/host/BootProgress',
78-
0x32 : '/org/openbmc/sensors/host/OperatingSystemStatus',
79-
},
80-
'GPIO_PRESENT' : {
81-
'SLOT0_PRESENT' : '<inventory_root>/system/chassis/motherboard/pciecard_x16',
82-
'SLOT1_PRESENT' : '<inventory_root>/system/chassis/motherboard/pciecard_x8',
83-
}
30+
"FRU": {
31+
0x0D: "<inventory_root>/system/chassis",
32+
0x34: "<inventory_root>/system/chassis/motherboard",
33+
0x01: "<inventory_root>/system/chassis/motherboard/cpu",
34+
0x02: "<inventory_root>/system/chassis/motherboard/membuf",
35+
0x03: "<inventory_root>/system/chassis/motherboard/dimm0",
36+
0x04: "<inventory_root>/system/chassis/motherboard/dimm1",
37+
0x05: "<inventory_root>/system/chassis/motherboard/dimm2",
38+
0x06: "<inventory_root>/system/chassis/motherboard/dimm3",
39+
0x35: "<inventory_root>/system",
40+
},
41+
"FRU_STR": {
42+
"PRODUCT_15": "<inventory_root>/system",
43+
"CHASSIS_2": "<inventory_root>/system/chassis",
44+
"BOARD_1": "<inventory_root>/system/chassis/motherboard/cpu",
45+
"BOARD_2": "<inventory_root>/system/chassis/motherboard/membuf",
46+
"BOARD_14": "<inventory_root>/system/chassis/motherboard",
47+
"PRODUCT_3": "<inventory_root>/system/chassis/motherboard/dimm0",
48+
"PRODUCT_4": "<inventory_root>/system/chassis/motherboard/dimm1",
49+
"PRODUCT_5": "<inventory_root>/system/chassis/motherboard/dimm2",
50+
"PRODUCT_6": "<inventory_root>/system/chassis/motherboard/dimm3",
51+
},
52+
"SENSOR": {
53+
0x34: "<inventory_root>/system/chassis/motherboard",
54+
0x37: "<inventory_root>/system/chassis/motherboard/refclock",
55+
0x38: "<inventory_root>/system/chassis/motherboard/pcieclock",
56+
0x39: "<inventory_root>/system/chassis/motherboard/todclock",
57+
0x3A: "<inventory_root>/system/chassis/apss",
58+
0x2F: "<inventory_root>/system/chassis/motherboard/cpu",
59+
0x22: "<inventory_root>/system/chassis/motherboard/cpu/core1",
60+
0x23: "<inventory_root>/system/chassis/motherboard/cpu/core2",
61+
0x24: "<inventory_root>/system/chassis/motherboard/cpu/core3",
62+
0x25: "<inventory_root>/system/chassis/motherboard/cpu/core4",
63+
0x26: "<inventory_root>/system/chassis/motherboard/cpu/core5",
64+
0x27: "<inventory_root>/system/chassis/motherboard/cpu/core6",
65+
0x28: "<inventory_root>/system/chassis/motherboard/cpu/core9",
66+
0x29: "<inventory_root>/system/chassis/motherboard/cpu/core10",
67+
0x2A: "<inventory_root>/system/chassis/motherboard/cpu/core11",
68+
0x2B: "<inventory_root>/system/chassis/motherboard/cpu/core12",
69+
0x2C: "<inventory_root>/system/chassis/motherboard/cpu/core13",
70+
0x2D: "<inventory_root>/system/chassis/motherboard/cpu/core14",
71+
0x2E: "<inventory_root>/system/chassis/motherboard/membuf",
72+
0x1E: "<inventory_root>/system/chassis/motherboard/dimm0",
73+
0x1F: "<inventory_root>/system/chassis/motherboard/dimm1",
74+
0x20: "<inventory_root>/system/chassis/motherboard/dimm2",
75+
0x21: "<inventory_root>/system/chassis/motherboard/dimm3",
76+
0x09: "/org/openbmc/sensors/host/BootCount",
77+
0x05: "/org/openbmc/sensors/host/BootProgress",
78+
0x32: "/org/openbmc/sensors/host/OperatingSystemStatus",
79+
},
80+
"GPIO_PRESENT": {
81+
"SLOT0_PRESENT":
82+
"<inventory_root>/system/chassis/motherboard/pciecard_x16",
83+
"SLOT1_PRESENT":
84+
"<inventory_root>/system/chassis/motherboard/pciecard_x8",
85+
},
8486
}
8587

8688
# Miscellaneous non-poll sensor with system specific properties.
8789
# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
88-
MISC_SENSORS = {
89-
}
90+
MISC_SENSORS = {}
9091

9192
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4

0 commit comments

Comments
 (0)