Project

General

Profile

Bug #13899

Failed to update Smart Class Parameter type from API and CLI.

Added by Jitendra Yejare over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1312004
Description of problem:
I am unable to update smart class parameter type from API from any to any.

Version-Release number of selected component (if applicable):
foreman-1.11.0-0.develop.201602171602gitd5b5059.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Update smart class parameter type from API from any type to any other type.

#curl-X PUT -H "Content-Type: application/json" -d '{"parameter_type":"string"}' "https://<server_url>/api/smart_class_parameters/<param_id>" --insecure

Actual results:
Parameter Type is not updated.

Output:

"description":"","override":true,"parameter_type":"boolean","default_value":true,"hidden_value?":false,"hidden_value":"*****","use_puppet_default":false,"required":true,"validator_type":"","validator_rule":null,"merge_overrides":null,"merge_default":false,"avoid_duplicates":null,"override_value_order":"fqdn\nhostgroup\nos\ndomain","override_values_count":0,"created_at":"2016-02-25 12:07:30 UTC","updated_at":"2016-02-25 13:45:20 UTC","puppetclass_name":"nova::api","parameter":"admin_password","id":322,"puppetclass_id":37,"environments":[{"id":3,"name":"KT_Default_Organization_Dev_puppet_cv_3"},{"id":2,"name":"KT_Default_Organization_Library_puppet_cv_3"}],"puppetclass":{"id":37,"name":"nova::api","module_name":"nova"},"override_values":[]}

Expected results:
Parameter should be updated.

Additional info:


Related issues

Related to Foreman - Bug #7568: Use attr_accessible for rails 4 upgradeClosed2014-09-22

Associated revisions

Revision 6bab9b5b (diff)
Added by Ori Rabin over 3 years ago

Fixes #13899 - Can update smart class parameter type from API

Revision 8cbd0017 (diff)
Added by Ori Rabin over 3 years ago

Fixes #13899 - Can update smart class parameter type from API

(cherry picked from commit 6bab9b5b96ad059abddd7d51460a277cf2c160f9)

History

#1 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #7568: Use attr_accessible for rails 4 upgrade added

#2 Updated by Dominic Cleal over 3 years ago

  • Description updated (diff)
  • Assignee deleted (Ori Rabin)
  • Legacy Backlogs Release (now unused) set to 71

It appears that parameter_type isn't a named accessible attribute.

In future, please format code with pre tags and provide server logs.

#3 Updated by Ori Rabin over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin

#4 Updated by The Foreman Bot over 3 years ago

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

#5 Updated by Ori Rabin over 3 years ago

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

Also available in: Atom PDF