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

Version Path
cloudstack-cli-0.15.1 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.15.0 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.14.1 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.14.0 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.13.1 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.13.0 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.12.3 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.12.2 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.12.1 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.12.0 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.11.2 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.11.1 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.11.0 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.10.2 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.10.1 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.10.0 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.9.1 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.9.0 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.8.3 lib/cloudstack-cli/commands/affinity_group.rb
cloudstack-cli-0.8.2 lib/cloudstack-cli/commands/affinity_group.rb