All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Ruby example for displaying VM status in each VPDC
PostPosted: Thu Aug 06, 2009 12:53 pm 
Offline

Joined: Thu Aug 06, 2009 10:13 am
Posts: 1
Code:
#!/usr/bin/env ruby -w

require 'xmlrpc/client'

cloud_url = "http://username:password@cloudapi.symetriq.com/appserver/xmlrpc/"
conn = XMLRPC::Client.new2(cloud_url)

vpdc_proxy = conn.proxy_async("cloud_api_vpdc")
machine_proxy = conn.proxy_async("cloud_api_machine")

vpdc_proxy.list().each do |vpdc|
    puts "VPDC: #{vpdc}"
   
    machine_proxy.list(vpdc).each do |machine|
        machine_details = machine_proxy.getMachineDetails(vpdc, machine)
        puts "#{machine} is #{machine_details['runStatus']}"
    end
end


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron