foreman_bootdisk 21.2.1 → 21.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22af518eec41db7b328fe2dec27e8ee5c90ff3c8460d0b929e71bd0010099c4f
4
- data.tar.gz: d9a13a4d01c10ee815bf0c442ebf09b8346d207ce249128c0ae37dfc9ab39bc3
3
+ metadata.gz: 6539cd1cc5bfe08bb8c7f8b09b424fd37ebbdafe4c708f124e65b0e3fe2863ce
4
+ data.tar.gz: 861a636231e4e7b539f488df5e64cbeb0089263eb91743513d8b8c020eb85f9d
5
5
  SHA512:
6
- metadata.gz: cdbe2c4b7cbc6329aae46d1ba18bf8a1e99454b980dc95e0047f32e3232d1b13a2a72ab7b12d9e830faf3483db1d5edf20a844825ea511c5f738caf6449eb0c9
7
- data.tar.gz: e9bfe6106dfe46d230d213bed93d74eb085dba094b9a4d8fcce319f596da3dbe4350ed1c380b53cf79332113e7affce11c92833c80f72da801fc56db751f595d
6
+ metadata.gz: cea1a98193a48e6df00a5a498fe48fe410dd92799442e6d732b1d2fd6e0eaf0eacf845f627b012708564b62848b5d5b019910195b9d956ca9c2442a591005bfa
7
+ data.tar.gz: 1ce7b84976143a01d5c113f06f33741ef609cf4df07f8023a3b98222e527aeefb918662b4ab93f11e5f831c46403746a161f2f3f1dc100612fc936f7ee53963b
@@ -32,13 +32,15 @@ module ForemanBootdisk
32
32
  end
33
33
 
34
34
  def iso_attach(iso, vm_uuid)
35
+ controller = controller_config(vm_uuid)
35
36
  options = {
36
37
  'instance_uuid' => vm_uuid,
37
38
  'iso' => "foreman_isos/#{iso}",
38
39
  'datastore' => bootdisk_datastore(vm_uuid),
39
40
  'start_connected' => true,
40
41
  'connected' => true,
41
- 'allow_guest_control' => true
42
+ 'allow_guest_control' => true,
43
+ 'controller_key' => controller[:key]
42
44
  }
43
45
  vm = find_vm_by_uuid(vm_uuid)
44
46
  vm.stop if vm.ready?
@@ -55,6 +57,12 @@ module ForemanBootdisk
55
57
  }
56
58
  client.vm_reconfig_cdrom options
57
59
  end
60
+
61
+ def controller_config(vm_uuid)
62
+ options = OpenStruct.new(server_id: vm_uuid, attributes: {type: RbVmomi::VIM.VirtualAHCIController.class})
63
+ client.add_vm_controller(options)
64
+ client.get_vm_first_sata_controller(vm_uuid)
65
+ end
58
66
  end
59
67
  end
60
68
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanBootdisk
4
- VERSION = '21.2.1'
4
+ VERSION = '21.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_bootdisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.2.1
4
+ version: 21.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-01 00:00:00.000000000 Z
11
+ date: 2024-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: theforeman-rubocop
@@ -189,7 +189,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
189
  requirements:
190
190
  - - ">="
191
191
  - !ruby/object:Gem::Version
192
- version: '2.5'
192
+ version: '2.7'
193
+ - - "<"
194
+ - !ruby/object:Gem::Version
195
+ version: '4'
193
196
  required_rubygems_version: !ruby/object:Gem::Requirement
194
197
  requirements:
195
198
  - - ">="