1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

wild and vm_name parameters removed (#2369)

(cherry picked from commit 820579ee04f94bc08bf8a29744a0113804dfa553)
This commit is contained in:
Sergio Semedi Barranco 2018-08-28 04:35:07 +02:00 committed by Tino Vazquez
parent 121db6dcfd
commit 6fb85b1b94
3 changed files with 7 additions and 14 deletions

View File

@ -44,8 +44,6 @@ def self.import_wild(host_id, vm_ref, one_vm, template)
vcenter_vm = VCenterDriver::VirtualMachine.new_without_id(vi_client, vm_ref)
vm_name = vcenter_vm["name"]
wild = true
type = {:object => "VM", :id => vm_name}
error, template_disks = vcenter_vm.import_vcenter_disks(vc_uuid, dpool, ipool, type)
return OpenNebula::Error.new(error) if !error.empty?
@ -53,12 +51,12 @@ def self.import_wild(host_id, vm_ref, one_vm, template)
template << template_disks
# Create images or get nics information for template
error, template_nics, ar_ids = vcenter_vm.import_vcenter_nics(vc_uuid,
npool,
hpool,
vc_name,
vm_ref,
vm_name)
error, template_nics, ar_ids = vcenter_vm
.import_vcenter_nics(vc_uuid,
npool,
hpool,
vc_name,
vm_ref)
if !error.empty?
if !ar_ids.nil?

View File

@ -135,7 +135,6 @@ class Network
unmanaged = opts[:unmanaged] || nil
template_ref = opts[:template_ref] || nil
dc_ref = opts[:dc_ref] || nil
vm_or_template_name = opts[:vm_or_template_name] || nil
template_id = opts[:template_id] || nil
bridge_name = network_name

View File

@ -435,7 +435,7 @@ class Template
end
def import_vcenter_nics(vc_uuid, npool, hpool, vcenter_instance_name,
template_ref, wild, vm_name=nil, vm_id=nil, dc_name=nil)
template_ref, vm_id=nil, dc_name=nil)
nic_info = ""
error = ""
ar_ids = {}
@ -528,7 +528,6 @@ class Template
:unmanaged=> unmanaged,
:template_ref=> template_ref,
:dc_ref=> dc_ref,
:vm_or_template_name=> vm_name,
:template_id=> vm_id
}
@ -3569,15 +3568,12 @@ class VmImporter < VCenterDriver::VcImporter
working_template[:one] << template_disks
template_moref = template_copy_ref ? template_copy_ref : selected[:vcenter_ref]
wild = false
error, template_nics, ar_ids, allocated_nets = template.import_vcenter_nics(vc_uuid,
npool,
hpool,
vcenter,
template_moref,
wild,
template["name"],
id,
dc)