foreman_fog_proxmox 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of foreman_fog_proxmox might be problematic. Click here for more details.

Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/app/assets/javascripts/foreman_fog_proxmox/proxmox_compute_resource.js +12 -5
  4. data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm_server.js +33 -14
  5. data/app/helpers/proxmox_container_helper.rb +32 -38
  6. data/app/helpers/proxmox_server_helper.rb +34 -39
  7. data/app/helpers/proxmox_vm_helper.rb +1 -20
  8. data/app/models/concerns/fog_extensions/proxmox/interface.rb +29 -0
  9. data/app/models/concerns/fog_extensions/proxmox/node.rb +13 -0
  10. data/app/models/concerns/fog_extensions/proxmox/server.rb +4 -1
  11. data/app/models/concerns/host_ext/proxmox/interfaces.rb +37 -0
  12. data/app/models/concerns/orchestration/proxmox/compute.rb +38 -0
  13. data/app/models/foreman_fog_proxmox/proxmox.rb +71 -36
  14. data/app/overrides/compute_resources_vms/form/remove_new_vm_from_removable_layout.rb +24 -0
  15. data/app/views/compute_resources/form/_proxmox.html.erb +1 -1
  16. data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_networks_form.html.erb +0 -1
  17. data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_networks_new_childs_form.html.erb +0 -1
  18. data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_nic_provider_specific_form.html.erb +0 -1
  19. data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_volumes_edit.html.erb +3 -6
  20. data/app/views/compute_resources_vms/form/proxmox/_removable_layout.html.erb +22 -0
  21. data/app/views/compute_resources_vms/form/proxmox/container/_network.html.erb +2 -1
  22. data/app/views/compute_resources_vms/form/proxmox/container/_volume_mp.html.erb +6 -5
  23. data/app/views/compute_resources_vms/form/proxmox/container/_volume_rootfs.html.erb +3 -3
  24. data/app/views/compute_resources_vms/form/proxmox/server/_network.html.erb +2 -1
  25. data/app/views/compute_resources_vms/form/proxmox/server/_volume.html.erb +5 -4
  26. data/app/views/compute_resources_vms/show/_proxmox.html.erb +1 -1
  27. data/lib/foreman_fog_proxmox/engine.rb +4 -0
  28. data/lib/foreman_fog_proxmox/version.rb +1 -1
  29. data/test/unit/foreman_fog_proxmox/helpers/proxmox_container_helper_test.rb +28 -29
  30. data/test/unit/foreman_fog_proxmox/helpers/proxmox_server_helper_test.rb +28 -27
  31. data/test/unit/foreman_fog_proxmox/helpers/proxmox_vm_helper_test.rb +0 -25
  32. data/test/unit/foreman_fog_proxmox/proxmox_test.rb +215 -5
  33. data/test/unit/foreman_fog_proxmox/proxmox_test_helpers.rb +10 -2
  34. metadata +9 -4
@@ -45,7 +45,7 @@ module ForemanFogProxmox
45
45
  def mock_server_vm
