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