Project

General

Profile

Bug #9812

'match' and 'value' parameters in override value's create should be required in apidoc

Added by Martin Bacovsky about 8 years ago. Updated almost 5 years ago.

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

Description

Currently it allows CLI to attempt to create override value without these params which result in 500.

[ INFO 2015-03-18 16:00:34 API] POST /api/smart_variables/205/override_values
[DEBUG 2015-03-18 16:00:34 API] Params: {
    "override_value" => {}
}
[DEBUG 2015-03-18 16:00:34 API] Headers: {}
[DEBUG 2015-03-18 16:00:35 API] 500 Internal Server Error
{
    "error" => {
        "message" => "undefined method `match' for nil:NilClass" 
    }
}


Related issues

Related to Foreman - Bug #10528: Can't save a smart class parameter/smart variable with the value 'false'Closed2015-05-17
Related to Foreman - Bug #9187: Overrideable empty puppet class parameters are still validate their default valueClosed2015-02-02
Related to Foreman - Bug #11663: Empty lookup value validated even when use_puppet_default is checkedClosed2015-09-02

Associated revisions

Revision d936284f (diff)
Added by Shlomi Zadok about 8 years ago

fixes #9812 - Adds validation on override value, ensure match returns error if blank

History

#1 Updated by Tomáš Strachota about 8 years ago

Not only they should be required in the docs but we must make sure the api can cope with the missing parameters and not to fail with 500.

#2 Updated by The Foreman Bot about 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2255 added
  • Pull request deleted ()

#3 Updated by Shlomi Zadok about 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Dominic Cleal about 8 years ago

  • Assignee set to Shlomi Zadok
  • Legacy Backlogs Release (now unused) set to 35

#5 Updated by Dominic Cleal about 8 years ago

  • Related to Bug #10528: Can't save a smart class parameter/smart variable with the value 'false' added

#6 Updated by Dominic Cleal about 8 years ago

  • Related to Bug #9187: Overrideable empty puppet class parameters are still validate their default value added

#7 Updated by Dominic Cleal over 7 years ago

  • Related to Bug #11663: Empty lookup value validated even when use_puppet_default is checked added

Also available in: Atom PDF