46
46
  interface_attributes = {
47
47
  id: 'net0',
48
- mac: '36:25:8C:53:0C:50',
48
+ macaddr: '36:25:8C:53:0C:50',
49
49
  model: 'virtio',
50
50
  name: nil,
51
51
  ip: nil,
@@ -111,9 +111,13 @@ module ForemanFogProxmox
111
111
  config.stubs(:attributes).returns(config_attributes)
112
112
  config.stubs(:disks).returns(volumes)
113
113
  config.stubs(:interfaces).returns(interfaces)
114
+ config.stubs(:respond_to?).returns(true)
114
115
  vm = mock('vm')
116
+ vm.stubs(:respond_to?).returns(true)
115
117
  vm.stubs(:config).returns(config)
116
118
  vm.stubs(:type).returns('qemu')
119
+ vm.stubs(:identity).returns(100)
120
+ vm.stubs(:node_id).returns('pve')
117
121
  service = mock('service')
118
122
  vm_attributes = {
119
123
  vmid: 100,
@@ -202,7 +206,6 @@ module ForemanFogProxmox
202
206
  password: 'proxmox01',
203
207
  onboot: 0,
204
208
  startup: nil,
205
- rootfs: 'local-lvm:vm-100-disk-1',
206
209
  cores: 1,
207
210
  cpuunits: nil,
208
211
  cpulimit: nil,
@@ -222,9 +225,14 @@ module ForemanFogProxmox
222
225
  config.stubs(:attributes).returns(config_attributes)
223
226
  config.stubs(:disks).returns(volumes)
224
227
  config.stubs(:interfaces).returns(interfaces)
228
+ config.stubs(:respond_to?).returns(true)
225
229
  vm = mock('vm')
230
+ vm.stubs(:respond_to?).returns(true)
226
231
  vm.stubs(:config).returns(config)
227
232
  vm.stubs(:type).returns('lxc')
233
+ vm.stubs(:identity).returns(100)
234
+ vm.stubs(:node_id).returns('pve')
235
+ vm.stubs(:identity).returns(100)
228
236
  service = mock('service')
229
237
  vm_attributes = {
230
238
  vmid: 100,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_fog_proxmox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tristan Robert
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-20 00:00:00.000000000 Z
12
+ date: 2019-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog-proxmox
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0.7'
20
+ version: '0.8'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '0.7'
27
+ version: '0.8'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: deface
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -106,10 +106,13 @@ files:
106
106
  - app/helpers/proxmox_server_helper.rb
107
107
  - app/helpers/proxmox_vm_helper.rb
108
108
  - app/models/concerns/fog_extensions/proxmox/disk.rb
109
+ - app/models/concerns/fog_extensions/proxmox/interface.rb
109
110
  - app/models/concerns/fog_extensions/proxmox/node.rb
110
111
  - app/models/concerns/fog_extensions/proxmox/server.rb
111
112
  - app/models/concerns/fog_extensions/proxmox/server_config.rb
112
113
  - app/models/concerns/fog_extensions/proxmox/volume.rb
114
+ - app/models/concerns/host_ext/proxmox/interfaces.rb
115
+ - app/models/concerns/orchestration/proxmox/compute.rb
113
116
  - app/models/foreman_fog_proxmox/options_select.rb
114
117
  - app/models/foreman_fog_proxmox/proxmox.rb
115
118
  - app/overrides/compute_resources_vms/form/add_clone_to_new_vm_compute_detail.rb
@@ -118,6 +121,7 @@ files:
118
121
  - app/overrides/compute_resources_vms/form/add_vm_type_to_nic_provider_specific_form.rb
119
122
  - app/overrides/compute_resources_vms/form/add_vm_type_to_volumes_edit.rb
120
123
  - app/overrides/compute_resources_vms/form/add_vm_type_to_volumes_new_volume.rb
124
+ - app/overrides/compute_resources_vms/form/remove_new_vm_from_removable_layout.rb
121
125
  - app/services/foreman_fog_proxmox/node_dashboard/data.rb
122
126
  - app/views/api/v2/compute_resources/proxmox.json.rabl
123
127
  - app/views/compute_resources/form/_proxmox.html.erb
@@ -132,6 +136,7 @@ files:
132
136
  - app/views/compute_resources_vms/form/proxmox/_base.html.erb
133
137
  - app/views/compute_resources_vms/form/proxmox/_general.html.erb
134
138
  - app/views/compute_resources_vms/form/proxmox/_network.html.erb
139
+ - app/views/compute_resources_vms/form/proxmox/_removable_layout.html.erb
135
140
  - app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb
136
141
  - app/views/compute_resources_vms/form/proxmox/container/_config.html.erb
137
142
  - app/views/compute_resources_vms/form/proxmox/container/_extended.html.erb