diff --git a/lisa/sut_orchestrator/azure/platform_.py b/lisa/sut_orchestrator/azure/platform_.py index 17d6091fce..08f289f565 100644 --- a/lisa/sut_orchestrator/azure/platform_.py +++ b/lisa/sut_orchestrator/azure/platform_.py @@ -55,6 +55,10 @@ from lisa.environment import Environment from lisa.features import Disk from lisa.features.availability import AvailabilityType +from lisa.features.security_profile import ( + FEATURE_NAME_SECURITY_PROFILE, + SecurityProfileType, +) from lisa.node import Node, RemoteNode, local from lisa.platform_ import Platform from lisa.secret import PATTERN_GUID, add_secret @@ -716,6 +720,21 @@ 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]}") + + if node.capability and node.capability.features: + for feat in node.capability.features: + if feat.type == FEATURE_NAME_SECURITY_PROFILE: + assert isinstance(feat, features.SecurityProfileSettings) + if isinstance(feat.security_profile, SecurityProfileType): + information[ + "security_profile" + ] = feat.security_profile.value + if ( + feat.security_profile.value + == constants.SECURITY_PROFILE_CVM + ): + information["encrypt_disk"] = feat.encrypt_disk + if node.capture_kernel_config: node.log.debug("detecting mana driver enabled...") information[