Sha256: 1d137fd4cc99f3d6610d06fc6e1b447c77862964e0c8378bd8d6574507ba7246
Contents?: true
Size: 979 Bytes
Versions: 19
Compression:
Stored size: 979 Bytes
Contents
class Iso < CloudstackCli::Base desc 'list', "list iso's" option :project option :zone option :account option :type, enum: %w(featured self self-executable executable community all) def list resolve_project resolve_zone resolve_account options[:isofilter] = options[:type] options.delete :type isos = client.list_isos(options) if isos.size < 1 puts "No iso's found." else table = [%w(Name Zone Bootable Public Featured)] isos.each do |iso| table << [ iso['name'], iso['zonename'], iso['bootable'], iso['ispublic'], iso['isfeatured'] ] end print_table(table) say "Total number of isos: #{isos.size}" end end desc 'detach VM_ID', "detaches any ISO file (if any) currently attached to a virtual machine" def detach(vm_id) client.detach_iso({virtualmachine_id: vm_id}, {sync: true}) say " OK", :green end end
Version data entries
19 entries across 19 versions & 1 rubygems