Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def encrypt_vm(cmd, resource_group_name, vm_name, # pylint: disable=too-many-lo
'EncryptionOperation': 'EnableEncryption' if not encrypt_format_all else 'EnableEncryptionFormatAll',
'KeyEncryptionKeyURL': key_encryption_key,
'KeyEncryptionAlgorithm': key_encryption_algorithm,
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from integer to string conversion should be documented with a comment explaining why the string conversion is necessary for request body serialization.

Suggested change
'KeyEncryptionAlgorithm': key_encryption_algorithm,
'KeyEncryptionAlgorithm': key_encryption_algorithm,
# Convert sequence_version to a string to ensure compatibility with JSON serialization for the request body.

Copilot uses AI. Check for mistakes.
'SequenceVersion': sequence_version,
'SequenceVersion': str(sequence_version),
}
if use_new_ade:
public_config.update({
Expand Down Expand Up @@ -334,7 +334,7 @@ def decrypt_vm(cmd, resource_group_name, vm_name, volume_type=None, force=False)
public_config = {
'VolumeType': volume_type,
'EncryptionOperation': 'DisableEncryption',
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from integer to string conversion should be documented with a comment explaining why the string conversion is necessary for request body serialization.

Suggested change
'EncryptionOperation': 'DisableEncryption',
'EncryptionOperation': 'DisableEncryption',
# Convert sequence_version to a string because public_config is serialized into a JSON object,
# and JSON requires all values to be JSON-compatible types (e.g., strings).

Copilot uses AI. Check for mistakes.
'SequenceVersion': sequence_version,
'SequenceVersion': str(sequence_version),
}

from .operations.vm_extension import VMExtensionCreate
Expand Down
Loading
Loading