Project

General

Profile

Bug #22037

Compute attributes create and update API miss validations

Added by Tomáš Strachota almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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 normalizedClosed2017-11-05
Related to Foreman - Bug #3649: Hosts need validations of compute attributesNew2013-11-14
Related to Hammer CLI - Feature #20538: Commands for creating, updating and deleting compute profiles and attributesResolved
Related to Foreman - Bug #23466: Unable to provision host with hammer after upgrade to 1.16.1New

History

#1 Updated by Tomáš Strachota almost 3 years ago

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

#2 Updated by Tomáš Strachota almost 3 years ago

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

#3 Updated by Tomáš Strachota almost 3 years ago

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

#4 Updated by Tomáš Strachota about 2 years ago

  • Related to Bug #23466: Unable to provision host with hammer after upgrade to 1.16.1 added

Also available in: Atom PDF