Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Profile Information #3603

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 19 additions & 0 deletions lisa/sut_orchestrator/azure/platform_.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Copy link
Member

Choose a reason for hiding this comment

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

Why does it check the capability of node, not check by node.features.is_supported? The capability is what's supported by the node, but it's not the runtime value.

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[
Expand Down
Loading