Revision 400f5126 src/sunstone/routes/vcenter.rb

View differences:

src/sunstone/routes/vcenter.rb
56 56
            error 404, error.to_json
57 57
        end
58 58

  
59
        return VCenterDriver::VIClient.new_connection({
59
        return VCenterDriver::VIClient.new({
60 60
            :user     => vuser,
61 61
            :password => vpass,
62
            :host     => vhost},
63
            ::OpenNebula::Client.new(nil,$conf[:one_xmlrpc]))
62
            :host     => vhost})
63

  
64 64
    end
65 65

  
66 66
#    def af_format_response(resp)
......
77 77

  
78 78
get '/vcenter' do
79 79
    begin
80
        rs = vcenter_client.hierarchy
80
        dc_folder = VCenterDriver::DatacenterFolder.new(vcenter_client)
81
        rs = dc_folder.get_unimported_hosts
81 82
        [200, rs.to_json]
82 83
    rescue Exception => e
83 84
        logger.error("[vCenter] " + e.message)

Also available in: Unified diff