Skip to content
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
00b9235
{Docs} Remove stale reference in README to closed issue about extensi…
dkmiller Apr 27, 2020
ab16df0
Merge remote-tracking branch 'upstream/release'
azclibot Apr 28, 2020
03436bc
Merge remote-tracking branch 'upstream/release'
azclibot Apr 30, 2020
7d98b1f
Merge remote-tracking branch 'upstream/release'
azclibot May 19, 2020
06f6ec5
Merge remote-tracking branch 'upstream/release'
azclibot Jun 2, 2020
125406f
Merge branch 'master' of git://github.com/Azure/azure-cli into dev
Jun 16, 2020
a497390
Preliminary changes made to add support for template-specs
Jun 22, 2020
e43a151
Reconfiguration
Jun 22, 2020
adab2d2
Merge remote-tracking branch 'upstream/release'
azclibot Jun 23, 2020
37c8522
Merge branch 'master' of git://github.com/Azure/azure-cli into dev
Jun 23, 2020
ef1e3f2
Merge remote-tracking branch 'upstream/dev' into dev
Jun 26, 2020
50e7c9c
validate function error rectified
Jun 27, 2020
68f47fd
validate command works for template-uri
Jun 29, 2020
7f184f8
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jun 29, 2020
bf962b1
Template-specs deployment works at resource-group level
Jun 29, 2020
4b90edd
Group deployment updated to function with 2020 SDK
Jun 30, 2020
4f39504
validate with template specs added
Jun 30, 2020
2e04882
Management scope and tenant scope errors fixed
Jul 1, 2020
7be894f
Testing Complete
Jul 2, 2020
87ccc2e
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jul 6, 2020
4f1348c
Template-Specs Deployment Added
Jul 6, 2020
9eb09f2
Template-Specs Deployment Added
Jul 6, 2020
44362eb
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jul 6, 2020
cf7b97a
Updated test cases and removed unnecessary comments
Jul 6, 2020
fb78986
Removed test cases from launch.json
Jul 6, 2020
504fda7
Uncommented test case
Jul 6, 2020
8f21f7c
Cleaned up repo
Jul 6, 2020
e73132c
Cleaned up repo
Jul 6, 2020
e8153f8
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jul 7, 2020
eac8414
Style checks complete, template_spec parameter placed at the end, tim…
Jul 8, 2020
74666fe
Merged with /dev
Jul 8, 2020
0e28ed8
Fixed failing CLI Check Test
Jul 8, 2020
583352f
Added fixes for deployment create_or_update and validate usage
Jul 9, 2020
a6344b8
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jul 9, 2020
2b43c88
Fix getting resource API version in ARM cmdlt
eladperets Aug 5, 2020
045b6e1
resetting branch
Aug 6, 2020
9b3fa34
reset
Aug 6, 2020
d737883
@eladperets Fix getting resource API version in ARM cmdlt
Aug 6, 2020
e684558
requirements updated to 10.2.0
Aug 6, 2020
33836f6
reverted changes to launch.json
Aug 6, 2020
970f33a
Remove useless object inheritance
Aug 6, 2020
11c0d1d
@eladperets Fix getting resource API version in ARM cmdlt
Aug 6, 2020
7bdde2b
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 6, 2020
94d334a
Merged with dev
Aug 12, 2020
49aa80b
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 13, 2020
40b76f7
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/azure-cli-core/azure/cli/core/commands/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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.

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])
Copy link
Contributor

Choose a reason for hiding this comment

The 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.
I will prefer preview api version could be an backup in such scenario.

Copy link
Contributor

Choose a reason for hiding this comment

The 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 (x for x in rt.api_versions if not x.endswith('preview')) cannot get a value, next() will take rt.api_versions[0], and rt.api_versions[0] is the latest preview api-version.

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)
2 changes: 1 addition & 1 deletion src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
'requests~=2.22',
'six~=1.12',
'pkginfo>=1.5.0.1',
'azure-mgmt-resource==10.1.0',
'azure-mgmt-resource==10.2.0',
'azure-mgmt-core==1.0.0'
]

Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.Darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ azure-mgmt-redhatopenshift==0.1.0
azure-mgmt-redis==7.0.0rc1
azure-mgmt-relay==0.1.0
azure-mgmt-reservations==0.6.0
azure-mgmt-resource==10.1.0
azure-mgmt-resource==10.2.0
azure-mgmt-search==2.1.0
azure-mgmt-security==0.4.1
azure-mgmt-servicebus==0.6.0
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.Linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ azure-mgmt-redhatopenshift==0.1.0
azure-mgmt-redis==7.0.0rc1
azure-mgmt-relay==0.1.0
azure-mgmt-reservations==0.6.0
azure-mgmt-resource==10.1.0
azure-mgmt-resource==10.2.0
azure-mgmt-search==2.1.0
azure-mgmt-security==0.4.1
azure-mgmt-servicebus==0.6.0
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ azure-mgmt-redhatopenshift==0.1.0
azure-mgmt-redis==7.0.0rc1
azure-mgmt-relay==0.1.0
azure-mgmt-reservations==0.6.0
azure-mgmt-resource==10.1.0
azure-mgmt-resource==10.2.0
azure-mgmt-search==2.1.0
azure-mgmt-security==0.4.1
azure-mgmt-servicebus==0.6.0
Expand Down