Commit 95b8be32 authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

fix(fm-client): read FM's federated zone format, list zones with no partner zones

get_zone and list_zones validated FM's answer straight into Zone, which
needs ref, name, kind and state, while FM returns zone_id, partner_op_id
and supported_apis. Every partner zone raised a ValidationError, so
has_zone threw and deploys never reached FM. The client now reads FM's
format and maps it to a Zone with kind federation_business, and marks
provider as "federation" so a partner zone doesn't claim to be ours.

ListZonesUseCase only assigned filtered_fm_zones when FM returned zones,
so an empty answer raised UnboundLocalError and GET /internal/zones
returned 500.
parent cf3784d9
Loading
Loading
Loading
Loading