Skip to content

Commit

Permalink
Security Profile Information
Browse files Browse the repository at this point in the history
The test case results should be able to differentiate between standard, secure boot, and CVM; as well as between disk encryption and no disk encryption.
  • Loading branch information
kamalca authored and LiliDeng committed Jan 25, 2025
1 parent 50fee32 commit 7d3e69f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion lisa/sut_orchestrator/azure/platform_.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@

from lisa import feature, schema, search_space
from lisa.environment import Environment
from lisa.features import Disk
from lisa.features import (
Disk,
SecurityProfile,
SecurityProfileSettings,
SecurityProfileType,
)
from lisa.features.availability import AvailabilityType
from lisa.node import Node, RemoteNode, local
from lisa.platform_ import Platform
Expand Down Expand Up @@ -716,6 +721,19 @@ def _get_node_information(self, node: Node) -> Dict[str, str]:
node.log.debug("detecting vm generation...")
information[KEY_VM_GENERATION] = node.tools[VmGeneration].get_generation()
node.log.debug(f"vm generation: {information[KEY_VM_GENERATION]}")

security_profile = node.features[SecurityProfile].get_settings()
if (
security_profile
and isinstance(security_profile, SecurityProfileSettings)
and isinstance(security_profile.security_profile, SecurityProfileType)
):
information[
"security_profile"
] = security_profile.security_profile.value
if security_profile.security_profile == SecurityProfileType.CVM:
information["encrypt_disk"] = security_profile.encrypt_disk

if node.capture_kernel_config:
node.log.debug("detecting mana driver enabled...")
information[
Expand Down

0 comments on commit 7d3e69f

Please sign in to comment.