GET /api/v2/config_templates/build_pxe_default returns non-JSON message
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1202564
Description of problem:
GET /api/v2/config_templates/build_pxe_default returns a message that has a content-type of application/json but is not JSON.
Version-Release number of selected component (if applicable):
Tested against Satellite-6.1.0-RHEL-6-20150311.1 and Satellite-6.1.0-RHEL-7-20150311.1.
Steps to Reproduce:
1. GET /api/v2/config_templates/build_pxe_default
2. Examine the response payload.
'PXE Default file has been deployed to all Smart Proxies'
The payload is valid JSON. For example, something like this:
'message': 'PXE Default file has been deployed to all Smart Proxies',
#1 Updated by Tomáš Strachota almost 8 years ago
- Category set to API
- Status changed from New to Assigned
#2 Updated by Dominic Cleal almost 8 years ago
- Related to Bug #6976: Build default PXE menu should be POST request instead of GET added
#3 Updated by Dominic Cleal almost 8 years ago
Linking the two bugs, because we should probably make both changes at once if we're going to change its behaviour.
#4 Updated by The Foreman Bot almost 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2439 added
- Pull request deleted (
#5 Updated by Dominic Cleal almost 8 years ago
- Legacy Backlogs Release (now unused) set to 35
#6 Updated by Anonymous almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 2950fe116fd37b0a7b8c7df8446c687e9ac6b8d7.
Fixes #10715 - api build_pxe_default returns non-JSON message
The fix adds a new method `render_message` for responding with a status