Revision 9c965164 src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb

View differences:

src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb
91 91
    end
92 92

  
93 93
    # The OpenNebula host
94
 # @return OpenNebula::Host or XMLElement
94
    # @return OpenNebula::Host or XMLElement
95 95
    def host
96 96
        if @host.nil?
97 97
            if one_item.nil?
......
99 99
                      "access the OpenNebula host."
100 100
            end
101 101

  
102
            host_id = one_item["HISTORY_RECORDS/HISTORY/HID"]
102
            host_id = one_item["HISTORY_RECORDS/HISTORY[last()]/HID"]
103 103
            raise "No valid host_id found." if host_id.nil?
104 104

  
105 105
            @host = VIHelper.one_item(OpenNebula::Host, host_id)

Also available in: Unified diff