Sha256: b343b219c4d1eda86fdeeb1dad087e51f1646618ff9b1fb8a18d3fdfb6ad836a
Contents?: true
Size: 1.27 KB
Versions: 4
Compression:
Stored size: 1.27 KB
Contents
require 'rubygems' require 'abiquo' require 'pp' auth = Abiquo::BasicAuth.new('Abiquo', 'admin', 'xabiquo') api = Abiquo::Resource('http://10.60.1.65/api', auth) # # Create a DataCenter # #puts "Creating DC1 in BCN..." new_datacenter = api.datacenters.create :name => 'DC1', :location => 'BCN' # # Create Remote Services # new_datacenter.remoteServices.create :type => 'VIRTUAL_FACTORY', :uri => 'http://localhost:8080/virtualfactory' new_datacenter.remoteServices.create :type => 'STORAGE_SYSTEM_MONITOR', :uri => 'http://localhost:8080/ssm' new_datacenter.remoteServices.create :type => 'VIRTUAL_SYSTEM_MONITOR', :uri => 'http://localhost:8080/vsm' new_datacenter.remoteServices.create :type => 'NODE_COLLECTOR', :uri => 'http://localhost:8080/nodecollector' new_datacenter.remoteServices.create :type => 'APPLIANCE_MANAGER', :uri => 'http://localhost:8080/am' new_datacenter.remoteServices.create :type => 'DHCP_SERVICE', :uri => 'http://localhost:7911' new_datacenter.remoteServices.create :type => 'BPM_SERVICE', :uri => 'http://localhost:7911' # # Create a new Rack # puts "Creating rack 'myrack01'..." new_datacenter.racks.create :name => 'myrack01' # # Iterate over all the racks and print the rack name # puts "Listing racks.." new_datacenter.racks.each do |rack| pp rack.name end
Version data entries
4 entries across 4 versions & 1 rubygems