def is_ha_router(router):
 try:
  requested_router_type = router.extra_attributes.ha
 except AttributeError:
  requested_router_type = router.get('ha')
 if validators.is_attr_set(requested_router_type):
  return requested_router_type
 return cfg.CONF.l3_ha

def is_ha_router ( router ) : try : requested_router_type = router . extra_attributes . ha except AttributeError : requested_router_type = router . get ( 'ha' ) if validators . is_attr_set ( requested_router_type ) : return requested_router_type return cfg . CONF . l3_ha
return true if router to be handled is ha .