opennebula 6.2.1 → 6.3.85.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ActionManager.rb +1 -1
  3. data/lib/CommandManager.rb +1 -1
  4. data/lib/DriverExecHelper.rb +1 -1
  5. data/lib/OpenNebulaDriver.rb +1 -1
  6. data/lib/VirtualMachineDriver.rb +1 -1
  7. data/lib/cloud/CloudClient.rb +3 -3
  8. data/lib/datacenter.rb +1 -1
  9. data/lib/datastore.rb +2 -2
  10. data/lib/distributed_firewall.rb +1 -1
  11. data/lib/file_helper.rb +2 -2
  12. data/lib/host.rb +4 -3
  13. data/lib/logical_port.rb +1 -1
  14. data/lib/logical_switch.rb +1 -1
  15. data/lib/memoize.rb +1 -1
  16. data/lib/models/role.rb +1 -1
  17. data/lib/models/service.rb +98 -56
  18. data/lib/models.rb +1 -1
  19. data/lib/network.rb +1 -1
  20. data/lib/nsx_client.rb +1 -1
  21. data/lib/nsx_component.rb +1 -1
  22. data/lib/nsx_constants.rb +1 -1
  23. data/lib/nsx_driver.rb +1 -1
  24. data/lib/nsx_error.rb +1 -1
  25. data/lib/nsx_rule.rb +1 -1
  26. data/lib/nsxt_client.rb +1 -1
  27. data/lib/nsxt_dfw.rb +1 -1
  28. data/lib/nsxt_logical_port.rb +1 -1
  29. data/lib/nsxt_rule.rb +1 -1
  30. data/lib/nsxt_tz.rb +1 -1
  31. data/lib/nsxv_client.rb +1 -1
  32. data/lib/nsxv_dfw.rb +1 -1
  33. data/lib/nsxv_logical_port.rb +1 -1
  34. data/lib/nsxv_rule.rb +1 -1
  35. data/lib/nsxv_tz.rb +1 -1
  36. data/lib/opaque_network.rb +1 -1
  37. data/lib/opennebula/acl.rb +1 -1
  38. data/lib/opennebula/acl_pool.rb +1 -1
  39. data/lib/opennebula/client.rb +1 -1
  40. data/lib/opennebula/cluster.rb +1 -1
  41. data/lib/opennebula/cluster_pool.rb +1 -1
  42. data/lib/opennebula/datastore.rb +1 -1
  43. data/lib/opennebula/datastore_pool.rb +1 -1
  44. data/lib/opennebula/document.rb +1 -1
  45. data/lib/opennebula/document_json.rb +1 -1
  46. data/lib/opennebula/document_pool.rb +1 -1
  47. data/lib/opennebula/document_pool_json.rb +1 -1
  48. data/lib/opennebula/error.rb +1 -1
  49. data/lib/opennebula/flow/grammar.rb +1 -1
  50. data/lib/opennebula/flow/service_pool.rb +7 -3
  51. data/lib/opennebula/flow/service_template.rb +7 -1
  52. data/lib/opennebula/flow/service_template_ext.rb +1 -1
  53. data/lib/opennebula/flow/service_template_pool.rb +1 -1
  54. data/lib/opennebula/flow/validator.rb +1 -1
  55. data/lib/opennebula/flow.rb +1 -1
  56. data/lib/opennebula/group.rb +1 -1
  57. data/lib/opennebula/group_pool.rb +1 -1
  58. data/lib/opennebula/hook.rb +1 -1
  59. data/lib/opennebula/hook_log.rb +1 -1
  60. data/lib/opennebula/hook_pool.rb +1 -1
  61. data/lib/opennebula/host.rb +13 -5
  62. data/lib/opennebula/host_pool.rb +1 -1
  63. data/lib/opennebula/image.rb +1 -1
  64. data/lib/opennebula/image_pool.rb +1 -1
  65. data/lib/opennebula/ldap_auth.rb +1 -1
  66. data/lib/opennebula/ldap_auth_spec.rb +1 -1
  67. data/lib/opennebula/lockable_ext.rb +1 -1
  68. data/lib/opennebula/marketplace.rb +1 -1
  69. data/lib/opennebula/marketplace_pool.rb +1 -1
  70. data/lib/opennebula/marketplaceapp.rb +1 -1
  71. data/lib/opennebula/marketplaceapp_ext.rb +158 -33
  72. data/lib/opennebula/marketplaceapp_pool.rb +1 -1
  73. data/lib/opennebula/oneflow_client.rb +53 -26
  74. data/lib/opennebula/pool.rb +1 -1
  75. data/lib/opennebula/pool_element.rb +1 -1
  76. data/lib/opennebula/security_group.rb +1 -1
  77. data/lib/opennebula/security_group_pool.rb +1 -1
  78. data/lib/opennebula/server_cipher_auth.rb +1 -1
  79. data/lib/opennebula/server_x509_auth.rb +1 -1
  80. data/lib/opennebula/ssh_auth.rb +1 -1
  81. data/lib/opennebula/system.rb +1 -1
  82. data/lib/opennebula/template.rb +1 -1
  83. data/lib/opennebula/template_ext.rb +1 -1
  84. data/lib/opennebula/template_pool.rb +1 -1
  85. data/lib/opennebula/user.rb +1 -1
  86. data/lib/opennebula/user_pool.rb +1 -1
  87. data/lib/opennebula/utils.rb +1 -1
  88. data/lib/opennebula/vdc.rb +1 -1
  89. data/lib/opennebula/vdc_pool.rb +1 -1
  90. data/lib/opennebula/virtual_machine.rb +27 -2
  91. data/lib/opennebula/virtual_machine_ext.rb +1 -1
  92. data/lib/opennebula/virtual_machine_pool.rb +1 -1
  93. data/lib/opennebula/virtual_network.rb +39 -2
  94. data/lib/opennebula/virtual_network_pool.rb +1 -1
  95. data/lib/opennebula/virtual_router.rb +1 -1
  96. data/lib/opennebula/virtual_router_pool.rb +1 -1
  97. data/lib/opennebula/vm_group.rb +1 -1
  98. data/lib/opennebula/vm_group_pool.rb +1 -1
  99. data/lib/opennebula/vntemplate.rb +1 -1
  100. data/lib/opennebula/vntemplate_pool.rb +1 -1
  101. data/lib/opennebula/wait_ext.rb +1 -1
  102. data/lib/opennebula/x509_auth.rb +1 -1
  103. data/lib/opennebula/xml_element.rb +1 -1
  104. data/lib/opennebula/xml_pool.rb +1 -1
  105. data/lib/opennebula/xml_utils.rb +1 -1
  106. data/lib/opennebula/zone.rb +1 -1
  107. data/lib/opennebula/zone_pool.rb +1 -1
  108. data/lib/opennebula.rb +2 -2
  109. data/lib/rest_client.rb +1 -1
  110. data/lib/scripts_common.rb +6 -1
  111. data/lib/transport_zone.rb +1 -1
  112. data/lib/vcenter_driver.rb +1 -1
  113. data/lib/vcenter_importer.rb +10 -12
  114. data/lib/vi_client.rb +1 -1
  115. data/lib/vi_helper.rb +18 -3
  116. data/lib/virtual_machine.rb +21 -12
  117. data/lib/virtual_wire.rb +1 -1
  118. data/lib/vm_disk.rb +1 -1
  119. data/lib/vm_folder.rb +1 -1
  120. data/lib/vm_helper.rb +1 -1
  121. data/lib/vm_monitor.rb +5 -1
  122. data/lib/vm_nic.rb +1 -1
  123. data/lib/vm_template.rb +60 -4
  124. data/lib/vmm_importer.rb +10 -7
  125. metadata +4 -4
