Revision fdf66ebc

View differences:

src/oca/ruby/opennebula/virtual_machine.rb
14 14
# limitations under the License.                                             #
15 15
#--------------------------------------------------------------------------- #
16 16

  
17

  
18 17
require 'opennebula/pool_element'
19 18

  
20 19
module OpenNebula
......
343 342

  
344 343
            self.info
345 344

  
346
            # Add dsid as VM template parameter for vcenter
347
            if ds_id!=-1 &&
348
               !self["/VM/USER_TEMPLATE/PUBLIC_CLOUD/TYPE"].nil? &&
349
               self["/VM/USER_TEMPLATE/PUBLIC_CLOUD/TYPE"].downcase == "vcenter"
350
                ds = OpenNebula::Datastore.new_with_id(ds_id, @client)
351
                rc = ds.info
352
                return rc if OpenNebula.is_error?(rc)
353
               self.update("VCENTER_DS_REF=#{ds['/DATASTORE/VCENTER_DS_REF']}", true)
354
            end
355

  
356 345
            return call(VM_METHODS[:deploy],
357 346
                        @pe_id,
358 347
                        host_id.to_i,

Also available in: Unified diff