Class: HammerCLIForeman::Host::StatusCommand
- Inherits:
-
HammerCLI::Apipie::ReadCommand
- Object
- HammerCLI::Apipie::ReadCommand
- HammerCLIForeman::Host::StatusCommand
- Defined in:
- lib/hammer_cli_foreman/host.rb
Instance Method Summary collapse
Instance Method Details
#get_power_status ⇒ Object
202 203 204 205 206 207 208 209 |
# File 'lib/hammer_cli_foreman/host.rb', line 202 def get_power_status params = { 'id' => get_identifier[0], 'power_action' => :state } status = resource.call(:power, params)[0] status["power"] end |
#get_status ⇒ Object
194 195 196 197 198 199 200 |
# File 'lib/hammer_cli_foreman/host.rb', line 194 def get_status params = { 'id' => get_identifier[0], } status = resource.call(:status, params)[0] status["status"] end |
#retrieve_data ⇒ Object
187 188 189 190 191 192 |
# File 'lib/hammer_cli_foreman/host.rb', line 187 def retrieve_data { :status => get_status, :power => get_power_status } end |