Bug #6347
closedactivation_keys.add_host_collections API removes host collections from the activation key
Description
Description of problem:
Calling
@api.resource(:activation_keys).call(
:add_host_collections,
{
:id => ak_id,
:host_collection_ids => hc_ids
})
does not associate host_collections with the activation key
Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-6-20140521.0-Satellite-x86_64
How reproducible:
always
- bundle exec irb
irb> require 'apipie-bindings'
irb> api = ApipieBindings::API.new({:uri => 'http://localhost:3000/', :username => 'admin', :password => 'changeme', :api_version=> '2', :aggressive_cache_checking => true})
irb> api.resource(:activation_keys).call(
:add_host_collections, {
:id => ak_id,
:host_collection_ids => hc_ids
})
- API call runs without issues, but does not associate host collections with the activation key
- according to config/routes/api/v2.rb it looks like :remove_host_collections is called instead
Expected results:
associate host collections with the activation key
- <sat6>/apidoc/v2/activation_keys/add_host_collections
does not have complete apidoc - Ivan's patch:
diff --git a/config/routes/api/v2.rb b/config/routes/api/v2.rb
index ad7cb9a..3456d10 100644
--- a/config/routes/api/v2.rb
++ b/config/routes/api/v2.rb
27,8 +27,8 @@ Katello::Engine.routes.draw do match '/host_collections' => 'activation_keys#add_host_collections', :via => :post
match '/releases' => 'activation_keys#available_releases', :via => :get, :on => :member
api_resources :host_collections, :only => [:index]
member do
- match '/host_collections' => 'activation_keys#remove_host_collections', :via => :put
match '/host_collections' => 'activation_keys#add_host_collections', :via => :put
+ match '/host_collections' => 'activation_keys#remove_host_collections', :via => :delete
match '/host_collections/available' => 'activation_keys#available_host_collections', :via => :get
end
api_resources :products, :only => [:index]
Updated by dustin tsang over 10 years ago
- Category set to API
- Status changed from New to Assigned
- Assignee set to dustin tsang
- Target version set to 48
- Difficulty set to trivial
Updated by dustin tsang over 10 years ago
- Difficulty changed from trivial to easy
Updated by dustin tsang over 10 years ago
- Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1101537
Updated by dustin tsang over 10 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset katello|commit:7da5149483f9e704134eb3e46658538833cd814c.
Updated by Eric Helms over 10 years ago
- Translation missing: en.field_release set to 13