File tree 3 files changed +30
-12
lines changed
3 files changed +30
-12
lines changed Original file line number Diff line number Diff line change @@ -28,34 +28,42 @@ class ChassisBase(device_base.DeviceBase):
28
28
29
29
# List of ComponentBase-derived objects representing all components
30
30
# available on the chassis
31
- _component_list = []
31
+ _component_list = None
32
32
33
33
# List of ModuleBase-derived objects representing all modules
34
34
# available on the chassis (for use with modular chassis)
35
- _module_list = []
35
+ _module_list = None
36
36
37
37
# List of FanBase-derived objects representing all fans
38
38
# available on the chassis
39
- _fan_list = []
39
+ _fan_list = None
40
40
41
41
# List of PsuBase-derived objects representing all power supply units
42
42
# available on the chassis
43
- _psu_list = []
43
+ _psu_list = None
44
44
45
45
# List of ThermalBase-derived objects representing all thermals
46
46
# available on the chassis
47
- _thermal_list = []
47
+ _thermal_list = None
48
48
49
49
# List of SfpBase-derived objects representing all sfps
50
50
# available on the chassis
51
- _sfp_list = []
51
+ _sfp_list = None
52
52
53
53
# Object derived from WatchdogBase for interacting with hardware watchdog
54
54
_watchdog = None
55
55
56
56
# Object derived from eeprom_tlvinfo.TlvInfoDecoder indicating the eeprom on the chassis
57
57
_eeprom = None
58
58
59
+ def __init__ (self ):
60
+ self ._component_list = []
61
+ self ._module_list = []
62
+ self ._fan_list = []
63
+ self ._psu_list = []
64
+ self ._thermal_list = []
65
+ self ._sfp_list = []
66
+
59
67
def get_base_mac (self ):
60
68
"""
61
69
Retrieves the base MAC address for the chassis
Original file line number Diff line number Diff line change @@ -19,23 +19,30 @@ class ModuleBase(device_base.DeviceBase):
19
19
20
20
# List of ComponentBase-derived objects representing all components
21
21
# available on the module
22
- _component_list = []
22
+ _component_list = None
23
23
24
24
# List of FanBase-derived objects representing all fans
25
25
# available on the module
26
- _fan_list = []
26
+ _fan_list = None
27
27
28
28
# List of PsuBase-derived objects representing all power supply units
29
29
# available on the module
30
- _psu_list = []
30
+ _psu_list = None
31
31
32
32
# List of ThermalBase-derived objects representing all thermals
33
33
# available on the module
34
- _thermal_list = []
34
+ _thermal_list = None
35
35
36
36
# List of SfpBase-derived objects representing all sfps
37
37
# available on the module
38
- _sfp_list = []
38
+ _sfp_list = None
39
+
40
+ def __init__ (self ):
41
+ self ._component_list = []
42
+ self ._fan_list = []
43
+ self ._psu_list = []
44
+ self ._thermal_list = []
45
+ self ._sfp_list = []
39
46
40
47
def get_base_mac (self ):
41
48
"""
Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ class PsuBase(device_base.DeviceBase):
23
23
24
24
# List of FanBase-derived objects representing all fans
25
25
# available on the PSU
26
- _fan_list = []
26
+ _fan_list = None
27
+
28
+ def __init__ (self ):
29
+ self ._fan_list = []
27
30
28
31
def get_num_fans (self ):
29
32
"""
You can’t perform that action at this time.
0 commit comments