def run(options)
      fail_if_right_agent_is_not_running
      check_privileges
      fail("Missing required shutdown argument") unless options[:level]
      cmd = {}
      cmd[:name] = :set_shutdown_request
      cmd[:level] = options[:level]
      cmd[:immediately] = options[:immediately]
      begin
        send_command(cmd, options[:verbose]) do |response|
          if response[:error]
            fail("Failed #{cmd.inspect} with #{response[:error]}")
          else
            message = response[:level]
            message += " immediately" if response[:immediately]
            puts message
          end
        end
      rescue Exception => e
        fail(e.message)
      end
      true
    rescue SystemExit => e
      raise e
    rescue Exception => e
      fail(e)
    end
def run(options)
      fail_if_right_agent_is_not_running
      check_privileges
      fail("Missing required shutdown argument") unless options[:level]
      cmd = {}
      cmd[:name] = :set_shutdown_request
      cmd[:level] = options[:level]
      cmd[:immediately] = options[:immediately]
      begin
        send_command(cmd, options[:verbose]) do |response|
          if response[:error]
            fail("Failed #{cmd.inspect} with #{response[:error]}")
          else
            message = response[:level]
            message += " immediately" if response[:immediately]
            puts message
          end
        end
      rescue Exception => e
        fail(e.message)
      end
      true
    rescue SystemExit => e
      raise e
    rescue Exception => e
      fail(e)
    end
Run

 === Parameters
 options(Hash):: Hash of options as defined in +parse_args+

 === Return
 true:: Always return true