Class: CloudstackClient::ConnectionHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudstack-client/helper.rb

Class Method Summary collapse

Class Method Details

.load_configuration(config_file) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/cloudstack-client/helper.rb', line 3

def self.load_configuration(config_file)
  begin
    return YAML::load(IO.read(config_file))
  rescue Exception => e
    $stderr.puts "Can't find the config file #{config_file}."
    $stderr.puts "To create a new configuration file run \"cs setup\"."
    exit 1
  end
end