diff --git a/sonic_platform_base/chassis_base.py b/sonic_platform_base/chassis_base.py index 864d6541bb75..d5097c76fdbe 100644 --- a/sonic_platform_base/chassis_base.py +++ b/sonic_platform_base/chassis_base.py @@ -155,6 +155,20 @@ def is_modular_chassis(self): """ return False + def init_midplane_switch(self): + """ + Initializes the midplane functionality of the modular chassis. For + example, any validation of midplane, populating any lookup tables etc + can be done here. The expectation is that the required kernel modules, + ip-address assignment etc are done before the pmon, database dockers + are up. + + Returns: + A bool value, should return True if the midplane initialized + successfully. + """ + return NotImplementedError + ############################################## # Component methods ############################################## diff --git a/sonic_platform_base/module_base.py b/sonic_platform_base/module_base.py index 88011dc07cda..45c0068cb291 100644 --- a/sonic_platform_base/module_base.py +++ b/sonic_platform_base/module_base.py @@ -442,3 +442,29 @@ def get_change_event(self, timeout=0): """ raise NotImplementedError + ############################################## + # Midplane methods for modular chassis + ############################################## + def get_midplane_ip(self): + """ + Retrieves the midplane IP-address of the module in a modular chassis + When called from the Supervisor, the module could represent the + line-card and return the midplane IP-address of the line-card. + When called from the line-card, the module will represent the + Supervisor and return its midplane IP-address. + + Returns: + A string, the IP-address of the module reachable over the midplane + + """ + return NotImplementedError + + def is_midplane_reachable(self): + """ + Retrieves the reachability status of the module from the Supervisor or + of the Supervisor from the module via the midplane of the modular chassis + + Returns: + A bool value, should return True if module is reachable via midplane + """ + return NotImplementedError