Revision e3b9f6f7 src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb

View differences:

src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb
602 602
        str << "IMPORT_VM_ID =\"#{self["_ref"]}\"\n"
603 603
        str << "IMPORT_STATE =\"#{@state}\"\n"
604 604

  
605
        # Get DS information
606
        ds_folder = get_dc.datastore_folder
607
        ds_name   = self["config.datastoreUrl"][0].name
608
        ds_folder.fetch!
609
        ds_vcenter_ref = ds_folder.items.select{|_,d| d["name"] == ds_name}.values[0]["_ref"]
610
        str << "VCENTER_DS_REF = \"#{ds_vcenter_ref}\"\n"
611

  
605 612
        vnc_port = nil
606 613
        keymap = nil
607 614

  

Also available in: Unified diff