Skip to content

Commit 7c0301d

Browse files
Modular Chassis - APIs for midplane monitoring (sonic-net#148)
- Enhance ModuleBase with new APIs to get midplane-ip-address and check-reachability - Enhance ChassisBase with new API to initialize the midplane for modular chassis
1 parent 6f7d8a0 commit 7c0301d

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

sonic_platform_base/chassis_base.py

+14
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,20 @@ def is_modular_chassis(self):
155155
"""
156156
return False
157157

158+
def init_midplane_switch(self):
159+
"""
160+
Initializes the midplane functionality of the modular chassis. For
161+
example, any validation of midplane, populating any lookup tables etc
162+
can be done here. The expectation is that the required kernel modules,
163+
ip-address assignment etc are done before the pmon, database dockers
164+
are up.
165+
166+
Returns:
167+
A bool value, should return True if the midplane initialized
168+
successfully.
169+
"""
170+
return NotImplementedError
171+
158172
##############################################
159173
# Component methods
160174
##############################################

sonic_platform_base/module_base.py

+26
Original file line numberDiff line numberDiff line change
@@ -442,3 +442,29 @@ def get_change_event(self, timeout=0):
442442
"""
443443
raise NotImplementedError
444444

445+
##############################################
446+
# Midplane methods for modular chassis
447+
##############################################
448+
def get_midplane_ip(self):
449+
"""
450+
Retrieves the midplane IP-address of the module in a modular chassis
451+
When called from the Supervisor, the module could represent the
452+
line-card and return the midplane IP-address of the line-card.
453+
When called from the line-card, the module will represent the
454+
Supervisor and return its midplane IP-address.
455+
456+
Returns:
457+
A string, the IP-address of the module reachable over the midplane
458+
459+
"""
460+
return NotImplementedError
461+
462+
def is_midplane_reachable(self):
463+
"""
464+
Retrieves the reachability status of the module from the Supervisor or
465+
of the Supervisor from the module via the midplane of the modular chassis
466+
467+
Returns:
468+
A bool value, should return True if module is reachable via midplane
469+
"""
470+
return NotImplementedError

0 commit comments

Comments
 (0)