Skip to content

Commit

Permalink
Address comments an fix flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Luong committed Nov 14, 2024
1 parent 08b810d commit 21cd90b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions microsoft/testsuites/vm_extensions/azureperformancediagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
from lisa.sut_orchestrator import AZURE
from lisa.sut_orchestrator.azure.common import (
AzureNodeSchema,
add_system_assign_identity,
check_or_create_storage_account,
get_node_context,
add_system_assign_identity,
list_blobs,
)
from lisa.sut_orchestrator.azure.features import AzureExtension
Expand Down Expand Up @@ -60,7 +60,7 @@ def before_case(self, log: Logger, **kwargs: Any) -> None:
storage account key, which we cannot use currently.
Will change it back once the extension works with MSI.
""",
priority=5,
priority=1,
requirement=simple_requirement(
supported_features=[AzureExtension],
),
Expand Down Expand Up @@ -92,8 +92,12 @@ def verify_azure_performance_diagnostics(
)

# Assign system identity to VM
# This MSI will be pre-configured with the necessary role assigments to Storage Account from Subscription level
# Permissions required: Storage Account Contributor, Storage Blob Data Contributor, Storage Blob Data Contributor
# This MSI will be pre-configured with the necessary
# role assigments to Storage Account from Subscription level
# Permissions required:
# Storage Account Contributor
# Storage Blob Data Contributor
# Storage Blob Data Contributor
add_system_assign_identity(
platform=platform,
resource_group_name=node_context.resource_group_name,
Expand All @@ -119,7 +123,7 @@ def verify_azure_performance_diagnostics(

protected_settings = {
"storageAccountName": storage_account_name,
"authenticationType": "SystemManagedIdentity"
"authenticationType": "SystemManagedIdentity",
}

extension_result = extension.create_or_update(
Expand Down Expand Up @@ -174,7 +178,8 @@ def _is_supported_linux_distro(self, node: Node) -> bool:
Suse: [12, 15],
SLES: [12, 15],
AlmaLinux: [8],
CBLMariner: [2, 3], #AzureLinux uses CBLMariner class
# AzureLinux uses CBLMariner class
CBLMariner: [2, 3],
}

for distro in supported_major_versions:
Expand Down

0 comments on commit 21cd90b

Please sign in to comment.