def _get_motr_fids(util: ConsulUtil) -> HL_Fids: hax_ep: str = util.get_hax_endpoint() hax_fid: Fid = util.get_hax_fid() ha_fid: Fid = util.get_ha_fid() profiles = util.get_profiles() if not profiles: raise RuntimeError('Configuration error: no profile ' 'is found in Consul KV') return HL_Fids(hax_ep, hax_fid, ha_fid, profiles)
def _get_motr_fids(util: ConsulUtil) -> HL_Fids: try: hax_ep: str = util.get_hax_endpoint() hax_fid: Fid = util.get_hax_fid() ha_fid: Fid = util.get_ha_fid() profiles = util.get_profiles() if (not hax_ep or not hax_fid or not ha_fid or not profiles): raise HAConsistencyException('fids and profiles unavailable') except Exception as e: raise HAConsistencyException('failed to get motr fids') from e return HL_Fids(hax_ep, hax_fid, ha_fid, profiles)
def _get_motr_fids(util: ConsulUtil) -> HL_Fids: hax_ep: str = util.get_hax_endpoint() hax_fid: Fid = util.get_hax_fid() ha_fid: Fid = util.get_ha_fid() rm_fid: Fid = util.get_rm_fid() return HL_Fids(hax_ep, hax_fid, ha_fid, rm_fid)