Bug #22037

Compute attributes create and update API miss validations

Added by Tomáš Strachota about 1 month ago.

Status:New
Priority:Normal
Assigned To:-
Category:API
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

Compute attributes crate and update API actions don't validate the attributes. It blindly accepts and saves any hash. That can easily lead to storing wrong values without any feedback for users. Such compute attribute can later break UI forms and cause undefined behavior in the provisioning process.

The same validations should be performed on host create API: http://projects.theforeman.org/issues/3649

Expected behavior:
The API actions must check keys and values of compute attributes and return meaningful error messages.

Currently the keys and values differ quite a lot across the providers. http://projects.theforeman.org/issues/21580/ normalizes them for the read actions. Validations should accept the same keys and values and be consistent with the normalized output.


Related issues

Related to Foreman - Bug #21580: Compute attributes returned from api need to be normalized Ready For Testing 11/05/2017
Related to Foreman - Bug #3649: Hosts need validations of compute attributes New 11/14/2013
Related to Hammer CLI - Feature #20538: Commands for creating, updating and deleting compute prof... Assigned 08/09/2017

History

#1 Updated by Tomáš Strachota about 1 month ago

  • Related to Bug #21580: Compute attributes returned from api need to be normalized added

#2 Updated by Tomáš Strachota about 1 month ago

  • Related to Bug #3649: Hosts need validations of compute attributes added

#3 Updated by Tomáš Strachota about 1 month ago

  • Related to Feature #20538: Commands for creating, updating and deleting compute profiles and attributes added

Also available in: Atom PDF