data/lib/vi_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -97,7 +97,12 @@ module VCenterDriver
97
97
 
98
98
  def self.one_item(the_class, id, exit_if_fail = true)
99
99
  item = the_class.new_with_id(id, client)
100
- rc = item.info
100
+ rc=nil
101
+ if the_class == OpenNebula::VirtualMachine
102
+ rc = item.info(true)
103
+ else
104
+ rc = item.info
105
+ end
101
106
  return_if_error(rc, item, exit_if_fail)
102
107
  end
103
108
 
@@ -118,6 +123,16 @@ module VCenterDriver
118
123
  return_if_error(rc, item, exit_if_fail)
119
124
  end
120
125
 
126
+ # Since https://github.com/OpenNebula/one/issues/5689
127
+ # there two deploy_ids allowed:
128
+ # * moref, eg: vm-567
129
+ # * moref +"_" + vcenter uuid, eg:
130
+ # 2499952a-6c85-480e-b7df-4cbd2137eb69_vm-456
131
+ # This function will always return the moref
132
+ def self.get_deploy_id(deploy_id)
133
+ deploy_id.split('_')[0]
134
+ end
135
+
121
136
  def self.find_by_name(the_class, name, pool = nil, raise_if_fail = true)
122
137
  pool = one_pool(the_class, raise_if_fail) if pool.nil?
123
138
  element = pool.find {|e| e['NAME'] == name.to_s }
