module Euca

Constants

EUCA_VERSION
T1_NANO
UBUNTU_12_04
UBUNTU_13_10
VERSION

Public Class Methods

api_methods() click to toggle source
# File lib/euca.rb, line 19
def self.api_methods
  @@api_methods ||= begin
    sh(:ls, :"1", "#{self.exec_path}/euca-*").
    gsub(/#{self.exec_path}\/euca-/m,"").split("\n")
  end
end
exec_path() click to toggle source
# File lib/euca.rb, line 26
def self.exec_path
  @@euca_home ||= sh(:dirname, "$(which euca-version)")
end
has_cli?() click to toggle source
# File lib/euca.rb, line 11
def self.has_cli?
  self.version.exit_status == 0
end
sh(*args) click to toggle source
# File lib/euca.rb, line 30
def self.sh *args
  ret = Rye.shell *args
  raise RuntimeError.new(ret.stderr.join($/)) if ret.exit_status != 0
  ret.to_s
end
version() click to toggle source
# File lib/euca.rb, line 15
def self.version
  sh(BIN_VERSION)
end