Bug #10183
closedPower action "status" REST API responses from compute resources are not masked to shared values
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1211613
Description of problem:
Response to "power_action": "state" request towards a baremetal host
{"power":"off"}
Response to "power_action": "state" request towards a vmware VM host:
{"power":"poweredOff"}
^ this is in case the hosts are turned off
I'm not sure if this difference between responses happens with other power_action types as well - this requires further investigation.
Version-Release number of selected component (if applicable):
Upstream foreman 1.7.4-1
(+ most probably downstream satellite 6.0.8)
How reproducible:
Always
1. Setup a vmware vsphere compute resource (v5.5 in my case)
2. Provision a VM-based host on that compute resource
3. Provision a baremetal host
4. Run the following request against both hosts to see the difference:
- curl --insecure -X PUT -d '{"power_action": "state"}' -u admin -H "Content-Type:application/json" -H "Accept:application/json" https://my-foreman.domain.com/api/v2/hosts/my-host.domain.com/power
Actual results:
{"power":"poweredOff"} for VMs, {"power":"off"} for baremetal
or
{"power":"poweredOn"} for VMs, {"power":"on"} for baremetal
etc...
Expected results:
Shared, single type of values for all host types.
Additional info: