Context
PR LeanerCloud/cloud-commitments-cli#1515 (closes LeanerCloud/cloud-commitments-cli#596) adds the Azure RI exchange backend endpoints:
POST /api/ri-exchange/azure-instances/compatible-offerings (view:purchases)
POST /api/ri-exchange/azure-instances/exchange (execute:ri-exchange)
The React frontend needs to wire these into the existing Azure exchangeable-RIs list view (parity with the AWS EC2 RI exchange flow: pick source reservations, pick target SKU/region/term, preview the priced quote, confirm max_payment_due + currency, execute).
Scope
- Add a "find compatible offerings" step after selecting source reservation(s) from the existing Azure exchangeable-RIs list.
- Surface the preview (net payable, refunds total, purchases total, policy errors) before allowing execute.
- Require an explicit max_payment_due + currency input before the execute call, matching the backend's mandatory guardrail.
- Surface 422 guardrail rejections (cap exceeded, policy errors, currency mismatch, missing net payable) as user-facing messages, not generic errors.
Notes
Context
PR LeanerCloud/cloud-commitments-cli#1515 (closes LeanerCloud/cloud-commitments-cli#596) adds the Azure RI exchange backend endpoints:
POST /api/ri-exchange/azure-instances/compatible-offerings(view:purchases)POST /api/ri-exchange/azure-instances/exchange(execute:ri-exchange)The React frontend needs to wire these into the existing Azure exchangeable-RIs list view (parity with the AWS EC2 RI exchange flow: pick source reservations, pick target SKU/region/term, preview the priced quote, confirm max_payment_due + currency, execute).
Scope
Notes
AzureCompatibleOfferingsResponse/AzureExecuteExchangeResponseininternal/api/handler_ri_exchange.go.