@@ -251,7 +266,7 @@ module VCenterDriver
251
266
  # Let's try to find the VM object only by its name
252
267
  # Let's build the VM name
253
268
  vm_prefix = host['TEMPLATE/VM_PREFIX']
254
- vm_prefix = VM_PREFIX_DEFAULT if vm_prefix.nil? || vm_prefix.empty?
269
+ vm_prefix = VM_PREFIX_DEFAULT if vm_prefix.nil?
255
270
  vm_prefix.gsub!('$i', one_vm['ID'])
256
271
  vm_name = vm_prefix + one_vm['NAME']
257
272
 
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -103,6 +103,7 @@ end
103
103
 
104
104
  def initialize(vi_client, ref, one_id)
105
105
  if ref
106
+ ref = VCenterDriver::VIHelper.get_deploy_id(ref)
106
107
  @item = RbVmomi::VIM::VirtualMachine.new(vi_client.vim, ref)
107
108
  check_item(@item, RbVmomi::VIM::VirtualMachine)
108
109
  end
@@ -470,7 +471,7 @@ end
470
471
  # @return String vcenter name
471
472
  def vc_name
472
473
  vm_prefix = host['TEMPLATE/VM_PREFIX']
473
- vm_prefix = VM_PREFIX_DEFAULT if vm_prefix.nil? || vm_prefix.empty?
474
+ vm_prefix = VM_PREFIX_DEFAULT if vm_prefix.nil?
474
475
 
475
476
  if !one_item['USER_TEMPLATE/VM_PREFIX'].nil?
476
477
  vm_prefix = one_item['USER_TEMPLATE/VM_PREFIX']
@@ -1713,8 +1714,13 @@ end
1713
1714
  def sync(deploy = {})
1714
1715
  extraconfig = []
1715
1716
  device_change = []
1717
+ sync_opt = nil
1716
1718
 
1717
- disks = sync_disks(:all, false)
1719
+ # Disk are only synced with :all option when VM is first created
1720
+ # NOTE: Detach actions are implemented through TM (not sync)
1721
+ sync_opt = :all if deploy[:new] == true
1722
+
1723
+ disks = sync_disks(sync_opt, false)
1718
1724
  resize_unmanaged_disks
1719
1725
 
1720
1726
  if deploy[:boot] && !deploy[:boot].empty?
@@ -1778,6 +1784,8 @@ end
1778
1784
  end
1779
1785
 
1780
1786
  def extraconfig_context
1787
+ one_item.info(true)
1788
+
1781
1789
  context_text = "# Context variables generated by OpenNebula\n"
1782
1790
  one_item.each('TEMPLATE/CONTEXT/*') do |context_element|
1783
1791
  # next if !context_element.text
@@ -1852,7 +1860,7 @@ end
1852
1860
  begin
1853
1861
  @item.ReconfigVM_Task(:spec => spec).wait_for_completion
1854
1862
  rescue StandardError => e
1855
- error = "Cannot create snapshot for VM: #{e.message}."
1863
+ error = "Cannot generate VM context info: #{e.message}."
1856
1864
 
1857
1865
  if VCenterDriver::CONFIG[:debug_information]
1858
1866
  error += "\n\n#{e.backtrace}"
@@ -2306,6 +2314,7 @@ end
2306
2314
  detach_disk_array = []
2307
2315
  extra_config = []
2308
2316
  keys = disk_keys.invert
2317
+
2309
2318
  ipool = VCenterDriver::VIHelper.one_pool(OpenNebula::ImagePool)
2310
2319
  disks_each(:detached?) do |d|
2311
2320
  key = d.key.to_s
@@ -2381,8 +2390,7 @@ end
2381
2390
  # @param option [symbol] if :all is provided the
2382
2391
  # method will try to sync
2383
2392
  # all the disks (detached and not existing ones)
2384
- # otherwishe it will only sync
2385
- # the disks that are not existing
2393
+ # otherwise it will only sync the disks that are not existing
2386
2394
  #
2387
2395
  # @param execute [boolean] indicates if the reconfigure operation
2388
2396
  # is going to
@@ -2432,8 +2440,8 @@ end
2432
2440
  # https://github.com/OpenNebula/one/issues/5409
2433
2441
  if snapshots? || one_snapshots?
2434
2442
  error_msg = 'Existing sytem snapshots, cannot change disks. '
2435
- error_msg << 'Please remove all snapshots and try again.'
2436
- raise error_message
2443
+ error_msg << 'Please remove all snapshots and try again'
2444
+ raise error_msg
2437
2445
  end
2438
2446
 
