Quantum Add 'az quantum suite-offers target list' to list provider-account targets and status - #10194
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
e69a881 to
c8de307
Compare
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR extends the quantum Azure CLI extension with a new provider-account (suite offer) target listing flow that doesn’t require an Azure Quantum workspace, and bumps the extension version/release notes accordingly.
Changes:
- Adds a new command:
az quantum suite-offers target list, wired to a newsuiteoffersoperations module and reusing the existingtransform_targetstable output. - Introduces data-plane support for provider-account status via a custom request (
cf_provider_account_status) and V2 regional base URL handling. - Updates versioning artifacts (
setup.py,HISTORY.rst) and adds unit tests covering response normalization/transform behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/quantum/setup.py | Bumps extension version to 1.0.0b21. |
| src/quantum/HISTORY.rst | Adds release notes for the new suite-offers target listing command. |
| src/quantum/azext_quantum/tests/latest/test_quantum_targets.py | Adds unit tests for provider-account target listing normalization and transformer shape. |
| src/quantum/azext_quantum/operations/suiteoffers.py | Implements list_targets and provider-account location resolution using suite offer listing. |
| src/quantum/azext_quantum/commands.py | Registers the new quantum suite-offers target list command. |
| src/quantum/azext_quantum/_params.py | Adds --provider-id and optional --location for quantum suite-offers target list. |
| src/quantum/azext_quantum/_help.py | Adds help text and examples for the new suite-offers command group. |
| src/quantum/azext_quantum/_client_factory.py | Adds base_url_v2, suite-offers mgmt client factory, and provider-account status request helper. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
c8de307 to
33c2a43
Compare
33c2a43 to
db3d9a3
Compare
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
…er targets and status
db3d9a3 to
805e7fd
Compare
| """ | ||
| creds = _get_data_credentials(cli_ctx, subscription) | ||
| client = WorkspaceClient(base_url_v2(location), creds) | ||
| request = HttpRequest( |
There was a problem hiding this comment.
is there a reason why we don't use cf_quantum_mgmt(cli_ctx).suite_offers here instead of construction http request by ourselves?
There was a problem hiding this comment.
Well the suite_offers ( SuiteOffersOperations ) only generates list_by_subscription , which is an ARM call returning the static suite-offer catalog and there is no providerStatus operation in the mgmt SDK. providerStatus is a live data-plane endpoint served from the -v2. regional host, not ARM, so the ARM-bound mgmt client can't reach it. I reuse the data-plane WorkspaceClient 's authenticated pipeline (correct regional endpoint + audience) and send the single ungenerated request. If/ when the service adds providerStatus to the Swagger, we can regenerate and drop the custom request.
There was a problem hiding this comment.
ok, so if you need to use providerStatus call to get targets availability it has different url that does not contain suiteOffers in it, see here https://github.com/Azure/azure-rest-api-specs/blob/5f39f28d8337b0a8021a7e104c9fb6994b4bcf49/specification/quantum/data-plane/Quantum/preview/2026-01-15-preview/quantum.json#L561
🤖 PR Validation —⚠️ Review suggested
Summary
Adds a new command for admin/research-lead users who operate in a provider-account (suite offer) context rather than a workspace.
az quantum suite-offers target listlists a provider account's targets and their status without requiring a workspace.What changed
az quantum suite-offers target list -p <providerId> [-l <location>]in a newsuite-offers targetcommand group.--location/-lis optional; when omitted it is resolved automatically from the provider account's suite offer..../suiteoffers/{providerId}/providerStatus) by reusing the generated client's authenticated pipeline viasend_request.1.0.0b21with a HISTORY.rst entry.