Class: HammerCLIForeman::OperatingSystem::InfoCommand
- Inherits:
-
InfoCommand
- Object
- HammerCLI::Apipie::ReadCommand
- InfoCommand
- HammerCLIForeman::OperatingSystem::InfoCommand
- Defined in:
- lib/hammer_cli_foreman/operating_system.rb
Instance Method Summary collapse
-
#extend_data(os) ⇒ Object
FIXME: remove custom retrieve_data after the api has support for listing names.
Methods inherited from InfoCommand
command_name, #print_data, #request_params, #retrieve_data
Instance Method Details
#extend_data(os) ⇒ Object
FIXME: remove custom retrieve_data after the api has support for listing names
40 41 42 43 44 45 46 47 48 |
# File 'lib/hammer_cli_foreman/operating_system.rb', line 40 def extend_data(os) os["_os_name"] = Hash[os.select { |k, v| ["name", "major", "minor"].include? k }] os["media_names"] = os["media"].collect{|m| m["medium"]["name"] } rescue [] os["architecture_names"] = os["architectures"].collect{|m| m["architecture"]["name"] } rescue [] os["ptable_names"] = os["ptables"].collect{|m| m["ptable"]["name"] } rescue [] os["config_template_names"] = os["config_templates"].collect{|m| m["config_template"]["name"] } rescue [] os["parameters"] = HammerCLIForeman::Parameter.get_parameters(resource_config, :operatingsystem, os) os end |