Class: Domain

Inherits:
Thor
  • Object
show all
Defined in:
lib/cloudstack-cli/commands/domain.rb

Instance Method Summary collapse

Instance Method Details

#list(name = nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/cloudstack-cli/commands/domain.rb', line 4

def list(name = nil)
  cs_cli = CloudstackCli::Helper.new(options[:config])
  domains = cs_cli.domains(name)
  if domains.size < 1
    puts "No domains found"
  else
    domains.each do |domain|
      puts "#{domain['name']}"
    end
  end
end