diff --git a/src/azure-cli/azure/cli/command_modules/storage/operations/account.py b/src/azure-cli/azure/cli/command_modules/storage/operations/account.py index baa383b8c2b..d71fafe7710 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/operations/account.py +++ b/src/azure-cli/azure/cli/command_modules/storage/operations/account.py @@ -749,6 +749,8 @@ def update_file_service_properties(cmd, instance, enable_delete_retention=None, params['share_delete_retention_policy'] = instance.share_delete_retention_policy # set protocol settings + if not instance.protocol_settings or not instance.protocol_settings.smb: + instance.protocol_settings = cmd.get_models('ProtocolSettings')(smb=cmd.get_models('SmbSetting')()) if enable_smb_multichannel is not None: instance.protocol_settings.smb.multichannel = cmd.get_models('Multichannel')(enabled=enable_smb_multichannel) @@ -760,7 +762,7 @@ def update_file_service_properties(cmd, instance, enable_delete_retention=None, instance.protocol_settings.smb.kerberos_ticket_encryption = kerberos_ticket_encryption if channel_encryption is not None: instance.protocol_settings.smb.channel_encryption = channel_encryption - if any(instance.protocol_settings.smb.__dict__.values()): + if instance.protocol_settings and instance.protocol_settings.smb and any(instance.protocol_settings.smb.__dict__.values()): params['protocol_settings'] = instance.protocol_settings return params diff --git a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_delete_retention_policy.yaml b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_delete_retention_policy.yaml index e78256c70e4..6bc1cf005fa 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_delete_retention_policy.yaml +++ b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_delete_retention_policy.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - --account-name -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' headers: cache-control: - no-cache content-length: - - '433' + - '403' content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:31 GMT + - Wed, 01 Jun 2022 03:10:15 GMT expires: - '-1' pragma: @@ -59,21 +59,21 @@ interactions: ParameterSetName: - --account-name -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' headers: cache-control: - no-cache content-length: - - '433' + - '403' content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:33 GMT + - Wed, 01 Jun 2022 03:10:17 GMT expires: - '-1' pragma: @@ -110,7 +110,7 @@ interactions: ParameterSetName: - --account-name -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: @@ -124,7 +124,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:34 GMT + - Wed, 01 Jun 2022 03:10:19 GMT expires: - '-1' pragma: @@ -140,7 +140,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' status: code: 200 message: OK @@ -158,21 +158,21 @@ interactions: ParameterSetName: - --enable-delete-retention -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' headers: cache-control: - no-cache content-length: - - '433' + - '403' content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:36 GMT + - Wed, 01 Jun 2022 03:10:20 GMT expires: - '-1' pragma: @@ -208,7 +208,7 @@ interactions: ParameterSetName: - --enable-delete-retention -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: @@ -222,7 +222,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:36 GMT + - Wed, 01 Jun 2022 03:10:21 GMT expires: - '-1' pragma: @@ -238,7 +238,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1191' + - '1199' status: code: 200 message: OK @@ -256,21 +256,21 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":false,"days":0}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":false,"days":0}}}' headers: cache-control: - no-cache content-length: - - '434' + - '404' content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:38 GMT + - Wed, 01 Jun 2022 03:10:22 GMT expires: - '-1' pragma: @@ -302,21 +302,21 @@ interactions: ParameterSetName: - --account-name -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":false,"days":0}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":false,"days":0}}}' headers: cache-control: - no-cache content-length: - - '434' + - '404' content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:40 GMT + - Wed, 01 Jun 2022 03:10:23 GMT expires: - '-1' pragma: @@ -352,7 +352,7 @@ interactions: ParameterSetName: - --account-name -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: @@ -366,7 +366,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:41 GMT + - Wed, 01 Jun 2022 03:10:25 GMT expires: - '-1' pragma: @@ -382,7 +382,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1194' + - '1199' status: code: 200 message: OK @@ -400,21 +400,21 @@ interactions: ParameterSetName: - --delete-retention-days -n -g -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":false,"days":0}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":false,"days":0}}}' headers: cache-control: - no-cache content-length: - - '434' + - '404' content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:41 GMT + - Wed, 01 Jun 2022 03:10:27 GMT expires: - '-1' pragma: @@ -446,21 +446,21 @@ interactions: ParameterSetName: - --enable-delete-retention --delete-retention-days -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":false,"days":0}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":false,"days":0}}}' headers: cache-control: - no-cache content-length: - - '434' + - '404' content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:43 GMT + - Wed, 01 Jun 2022 03:10:29 GMT expires: - '-1' pragma: @@ -497,7 +497,7 @@ interactions: ParameterSetName: - --enable-delete-retention --delete-retention-days -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: @@ -511,7 +511,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:44 GMT + - Wed, 01 Jun 2022 03:10:30 GMT expires: - '-1' pragma: @@ -527,7 +527,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1198' status: code: 200 message: OK @@ -545,21 +545,21 @@ interactions: ParameterSetName: - --delete-retention-days -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":10}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":10}}}' headers: cache-control: - no-cache content-length: - - '434' + - '404' content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:45 GMT + - Wed, 01 Jun 2022 03:10:32 GMT expires: - '-1' pragma: @@ -596,7 +596,7 @@ interactions: ParameterSetName: - --delete-retention-days -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_soft_delete000001/providers/Microsoft.Storage/storageAccounts/filesoftdelete000002/fileServices/default?api-version=2021-09-01 response: @@ -610,7 +610,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:30:47 GMT + - Wed, 01 Jun 2022 03:10:32 GMT expires: - '-1' pragma: @@ -626,7 +626,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1193' + - '1198' status: code: 200 message: OK diff --git a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_secured_smb.yaml b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_secured_smb.yaml index ea11466126b..67d1f9c194b 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_secured_smb.yaml +++ b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_secured_smb.yaml @@ -13,7 +13,7 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb000002/fileServices/default?api-version=2021-09-01 response: @@ -27,7 +27,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:31:20 GMT + - Wed, 01 Jun 2022 03:27:30 GMT expires: - '-1' pragma: @@ -60,7 +60,7 @@ interactions: - --versions --auth-methods --kerb-ticket-encryption --channel-encryption -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb000002/fileServices/default?api-version=2021-09-01 response: @@ -74,7 +74,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:31:21 GMT + - Wed, 01 Jun 2022 03:27:31 GMT expires: - '-1' pragma: @@ -114,7 +114,7 @@ interactions: - --versions --auth-methods --kerb-ticket-encryption --channel-encryption -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb000002/fileServices/default?api-version=2021-09-01 response: @@ -128,7 +128,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:31:23 GMT + - Wed, 01 Jun 2022 03:27:32 GMT expires: - '-1' pragma: @@ -144,7 +144,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -162,7 +162,7 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb000002/fileServices/default?api-version=2021-09-01 response: @@ -176,7 +176,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:31:25 GMT + - Wed, 01 Jun 2022 03:27:33 GMT expires: - '-1' pragma: diff --git a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_smb_multichannel.yaml b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_smb_multichannel.yaml index 83192017ff0..e16db41a4c8 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_smb_multichannel.yaml +++ b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_file_smb_multichannel.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - --mc -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb2000003/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb2000003/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb2000003/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' headers: cache-control: - no-cache content-length: - - '419' + - '389' content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:25 GMT + - Wed, 01 Jun 2022 03:25:16 GMT expires: - '-1' pragma: @@ -64,7 +64,7 @@ interactions: ParameterSetName: - --mc -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb2000003/fileServices/default?api-version=2021-09-01 response: @@ -79,7 +79,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:27 GMT + - Wed, 01 Jun 2022 03:25:17 GMT expires: - '-1' pragma: @@ -91,7 +91,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1199' status: code: 409 message: Conflict @@ -109,7 +109,7 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb1000002/fileServices/default?api-version=2021-09-01 response: @@ -123,7 +123,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:28 GMT + - Wed, 01 Jun 2022 03:25:18 GMT expires: - '-1' pragma: @@ -155,21 +155,21 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb2000003/fileServices/default?api-version=2021-09-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb2000003/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"protocolSettings":{"smb":{}},"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb2000003/fileServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/fileServices","properties":{"cors":{"corsRules":[]},"shareDeleteRetentionPolicy":{"enabled":true,"days":7}}}' headers: cache-control: - no-cache content-length: - - '419' + - '389' content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:28 GMT + - Wed, 01 Jun 2022 03:25:20 GMT expires: - '-1' pragma: @@ -201,7 +201,7 @@ interactions: ParameterSetName: - --enable-smb-multichannel -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb1000002/fileServices/default?api-version=2021-09-01 response: @@ -215,7 +215,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:29 GMT + - Wed, 01 Jun 2022 03:25:20 GMT expires: - '-1' pragma: @@ -252,7 +252,7 @@ interactions: ParameterSetName: - --enable-smb-multichannel -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb1000002/fileServices/default?api-version=2021-09-01 response: @@ -266,7 +266,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:31 GMT + - Wed, 01 Jun 2022 03:25:22 GMT expires: - '-1' pragma: @@ -282,7 +282,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1198' status: code: 200 message: OK @@ -300,7 +300,7 @@ interactions: ParameterSetName: - --enable-smb-multichannel -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb1000002/fileServices/default?api-version=2021-09-01 response: @@ -314,7 +314,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:32 GMT + - Wed, 01 Jun 2022 03:25:24 GMT expires: - '-1' pragma: @@ -351,7 +351,7 @@ interactions: ParameterSetName: - --enable-smb-multichannel -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb1000002/fileServices/default?api-version=2021-09-01 response: @@ -365,7 +365,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:33 GMT + - Wed, 01 Jun 2022 03:25:25 GMT expires: - '-1' pragma: @@ -381,7 +381,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1192' + - '1199' status: code: 200 message: OK @@ -399,7 +399,7 @@ interactions: ParameterSetName: - --enable-smb-multichannel -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb1000002/fileServices/default?api-version=2021-09-01 response: @@ -413,7 +413,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:35 GMT + - Wed, 01 Jun 2022 03:25:26 GMT expires: - '-1' pragma: @@ -450,7 +450,7 @@ interactions: ParameterSetName: - --enable-smb-multichannel -n -g User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-storage/20.0.0 Python/3.7.9 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_file_smb000001/providers/Microsoft.Storage/storageAccounts/filesmb1000002/fileServices/default?api-version=2021-09-01 response: @@ -464,7 +464,7 @@ interactions: content-type: - application/json date: - - Mon, 11 Apr 2022 13:32:36 GMT + - Wed, 01 Jun 2022 03:25:26 GMT expires: - '-1' pragma: diff --git a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_account_scenarios.py b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_account_scenarios.py index 6eebc044f00..422fbf43358 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_account_scenarios.py +++ b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_account_scenarios.py @@ -1848,7 +1848,7 @@ def test_storage_account_file_delete_retention_policy(self, resource_group, stor @api_version_constraint(ResourceType.MGMT_STORAGE, min_api='2020-08-01-preview') @ResourceGroupPreparer(name_prefix='cli_file_smb') @StorageAccountPreparer(parameter_name='storage_account1', name_prefix='filesmb1', kind='FileStorage', - sku='Premium_LRS', location='centraluseuap') + sku='Premium_LRS', location='centralus') @StorageAccountPreparer(parameter_name='storage_account2', name_prefix='filesmb2', kind='StorageV2') def test_storage_account_file_smb_multichannel(self, resource_group, storage_account1, storage_account2): @@ -1887,7 +1887,7 @@ def test_storage_account_file_smb_multichannel(self, resource_group, storage_acc @api_version_constraint(ResourceType.MGMT_STORAGE, min_api='2020-08-01-preview') @ResourceGroupPreparer(name_prefix='cli_file_smb') - @StorageAccountPreparer(name_prefix='filesmb', kind='FileStorage', sku='Premium_LRS', location='centraluseuap') + @StorageAccountPreparer(name_prefix='filesmb', kind='FileStorage', sku='Premium_LRS', location='centralus') def test_storage_account_file_secured_smb(self, resource_group, storage_account): self.kwargs.update({ 'sa': storage_account,