Project

General

Profile

Bug #26232

Override Values API - request fails if the matcher attribute name has space or dot(.) character

Added by Ori Rabin about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parameters
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

From BZ:

Steps:

1. Attempt to update the override value by PUTing on satellite with overrides matcher instead of its id. e.g:
  1. curl -u admin:changeme -X PUT -d '{"value":"overridened3"}' --header "Content-Type:application/json" "https://<server_url>/api/v2/puppetclasses/1/smart_class_parameters
    /3/override_values/os=rhel7.6"

Observation and Logs:

PUT request fails if the matcher attribute name has space or dot(.) character.

  1. curl -X PUT -d '{"value":"overridened3"}' --header "Content-Type:application/json" "https://<server_url>/api/v2/puppetclasses/1/smart_class_parameters/3/override_values/os=rhel7.6"

{
"error": {"message":"Resource override_value not found by id 'os=rhel7'"
}

  1. curl X PUT -d '{"value":"overridened3"}' --header "Content-Type:application/json" "https://<server_url>/api/v2/puppetclasses/1/smart_class_parameters/3/override_values/os=rhel 7"
    <!DOCTYPE HTML PUBLIC "
    //IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>400 Bad Request</title>
    </head><body>
    <h1>Bad Request</h1>
    <p>Your browser sent a request that this server could not understand.<br />
    </p>
    </body></html>

Related issues

Related to Foreman - Feature #22090: API Support for easier use of Smart-Class Param OverridesClosed

Associated revisions

Revision 38b5f738 (diff)
Added by Ori Rabin about 4 years ago

Fixes #26232 - Adding id contraints on override_values routes (#6538)

To allow dots and spaces when the id is the matcher

History

#1 Updated by Ori Rabin about 4 years ago

  • Related to Feature #22090: API Support for easier use of Smart-Class Param Overrides added

#2 Updated by The Foreman Bot about 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6538 added

#3 Updated by Marek Hulán about 4 years ago

  • Fixed in Releases 1.22.0 added

#4 Updated by Ori Rabin about 4 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF