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
173
174
175
176
177
178
# File 'lib/hammer_cli_katello/host_collection.rb', line 165

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



180
181
182
183
184
185
186
187
# File 'lib/hammer_cli_katello/host_collection.rb', line 180

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