2439
2447
  spec_hash = {}
@@ -2619,7 +2627,7 @@ end
2619
2627
 
2620
2628
  if snapshots? || one_snapshots?
2621
2629
  error_message = 'Existing sytem snapshots, cannot change disks'
2622
- error_message << '. Please remove all snapshots and try again.'
2630
+ error_message << '. Please remove all snapshots and try again'
2623
2631
  raise error_message
2624
2632
  end
2625
2633
 
@@ -3070,10 +3078,10 @@ end
3070
3078
  @item.ReconfigVM_Task(:spec => vm_config_spec).wait_for_completion
3071
3079
 
3072
3080
  devices.each do |device|
3073
- next unless first_ &&
3081
+ valid_device =
3082
+ device.class == RbVmomi::VIM::VirtualLsiLogicController &&
3074
3083
  device.key == scsi_key
3075
-
3076
- controller = device.deviceInfo.label
3084
+ controller = device.deviceInfo.label if valid_device
3077
3085
  end
3078
3086
 
3079
3087
  controller
@@ -3430,6 +3438,7 @@ end
3430
3438
  config[:esx_migration_list] = 'Selected_by_DRS'
3431
3439
  end
3432
3440
 
3441
+ vc_vm.reference_all_disks
3433
3442
  vc_vm.migrate(config)
3434
3443
 
3435
3444
  vm.replace({ 'VCENTER_CCR_REF' => ccr_ref })
data/lib/virtual_wire.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/vm_disk.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/vm_folder.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/vm_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/vm_monitor.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -275,6 +275,10 @@ module VirtualMachineMonitor
275
275
  info_disks.each do |disk|
276
276
  next if disk[1].no_exists?
277
277
 
278
+ # disk[0] contains the disk ID in OpenNebula or the disk path if
279
+ # there is no corresponding OpenNebula disk
280
+ # disk[1] contains the vcenter resource corresponding to the VM disk
281
+
278
282
  # Delete special characters
279
283
  name = disk[0].gsub(/[^0-9A-Za-z]/, '_')
280
284
 
data/lib/vm_nic.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/vm_template.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -408,13 +408,25 @@ module VCenterDriver
408
408
  break
409
409
  end
410
410
 
411
+ # Read configuration for imported images, taking
412
+ # into account if we are importing a VM Tempalte
413
+ # or a Wild VM
414
+ image_persistency = nil
415
+ if vm?
416
+ image_persistency = :wild_vm_persistent_images
417
+ else
418
+ image_persistency = :vm_template_persistent_images
419
+ end
420
+
421
+ image_persistency = VCenterDriver::CONFIG[image_persistency]
422
+
411
423
  params = {
412
424
  :disk => disk,
413
425
  :ipool => ipool,
414
426
  :_type => type,
415
427
  :ds_id => datastore_found['ID'],
416
428
  :opts => {
417
- :persistent => vm? ? 'YES':'NO'
429
+ :persistent => image_persistency ? 'YES':'NO'
418
430
  },
419
431
  :images => images
420
432
  }
@@ -623,6 +635,23 @@ module VCenterDriver
623
635
 
624
636
  network.info
625
637
 
638
+ if nic[:ipv4] || nic[:ipv6]
639
+ ar_array = network.to_hash['VNET']['AR_POOL']['AR']
640
+ ar_array = [ar_array] if ar_array.is_a?(Hash)
641
+
642
+ ipv4, _ipv6, _arid = find_ip_in_ar(
643
+ IPAddr.new(nic[:ipv4]),
644
+ ar_array
645
+ ) if ar_array && nic[:ipv4]
646
+
647
+ _ipv4, ipv6, _arid = find_ip_in_ar(
648
+ IPAddr.new(nic[:ipv6]),
649
+ ar_array
650
+ ) if ar_array && nic[:ipv6]
651
+
652
+ return [ipv4, ipv6]
653
+ end
654
+
626
655
  # Iterate over Retrieve vCenter VM NICs
627
656
  unless vm_object.item.guest.net.empty?
628
657
  vm_object.item.guest.net.each do |net|
@@ -755,9 +784,10 @@ module VCenterDriver
755
784
  nic_tmp = "NIC=[\n"
756
785
  nic_tmp << "NETWORK_ID=\"#{one_vn.id}\",\n"
757
786
  nic_tmp << "NAME =\"VC_NIC#{nic_index}\",\n"
787
+ nic_tmp << "IP = \"#{nic[:ipv4]}\",\n" if nic[:ipv4]
758
788
 
759
789
  if vm?
