Sha256: de50ddd7a164cd3ba9ca2fece58477656992d9e7534711967fe068954dc9678a
Contents?: true
Size: 901 Bytes
Versions: 5
Compression:
Stored size: 901 Bytes
Contents
class Iso < CloudstackCli::Base desc 'iso list [TYPE]', "list iso's by type [featured|self|self-executable|executable|community], default is featured" option :project option :zone option :account option :listall def list(type='featured') project = find_project if options[:project] unless %w(featured self self-executable executable community).include?(type) say "unsupported iso type '#{type}'", :red exit 1 end zone = client.get_zone(options[:zone]) if options[:zone] isos = client.list_isos( filter: type, project_id: project ? project['id'] : nil, zone_id: zone ? zone['id'] : nil ) if isos.size < 1 puts "No iso's found" else table = [["Name", "Zone", "Bootable"]] isos.each do |iso| table << [iso['name'], iso['zonename'], iso['bootable']] end print_table(table) end end end
Version data entries
5 entries across 5 versions & 1 rubygems