-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connection String and api-key authentication support (#566)
* Regenerate rest api client * Workspace connection params refactoring * New test recordings * Remove redundant recording processor * Add pytest configs for better dev experience * Fix pytest.ini * Add script to clear env vars for dev convenience * Linting and small fixes * Re-record list jobs test * Further clean-up and linting * Small renaming * Add return type annotations * Update env var for live tests * Documentation and clean-up * Add support for connection string * Remove QUANTUM_API_KEY env var * Remove QUANTUM_API_KEY env var * Update unit tests * Logic to get current primary key * Finish test for connection string * Connection string auth test recording * Remove unnecessary method * Upgrade minor version * Fixes the order of property creation * Add pytest marks * Fix order of environment variable loading * Remove unused code * Better naming for arm and quantum endpoint urls * Normalize endpoint urls * Fix cirq test cases * Fix qiskit test cases
- Loading branch information
Showing
8 changed files
with
366 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
azure-quantum/tests/unit/recordings/test_workspace_auth_connection_string_api_key.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- azsdk-python-quantum/0.0.1.0a1 Python/3.9.18 (Windows-10-10.0.22631-SP0) | ||
x-ms-quantum-api-key: | ||
- PLACEHOLDER | ||
method: GET | ||
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/providerStatus?api-version=2022-09-12-preview&test-sequence-id=1 | ||
response: | ||
body: | ||
string: '{"value": [{"id": "microsoft-elements", "currentAvailability": "Available", | ||
"targets": [{"id": "microsoft.dft", "currentAvailability": "Available", "averageQueueTime": | ||
0, "statusPage": null}]}, {"id": "ionq", "currentAvailability": "Degraded", | ||
"targets": [{"id": "ionq.qpu", "currentAvailability": "Available", "averageQueueTime": | ||
465550, "statusPage": "https://status.ionq.co"}, {"id": "ionq.qpu.aria-1", | ||
"currentAvailability": "Available", "averageQueueTime": 763856, "statusPage": | ||
"https://status.ionq.co"}, {"id": "ionq.qpu.aria-2", "currentAvailability": | ||
"Unavailable", "averageQueueTime": 431102, "statusPage": "https://status.ionq.co"}, | ||
{"id": "ionq.simulator", "currentAvailability": "Available", "averageQueueTime": | ||
5, "statusPage": "https://status.ionq.co"}]}, {"id": "microsoft-qc", "currentAvailability": | ||
"Available", "targets": [{"id": "microsoft.estimator", "currentAvailability": | ||
"Available", "averageQueueTime": 0, "statusPage": null}]}, {"id": "pasqal", | ||
"currentAvailability": "Degraded", "targets": [{"id": "pasqal.sim.emu-tn", | ||
"currentAvailability": "Available", "averageQueueTime": 0, "statusPage": "https://pasqal.com"}, | ||
{"id": "pasqal.qpu.fresnel", "currentAvailability": "Degraded", "averageQueueTime": | ||
0, "statusPage": "https://pasqal.com"}]}, {"id": "quantinuum", "currentAvailability": | ||
"Degraded", "targets": [{"id": "quantinuum.qpu.h1-1", "currentAvailability": | ||
"Unavailable", "averageQueueTime": 0, "statusPage": "https://www.quantinuum.com/hardware/h1"}, | ||
{"id": "quantinuum.sim.h1-1sc", "currentAvailability": "Available", "averageQueueTime": | ||
0, "statusPage": "https://www.quantinuum.com/hardware/h1"}, {"id": "quantinuum.qpu.h1-2", | ||
"currentAvailability": "Unavailable", "averageQueueTime": 0, "statusPage": | ||
"https://www.quantinuum.com/hardware/h1"}, {"id": "quantinuum.sim.h1-2sc", | ||
"currentAvailability": "Unavailable", "averageQueueTime": 0, "statusPage": | ||
"https://www.quantinuum.com/hardware/h1"}, {"id": "quantinuum.sim.h1-1e", | ||
"currentAvailability": "Available", "averageQueueTime": 16, "statusPage": | ||
"https://www.quantinuum.com/hardware/h1"}, {"id": "quantinuum.sim.h1-2e", | ||
"currentAvailability": "Unavailable", "averageQueueTime": 0, "statusPage": | ||
"https://www.quantinuum.com/hardware/h1"}]}, {"id": "rigetti", "currentAvailability": | ||
"Degraded", "targets": [{"id": "rigetti.sim.qvm", "currentAvailability": "Available", | ||
"averageQueueTime": 5, "statusPage": "https://rigetti.statuspage.io/"}, {"id": | ||
"rigetti.qpu.aspen-m-3", "currentAvailability": "Unavailable", "averageQueueTime": | ||
0, "statusPage": null}, {"id": "rigetti.qpu.ankaa-9q-1", "currentAvailability": | ||
"Available", "averageQueueTime": 5, "statusPage": "https://rigetti.statuspage.io/"}, | ||
{"id": "rigetti.qpu.ankaa-2", "currentAvailability": "Available", "averageQueueTime": | ||
5, "statusPage": "https://rigetti.statuspage.io/"}]}], "nextLink": null}' | ||
headers: | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '2' | ||
content-type: | ||
- application/json; charset=utf-8 | ||
transfer-encoding: | ||
- chunked | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
Oops, something went wrong.