760
- if nic[:mac]
790
+ if nic[:mac] && !nic[:ipv4]
761
791
  nic_tmp << "MAC=\"#{nic[:mac]}\",\n"
762
792
  end
763
793
  if nic[:ipv4_additionals]
@@ -813,6 +843,7 @@ module VCenterDriver
813
843
  ar_tmp = create_ar(nic)
814
844
  network_found.add_ar(ar_tmp)
815
845
  end
846
+
816
847
  ipv4, ipv6 = find_ips_in_network(network_found, vm_object,
817
848
  nic, true)
818
849
  network_found.info
@@ -824,8 +855,10 @@ module VCenterDriver
824
855
  if nic[:mac] && ipv4.empty? && ipv6.empty?
825
856
  nic_tmp << "MAC=\"#{nic[:mac]}\",\n"
826
857
  end
858
+
827
859
  nic_tmp << "IP=\"#{ipv4}\"," unless ipv4.empty?
828
860
  nic_tmp << "IP6=\"#{ipv6}\"," unless ipv6.empty?
861
+
829
862
  if nic[:ipv4_additionals]
830
863
  nic_tmp <<
831
864
  'VCENTER_ADDITIONALS_IP4'\
@@ -1053,7 +1086,13 @@ module VCenterDriver
1053
1086
  ar_tmp << "]\n"
1054
1087
 
1055
1088
  if vm?
1056
- ar_tmp << create_ar(nic, true)
1089
+ ar_tmp << create_ar(nic, false, nic[:ipv4]) if nic[:ipv4]
1090
+
1091
+ if nic[:ipv6]
1092
+ ar_tmp << create_ar(nic, false, nil, nic[:ipv6])
1093
+ end
1094
+
1095
+ ar_tmp << create_ar(nic, true) if !nic[:ipv4] && !nic[:ipv6]
1057
1096
  end
1058
1097
 
1059
1098
  one_vnet[:one] << ar_tmp
@@ -1108,6 +1147,23 @@ module VCenterDriver
1108
1147
  nic_index = 0
1109
1148
 
1110
1149
  vc_nics.each do |nic|
1150
+ [:ipv4, :ipv6].each do |type|
1151
+ if nic[type]
1152
+ opts[type].shift if opts[type]
1153
+ next
1154
+ end
1155
+
1156
+ begin
1157
+ ip = opts[type].shift if opts[type]
1158
+
1159
+ # Check if it is a valid IP
1160
+ IPAddr.new(ip)
1161
+
1162
+ nic[type] = ip
1163
+ rescue StandardError
1164
+ end
1165
+ end
1166
+
1111
1167
  # Check if the network already exists
1112
1168
  network_found =
1113
1169
  VCenterDriver::VIHelper
data/lib/vmm_importer.rb CHANGED
@@ -46,7 +46,8 @@ module VCenterDriver
46
46
  vm_ref = selected['DEPLOY_ID'] || selected[:wild]['DEPLOY_ID']
47
47
  vm = selected[:one_item] || build
48
48
  template = selected[:template] || import_tmplt
49
- host_id = selected[:host] || @list.keys[0]
49
+ template = "DEPLOY_ID = #{vm_ref}\n" + template
50
+ host_id = selected[:host] || @list.keys[0]
50
51
 
51
52
  vc_uuid = @vi_client.vim.serviceContent.about.instanceUuid
52
53
  vc_name = @vi_client.vim.host
@@ -72,13 +73,15 @@ module VCenterDriver
72
73
  template << template_disks
73
74
 
74
75
  opts = {
75
- :vi_client => @vi_client,
76
- :vc_uuid => vc_uuid,
77
- :npool => npool,
78
- :hpool => hpool,
79
- :vcenter => vc_name,
76
+ :vi_client => @vi_client,
77
+ :vc_uuid => vc_uuid,
78
+ :npool => npool,
79
+ :hpool => hpool,
80
+ :vcenter => vc_name,
80
81
  :template_moref => vm_ref,
81
- :vm_object => vc_vm
82
+ :vm_object => vc_vm,
83
+ :ipv4 => selected[:ipv4],
84
+ :ipv6 => selected[:ipv6]
82
85
  }
83
86
 
84
87
  # Create images or get nics information for template
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.1
4
+ version: 6.3.85.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-10 00:00:00.000000000 Z
11
+ date: 2022-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -255,9 +255,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
255
  version: '0'
256
256
  required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  requirements:
258
- - - ">="
258
+ - - ">"
259
259
  - !ruby/object:Gem::Version
260
- version: '0'
260
+ version: 1.3.1
261
261
  requirements: []
262
262
  rubygems_version: 3.1.2
263
263
  signing_key: