Skip to content

Commit 0be6487

Browse files
committed
fix style
1 parent a3bf55d commit 0be6487

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/azure-cli/azure/cli/command_modules/vm/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def _is_linux_os(vm):
258258

259259
# separated for aaz implementation
260260
def _is_linux_os_aaz(vm):
261-
if os_type:= vm.get('storageProfile', {}).get('osDisk', {}).get('osType', None):
261+
if os_type := vm.get('storageProfile', {}).get('osDisk', {}).get('osType', None):
262262
return os_type.lower() == 'linux'
263263
# the os_type could be None for VM scaleset, let us check out os configurations
264264
if linux_config := vm.get('osProfile', {}).get('linuxConfiguration', ''):

src/azure-cli/azure/cli/command_modules/vm/disk_encryption.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
5+
# pylint: disable=line-too-long
56
import uuid
67
import os
78

@@ -70,7 +71,7 @@ def updateVmEncryptionSetting(cmd, vm, resource_group_name, vm_name, encryption_
7071
updateVm = False
7172

7273
if not (_encrypt_userid := vm.get('securityProfile', {}).get('encryptionIdentity', {}).get('userAssignedIdentityResourceId', None)) \
73-
or _encrypt_userid.lower() != encryption_identity.lower():
74+
or _encrypt_userid.lower() != encryption_identity.lower():
7475
updateVm = True
7576

7677
if updateVm:
@@ -357,9 +358,11 @@ def decrypt_vm(cmd, resource_group_name, vm_name, volume_type=None, force=False)
357358
if not has_new_ade:
358359
# 3. Remove the secret from VM's storage profile
359360
from .operations.vm import VMUpdate
361+
360362
class RemoveSecret(VMUpdate):
361363
def pre_instance_update(self, instance):
362364
instance.properties.storage_profile.os_disk.encryption_settings = {'enabled': False}
365+
363366
LongRunningOperation(cmd.cli_ctx)(
364367
RemoveSecret(cli_ctx=cmd.cli_ctx)(command_args={
365368
'vm_name': vm_name,

src/azure-cli/azure/cli/command_modules/vm/operations/vm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def _output(self, *args, **kwargs):
3737
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
3838
return result
3939

40+
4041
class VMShow(_VMShow):
4142
class VirtualMachinesGet(_VMShow.VirtualMachinesGet):
4243
# Override to solve key conflict of _schema_on_200.resources.Element.properties.type when deserializing

0 commit comments

Comments
 (0)