-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{ARM} Bump azure-mgmt-resource SDK from 10.1.0 to 10.2.0 #14678
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
Changes from 42 commits
00b9235
ab16df0
03436bc
7d98b1f
06f6ec5
125406f
a497390
e43a151
adab2d2
37c8522
ef1e3f2
50e7c9c
68f47fd
7f184f8
bf962b1
4b90edd
4f39504
2e04882
7be894f
87ccc2e
4f1348c
9eb09f2
44362eb
cf7b97a
fb78986
504fda7
8f21f7c
e73132c
e8153f8
eac8414
74666fe
0e28ed8
583352f
a6344b8
2b43c88
045b6e1
9b3fa34
d737883
e684558
33836f6
970f33a
11c0d1d
7bdde2b
94d334a
49aa80b
40b76f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1164,11 +1164,11 @@ def get_arm_resource_by_id(cli_ctx, arm_id, api_version=None): | |
| from azure.cli.core.parser import IncorrectUsageError | ||
| raise IncorrectUsageError('Resource type {} not found.'.format(resource_type_str)) | ||
| try: | ||
| # if the service specifies, use the default API version | ||
| api_version = rt.default_api_version | ||
| except AttributeError: | ||
| # if the service doesn't specify, use the most recent non-preview API version unless there is only a | ||
| # single API version. API versions are returned by the service in a sorted list | ||
| # Use the most recent non-preview API version unless there is only a | ||
| # single API version. API versions are returned by the service in a sorted list. | ||
| api_version = next((x for x in rt.api_versions if not x.endswith('preview')), rt.api_versions[0]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With such change, if the rp only has preview api versions, it will get an exception because you only try to get latest stable api version. But in previous design if the default version is preview version, it still can get an preview api version.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, but in fact this is how the current logic is implemented. When |
||
| except AttributeError: | ||
| err = "No API versions found for resource type '{}'." | ||
| raise CLIError(err.format(resource_type_str)) | ||
|
|
||
| return client.resources.get_by_id(arm_id, api_version) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should be reviewed by more folks.