module Saltrb
Constants
- DEFAULT_TIMEOUT
- SALT
- VERSION
Public Class Methods
exec_command(command, timeout = self::DEFAULT_TIMEOUT)
click to toggle source
Command must be already constructed
# File lib/saltrb/common.rb, line 9 def self.exec_command(command, timeout = self::DEFAULT_TIMEOUT) rv = Timeout::timeout(timeout) { command = "#{self::SALT} #{command}" res = `#{command}` return false if res.empty? || res.empty? return res } end
runner(method, target, base, command, timeout = self::DEFAULT_TIMEOUT)
click to toggle source
# File lib/saltrb/common.rb, line 19 def self.runner(method, target, base, command, timeout = self::DEFAULT_TIMEOUT) _command = "'#{target}' #{base}.#{method} '#{command}'" rv = Saltrb.exec_command(_command, timeout) return rv end