-
Notifications
You must be signed in to change notification settings - Fork 1.5k
List instances and List revision should use ST Id not name #9643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Avisiktapatra
wants to merge
42
commits into
Azure:main
Choose a base branch
from
manaswita-chichili:avpatra/RevisionInstancesFix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
ebdc33b
List instances and List revision should use ST Id not name
cf07a53
Merge branch 'Azure:main' into avpatra/RevisionInstancesFix
Avisiktapatra 9e85d13
Add history
62b8b53
Merge branch 'avpatra/RevisionInstancesFix' of https://github.com/man…
94c1821
upgrade version
82cb3e5
Fix the version sequence in history file
2845dd8
fix review comments
9630b19
Update src/workload-orchestration/azext_workload_orchestration/aaz/la…
Avisiktapatra dafc862
Update src/workload-orchestration/azext_workload_orchestration/aaz/la…
Avisiktapatra 61d4b59
feat: add az workload-orchestration support create-bundle command
99054c4
improve: enhance bundle data + RBAC errors + disk check
aca7edb
feat(support-bundle): add retry, timeout, namespace validation, resou…
ee91522
docs: update HISTORY.rst and clean up conftest for PR readiness
2ba769c
refactor: restructure support bundle into support/ subpackage
be71134
docs: expand README with complete guide for adding checks, collectors…
d75e8eb
chore: remove unused imports (tempfile, json, os)
03040c6
chore: remove unused get_enum_type import from _params.py
98dd6a7
feat: add --bundle-name param and network config collection
e4146a2
feat: add checks/summary.json with consolidated check results
1ed5bec
fix: keep support/ at extension root, add AAZ mocks to conftest
1ee66d3
chore: bump version to 6.0.0 for support bundle feature
ce3d176
refactor: remove health summary (HEALTHY/DEGRADED/CRITICAL) markers
e859d1d
chore: remove accidentally committed zip file
e8e58f2
fix: restore health summary, only remove HEALTHY/DEGRADED/CRITICAL la…
bac7b5a
feat: add comprehensive SUMMARY.md to bundle root
337b4d7
refactor: organize resources into per-namespace subdirectories
243674d
feat: add Arc dependency check, WO services/deployments check, cluste…
18023b9
Merge branch 'Azure:main' into avpatra/RevisionInstancesFix
manaswita-chichili 92ec4f7
Validate site id for context site reference and config link
manaswita-chichili f171502
Merge branch 'avpatra/RevisionInstancesFix' of https://github.com/man…
manaswita-chichili e13ab16
Simply code to use same validation helper class
manaswita-chichili 3d051a2
resolve review comments
3791191
version upgrade
b541e54
Merge branch 'Azure:main' into avpatra/RevisionInstancesFix
manaswita-chichili dd79fb1
add chnges
38371c4
version chnge
6100dff
Add new command for capability upates
Nishad94 6bcad89
Merge pull request #4 from manaswita-chichili/ndawkhar/cap-deletion-st
Avisiktapatra 3c9b7c0
merge: add support bundle feature into combined CLI release
75eb01d
fix: resolve all pylint warnings for CI pipeline
9724729
fix: resolve all pylint and flake8 lint errors for CI
aa2528b
fix: resolve ALL remaining pylint errors for CI
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
79 changes: 79 additions & 0 deletions
79
...ion/azext_workload_orchestration/aaz/latest/workload_orchestration/_resource_validator.py
This file contains hidden or 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,79 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from azure.cli.core.aaz import * | ||
| from azure.cli.core.azclierror import ValidationError | ||
|
|
||
|
|
||
| class ValidateResourceExists(AAZHttpOperation): | ||
| """Validates that an ARM resource exists by making a GET request to its resource ID.""" | ||
| CLIENT_TYPE = "MgmtClient" | ||
|
|
||
| def __init__(self, ctx, resource_id, resource_label="Resource"): | ||
| super().__init__(ctx) | ||
| self._resource_id = str(resource_id) | ||
| self._resource_label = resource_label | ||
|
|
||
| def __call__(self, *args, **kwargs): | ||
| request = self.make_request() | ||
| session = self.client.send_request(request=request, stream=False, **kwargs) | ||
| if session.http_response.status_code == 404: | ||
| raise ValidationError( | ||
| f"{self._resource_label} not found. The resource with ID '{self._resource_id}' does not exist. " | ||
| f"Please provide a valid {self._resource_label.lower()} resource ID." | ||
| ) | ||
| if session.http_response.status_code != 200: | ||
| raise ValidationError( | ||
| f"Failed to validate {self._resource_label.lower()} existence for ID '{self._resource_id}'. " | ||
| f"Received status code: {session.http_response.status_code}" | ||
| ) | ||
|
|
||
| @property | ||
| def url(self): | ||
| return self.client.format_url( | ||
| "{resourceId}", | ||
| **self.url_parameters | ||
| ) | ||
|
|
||
| @property | ||
| def method(self): | ||
| return "GET" | ||
|
|
||
| @property | ||
| def error_format(self): | ||
| return "MgmtErrorFormat" | ||
|
|
||
| @property | ||
| def url_parameters(self): | ||
| parameters = { | ||
| **self.serialize_url_param( | ||
| "resourceId", self._resource_id, | ||
| required=True, | ||
| skip_quote=True, | ||
| ), | ||
| } | ||
| return parameters | ||
|
|
||
| @property | ||
| def query_parameters(self): | ||
| parameters = { | ||
| **self.serialize_query_param( | ||
| "api-version", "2025-06-01", | ||
| required=True, | ||
| ), | ||
| } | ||
| return parameters | ||
|
|
||
| @property | ||
| def header_parameters(self): | ||
| parameters = { | ||
| **self.serialize_header_param( | ||
| "Accept", "application/json", | ||
| ), | ||
| } | ||
| return parameters |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.