Sha256: 95e1bfd56bd4dc9a7f832ee190e4d3f77b58eccefef3cad1335a04844f3275b9
Contents?: true
Size: 592 Bytes
Versions: 5
Compression:
Stored size: 592 Bytes
Contents
class Environment < CloudstackCli::Base desc "list", "list cloudstack-cli environments" def environments(file = options[:config]) config = {} if File.exists? file begin config = YAML::load(IO.read(file)) rescue error "Can't load configuration from file #{config_file}." exit 1 end table = [%w(Name URL)] table << ["default", config[:url]] config.each_key do |key| table << [key, config[key][:url]] unless key.class == Symbol end print_table table end end end
Version data entries
5 entries across 5 versions & 1 rubygems