Project

General

Profile

Actions

Bug #10963

closed

operatingsystem_ids attribute ignored in ptable API update

Added by Dominic Cleal almost 9 years ago. Updated almost 6 years ago.

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

Description

Updating partition table to OS associations through the API with the operatingsystem_ids attribute fails, as it's simply ignored:

2015-07-01 07:20:55 [app] [I] 
 | 
 | Started PUT "/api/ptables/53" for 127.0.0.1 at 2015-07-01 07:20:55 +0000
2015-07-01 07:20:55 [app] [I] Processing by Api::V2::PtablesController#update as JSON
2015-07-01 07:20:55 [app] [I]   Parameters: {"ptable"=>{"operatingsystem_ids"=>["1"]}, "apiv"=>"v2", "id"=>"53"}
2015-07-01 07:20:55 [app] [D] Setting current user thread-local variable to foreman_admin
2015-07-01 07:20:55 [app] [D] Setting current user thread-local variable to nil
2015-07-01 07:20:55 [app] [D] Setting current user thread-local variable to foreman_admin
2015-07-01 07:20:55 [app] [D] Setting current user thread-local variable to nil
2015-07-01 07:20:55 [app] [D] Setting current user thread-local variable to admin
2015-07-01 07:20:55 [app] [I] Authorized user admin(Admin User)
2015-07-01 07:20:55 [app] [D] Setting current user thread-local variable to admin
2015-07-01 07:20:55 [sql] [D] WARNING: Can't mass-assign protected attributes: operatingsystem_ids
2015-07-01 07:20:55 [app] [D] Body: {"created_at":"2015-07-01T07:12:12Z","default":false,"id":53,"locked":false,"name":"Kickstart default","os_family":"Redhat","snippet":false,"template":"<%#\nkind: ptable\nname: Kickstart default\noses:\n- CentOS 5\n- CentOS 6\n- CentOS 7\n- Fedora 16\n- Fedora 17\n- Fedora 18\n- Fedora 19\n- Fedora 20\n- RedHat 5\n- RedHat 6\n- RedHat 7\n%>\nzerombr\nclearpart --all --initlabel\nautopart\n\n","template_kind_id":null,"updated_at":"2015-07-01T07:12:12Z","vendor":null}
2015-07-01 07:20:55 [app] [I] Completed 200 OK in 48ms (Views: 0.5ms | ActiveRecord: 0.0ms)

(causing http://ci.theforeman.org/view/Status/job/systest_foreman_hammer_nightly/140/default/tapResults/)

Actions #1

Updated by The Foreman Bot almost 9 years ago

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

Updated by Martin Bacovsky almost 9 years ago

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

Also available in: Atom PDF