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:
Updated by The Foreman Bot almost 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3275 added
Updated by Shimon Shtein almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 1799cee842301e341494748ba4dfd1ecae7589f6.
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release set to 136