Sha256: 19b5b0963d8f4f6c711d1f0acdf7298c722e8a5195f7ca76b050d91056edf9d3
Contents?: true
Size: 728 Bytes
Versions: 26
Compression:
Stored size: 728 Bytes
Contents
class AffinityGroup < CloudstackCli::Base desc 'list', 'list affinity groups' option :account option :name option :type option :listall option :keyword def list affinity_groups = client.list_affinity_groups(options) if affinity_groups.size < 1 say "No affinity groups found." else table = [%w(Domain Account Name, Description, VMs)] affinity_groups.each do |group| table << [ group['domain'], group['account'], group['name'], group['description'], group['virtualmachineIds'] ? group['virtualmachineIds'].size : nil ] end print_table table say "Total number of affinity groups: #{affinity_groups.size}" end end end
Version data entries
26 entries across 26 versions & 1 rubygems