Class: HammerCLIKatello::HostCollection::HostsCommand

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

Instance Method Summary collapse

Methods inherited from ListCommand

build_options

Methods included from ResolverCommons

included

Instance Method Details

#host_collection_optionsObject



87
88
89
90
91
92
93
94
# File 'lib/hammer_cli_katello/host_collection.rb', line 87

def host_collection_options
  {
    "option_name" => option_host_collection_name,
    "option_organization_name" => option_organization_name,
    "option_organization_id" => option_organization_id,
    "option_organization_label" => option_organization_label
  }
end

#request_paramsObject



96
97
98
99
100
101
102
103
104
105
# File 'lib/hammer_cli_katello/host_collection.rb', line 96

def request_params
  params = super
  host_collection_id = option_host_collection_id
  unless option_host_collection_name.nil?
    host_collection_id = resolver.host_collection_id(
      options.merge(resolver.scoped_options("host_collection", options)))
  end
  params['search'] = "host_collection_id=#{host_collection_id}"
  params
end