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



165
166
167
168
169
170
171
172
# File 'lib/hammer_cli_katello/host_collection.rb', line 165

def request_params
  params = super
  params['content'] = content
  params['content_type'] = content_type
  params['included'] = { search: "host_collection_id=\"#{option_host_collection_id}\"" }
  params.delete('id')
  params
end

#resolverObject



174
175
176
177
178
179
180
181
182
# File 'lib/hammer_cli_katello/host_collection.rb', line 174

def resolver
  api = HammerCLI::Connection.get("foreman").api
  custom_resolver = Class.new(HammerCLIKatello::IdResolver) do
    def hosts_bulk_action_id(options)
      host_collection_id(options)
    end
  end
  custom_resolver.new(api, HammerCLIKatello::Searchables.new)
end