def _get_mgmtif_mo_dn(handle): """ Internal method to get the mgmt_if dn based on the type of platform """ if handle.platform == IMC_PLATFORM.TYPE_CLASSIC: return ("sys/rack-unit-1/mgmt/if-1") elif handle.platform == IMC_PLATFORM.TYPE_MODULAR: return ("sys/chassis-1/if-1") else: raise ImcValidationException("Invalid platform detected:%s" % handle.platform)
def _get_comm_mo_dn(handle, server_id=1): """ Internal method to get the IPMI mo's parent_dn based \ on the type of platform """ from imcsdk.imcexception import ImcValidationException if handle.platform == IMC_PLATFORM.TYPE_CLASSIC: return ("sys/svc-ext") elif handle.platform == IMC_PLATFORM.TYPE_MODULAR: return (get_server_dn(handle, server_id) + "/svc-ext") else: raise ImcValidationException("Invalid platform detected:%s" % handle.platform)