Project

General

Profile

Actions

Bug #26232

closed

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

Added by Ori Rabin over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parameters
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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 1 (0 open1 closed)

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

Updated by Ori Rabin over 5 years ago

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

Updated by The Foreman Bot over 5 years ago

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

Updated by Marek Hulán over 5 years ago

  • Fixed in Releases 1.22.0 added
Actions #4

Updated by Ori Rabin over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF