Revision 05866177
src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb | ||
---|---|---|
748 | 748 |
template_hash = sha256.hexdigest(full_name)[0..11] |
749 | 749 |
template_name = template_name.tr("\u007F", "") |
750 | 750 |
template_ccr_name = template_ccr_name.tr("\u007F", "") |
751 |
import_name = "#{template_name} - #{template_ccr_name} [#{vcenter_instance_name} - #{dc_name}]_#{template_hash}"
|
|
751 |
import_name = "#{template_name} - #{template_ccr_name} #{template_hash}" |
|
752 | 752 |
|
753 | 753 |
# Prepare the Hash that will be used by importers to display |
754 | 754 |
# the object being imported |
... | ... | |
773 | 773 |
"TEMPLATE/VCENTER_CCR_REF", |
774 | 774 |
template_ccr_ref, |
775 | 775 |
vcenter_uuid) |
776 |
host_id = one_host["ID"] |
|
776 |
host_id = one_host["ID"] |
|
777 |
cluster_id = one_host["CLUSTER_ID"] |
|
777 | 778 |
raise "Could not find the host's ID associated to template being imported" if !host_id |
778 | 779 |
|
779 | 780 |
# Get the OpenNebula's template hash |
780 |
one_tmp[:one] = template_to_one(template, vcenter_uuid, template_ccr_ref, template_ccr_name, import_name, host_id) |
|
781 |
one_tmp[:one] = template_to_one(template, vcenter_uuid, template_ccr_ref, template_ccr_name, import_name, host_id, cluster_id)
|
|
781 | 782 |
return one_tmp |
782 | 783 |
rescue |
783 | 784 |
return nil |
Also available in: Unified diff