File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -157,10 +157,21 @@ def is_ssh_up(self):
157157 return False
158158
159159 def is_management_agent_up (self ):
160+ """Check for management agent features required by the tests."""
160161 return (
161162 self .param_get ("PV-drivers-version" , "major" , accept_unknown_key = True ) is not None
162163 # HACK: workaround for Windows XS guest agents not updating major version after resume
163164 or self .param_get ("PV-drivers-version" , "xenbus" , accept_unknown_key = True ) is not None
165+ ) and (
166+ # These checks are required to verify that the VM's support for power actions is really online. These
167+ # features are provided by a service independent from the management agent, and which starts after the PV
168+ # drivers have started.
169+ # Only check Windows VMs for this to avoid breaking power actions on old Linux VMs.
170+ not self .is_windows
171+ or (
172+ strtobool (self .param_get ("other" , "feature-poweroff" , accept_unknown_key = True ))
173+ and strtobool (self .param_get ("other" , "feature-reboot" , accept_unknown_key = True ))
174+ )
164175 )
165176
166177 def wait_for_os_booted (self ):
You can’t perform that action at this time.
0 commit comments