Skip to content

Commit

Permalink
VhdSchema: SecurityProfile based on VMGS
Browse files Browse the repository at this point in the history
We can restrict the SecurityProfile of the VHD deployment based on whether a VMGS file is provided.
  • Loading branch information
kamalca committed Dec 7, 2024
1 parent f673010 commit 91d9908
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion lisa/sut_orchestrator/azure/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,24 @@ class VhdSchema(AzureImageSchema):
vmgs_path: Optional[str] = None

def load_from_platform(self, platform: "AzurePlatform") -> None:
return
# There are no platform tags to parse, but we can assume the
# security profile based on the presence of a VMGS path.
if self.vmgs_path:
self.security_profile = search_space.SetSpace(
True,
[
SecurityProfileType.CVM,
SecurityProfileType.Stateless,
],
)
else:
self.security_profile = search_space.SetSpace(
True,
[
SecurityProfileType.Standard,
SecurityProfileType.SecureBoot,
],
)


@dataclass_json()
Expand Down

0 comments on commit 91d9908

Please sign in to comment.