Class: HammerCLIKatello::HostCollection::ContentBaseCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/hammer_cli_katello/host_collection.rb

Instance Method Summary collapse

Methods included from ResolverCommons

included

Instance Method Details

#request_paramsObject



198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/hammer_cli_katello/host_collection.rb', line 198

def request_params
  params = super

  host_collection_id = resolver.host_collection_id(
    'option_id' => option_host_collection_id,
    'option_name' => option_host_collection_name,
    'option_organization_id' => params['organization_id']
  )

  params['content'] = content
  params['content_type'] = content_type
  params['included'] = { search: "host_collection_id=\"#{host_collection_id}\"" }
  params
end

#resolverObject



213
214
215
216
217
218
219
220
# File 'lib/hammer_cli_katello/host_collection.rb', line 213

def resolver
  custom_resolver = Class.new(HammerCLIKatello::IdResolver) do
    def hosts_bulk_action_id(options)
      host_collection_id(options)
    end
  end
  custom_resolver.new(HammerCLIKatello.api_connection, HammerCLIKatello::Searchables.new)
end