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

View differences:

src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb
818 818

  
819 819
    VM_SHUTDOWN_TIMEOUT = 600 #10 minutes til poweroff hard
820 820

  
821
    attr_accessor :item
821
    attr_accessor :item, :vm_id
822 822

  
823 823
    attr_accessor :vm_info
824 824

  
......
920 920

  
921 921
    # @return String the vm_id stored in vCenter
922 922
    def get_vm_id(vm_pool = nil)
923
        if defined?(@one_item_id) && @one_item_id
924
            return @one_item_id
923
        if defined?(@vm_id) && @vm_id
924
            return @vm_id
925 925
        end
926 926

  
927 927
        vm_ref = self['_ref']
......
936 936
                                                     vm_pool)
937 937
        return nil if !one_vm
938 938

  
939
        @one_item_id = one_vm["ID"]
940
        return @one_item_id
939
        @vm_id = one_vm["ID"]
940
        return @vm_id
941 941
    end
942 942

  
943 943
    def get_vcenter_instance_uuid

Also available in: Unified diff