Skip to content

Commit

Permalink
{Identity} az identity: Upgrade api-version 2023-01-31 for managed …
Browse files Browse the repository at this point in the history
…identity (Azure#25418)

* upgrade msi version

* fix tests and support listAssociatedResources commands by using multi-api package

* fix tests and linter check

* reslove tests

* change api-version used for listAssociatedResources command from 2021-09-30-preview to 2022-01-31-preview

* fix credential scan

* fix credential scan

* add declaration for ad-hoc API version
  • Loading branch information
yanzhudd authored Feb 16, 2023
1 parent 01e7cf9 commit 2da24d7
Show file tree
Hide file tree
Showing 57 changed files with 36,456 additions and 43,465 deletions.
2 changes: 2 additions & 0 deletions scripts/ci/credscan/CredScanSuppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@
"src\\azure-cli\\azure\\cli\\command_modules\\iot\\tests\\latest\\recordings\\test_iot_hub.yaml",
"src\\azure-cli\\azure\\cli\\command_modules\\iot\\tests\\latest\\recordings\\test_iot_pnp.yaml",
"src\\azure-cli\\azure\\cli\\command_modules\\iot\\tests\\latest\\recordings\\test_dps_lifecycle.yaml",
"src\\azure-cli\\azure\\cli\\command_modules\\iot\\tests\\latest\\recordings\\test_hub_file_upload.yaml",
"src\\azure-cli\\azure\\cli\\command_modules\\iot\\tests\\latest\\recordings\\test_identity_hub.yaml",
"src\\azure-cli\\azure\\cli\\command_modules\\iot\\tests\\hybrid_2019_03_01\\recordings\\test_iot_hub.yaml",
"src\\azure-cli\\azure\\cli\\command_modules\\iot\\tests\\hybrid_2020_09_01\\recordings\\test_dps_lifecycle.yaml"
],
Expand Down
5 changes: 4 additions & 1 deletion src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def default_api_version(self):
'private_endpoint_connections': '2019-10-17-preview',
'subscription_diagnostic_settings': '2017-05-01-preview'
}),
ResourceType.MGMT_MSI: '2022-01-31-preview',
ResourceType.MGMT_MSI: '2023-01-31',
ResourceType.MGMT_APPSERVICE: '2022-03-01',
ResourceType.MGMT_IOTHUB: '2022-04-30-preview',
ResourceType.MGMT_IOTDPS: '2021-10-15',
Expand Down Expand Up @@ -424,6 +424,9 @@ def default_api_version(self):
ResourceType.MGMT_CONTAINERSERVICE: {
# src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_custom.py:50
'ManagedClusterAddonProfile': '2020-03-01',
},
ResourceType.MGMT_MSI: {
'user_assigned_identities': '2022-01-31-preview',
}
}

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ interactions:
- AZURECLI/2.42.0 azsdk-python-azure-mgmt-msi/6.1.0 Python/3.10.8 (Linux-5.15.0-1022-azure-x86_64-with-glibc2.31)
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000005?api-version=2022-01-31-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000005?api-version=2023-01-31
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000005","name":"id1000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"francecentral","tags":{},"properties":{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","principalId":"dac77492-66ab-41e8-89f9-7be7dd80ac6b","clientId":"40d48e1b-29b2-466e-af19-495f58b29746"}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ interactions:
- AZURECLI/2.42.0 azsdk-python-azure-mgmt-msi/6.1.0 Python/3.10.8 (Linux-5.15.0-1022-azure-x86_64-with-glibc2.31)
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000005?api-version=2022-01-31-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000005?api-version=2023-01-31
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000005","name":"id1000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"francecentral","tags":{},"properties":{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","principalId":"aced5fc3-4184-45cb-a9c2-78e386cb6b45","clientId":"cb27001c-d879-40b7-a0e4-984f46cb79ff"}}'
Expand Down Expand Up @@ -155,7 +155,7 @@ interactions:
- AZURECLI/2.42.0 azsdk-python-azure-mgmt-msi/6.1.0 Python/3.10.8 (Linux-5.15.0-1022-azure-x86_64-with-glibc2.31)
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000006?api-version=2022-01-31-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000006?api-version=2023-01-31
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1000006","name":"id1000006","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"francecentral","tags":{},"properties":{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","principalId":"fbf2a515-ec57-4fc6-9b9f-aeba0300cd17","clientId":"acccfe40-0f3d-4efc-aa41-1df23df7b597"}}'
Expand Down
Loading

0 comments on commit 2da24d7

Please sign in to comment.