Class: Crowbar::Client::Command::Services::ClearServiceRestart

Inherits:
Base
  • Object
show all
Includes:
Mixin::Format
Defined in:
lib/crowbar/client/command/services/clear_restart.rb

Overview

Implementation for the List Restarts command

Instance Attribute Summary

Attributes inherited from Base

#args, #options, #stderr, #stdin, #stdout

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Crowbar::Client::Command::Base

Instance Method Details

#executeObject



33
34
35
36
37
# File 'lib/crowbar/client/command/services/clear_restart.rb', line 33

def execute
  request.process do |request|
    err request.parsed_response["error"] if request.code != 200
  end
end

#requestObject



27
28
29
30
31
# File 'lib/crowbar/client/command/services/clear_restart.rb', line 27

def request
  @request ||= Request::Services::ClearServiceRestart.new(
    args
  )
end