pub async fn reconcile_assignment<P>(
provider: &P,
ip_id: &str,
target: &FloatingIpTarget,
) -> Result<FloatingIpAssignOutcome, Error>where
P: FloatingIpProvider + ?Sized,Expand description
Idempotent, zone-checked core shared by every provider adapter and by
on_ingress_owner_changed.
- Fetch the floating IP’s current home zone + attachment.
- Refuse a cross-zone move (Hetzner/OVH/Vultr all physically cannot move an IP outside its mobility zone — W267 §Tier 1) before issuing any reassign call.
- If the current attachment already equals
target, returnreassigned: falsewithout callingFloatingIpProvider::reassign— the ownership-flip fixture this ticket verifies against relies on this short-circuit to prove “re-applying the same owner drives ZERO reassign calls.” - Otherwise call
FloatingIpProvider::reassignand reportreassigned: true.
Generic over ?Sized so it accepts both a concrete adapter and a
&dyn FloatingIpProvider (R859-F3): cloud’s blanket FloatingIpEnvoy
impl covers dyn FloatingIpProvider itself, and a &dyn cannot be
re-unsized to &dyn under a Sized bound.