Sha256: da4d42e3f718db4e7f20aa1a7bc3cb6e735212ead7c45c793a3343b62d211d3c

Contents?: true

Size: 407 Bytes

Versions: 22

Compression:

Stored size: 407 Bytes

Contents

require 'rubygems'
require 'abiquo'
require 'pp'

auth = Abiquo::BasicAuth.new('Abiquo', 'admin', 'admin')
api = Abiquo::Resource('http://as-testing.bcn.abiquo.com:8080/api', auth)

#
# Iterate over all the racks and print the rack name and the hypervisors underneath
#
api.datacenters.first.racks.each do |rack|
  puts "- RACK [#{rack.name}]" 
  rack.machines.each do |m|
    puts "---" + m.name
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
abiquo-etk-0.6.4 vendor/abiquo-0.1.2/examples/hypervisor_resource.rb
abiquo-etk-0.6.3 vendor/abiquo-0.1.2/examples/hypervisor_resource.rb
abiquo-etk-0.6.2 vendor/abiquo-0.1.2/examples/hypervisor_resource.rb
abiquo-etk-0.6.1 vendor/abiquo-0.1.2/examples/hypervisor_resource.rb
abiquo-etk-0.5.8 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.5.3 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.42 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.33 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.32 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.29 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.25 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.24 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.23 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.22 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.20 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.19 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.18 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.17 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.16 vendor/api_ruby_client/examples/hypervisor_resource.rb
abiquo-etk-0.4.15 vendor/api_ruby_client/examples/hypervisor_resource.rb