foreman_fog_proxmox 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e003842a616eebc8bdfaa885461d4d2d683081b41c2e80f97e94eacfc90008c
4
- data.tar.gz: 19eb38e1ad06cc9535aa44da62f31d6168fb174a44c44f8f6bda0f22b08b6820
3
+ metadata.gz: 5e90a84b09846642c70bbaf6332fb71f65952a9d8a34ebe622230b53e39dacbc
4
+ data.tar.gz: 58bd39bcc6cf49c526507418e183ab9ba93e60e1d2f43bd4cebd0243fe2cb0a1
5
5
  SHA512:
6
- metadata.gz: e9f096e4e4a648aedaba6e5fa86cffacd81b6b93bbcfbfdb46be8dea5c70d40a7fecabd6035b553e3f238afbe882f86668c52a9b8810d2d210e19d91334e040e
7
- data.tar.gz: 183f609bbfaf53f45e4ff2cb3def2450d12403c698e84c89b8223dcfdeec2f1d239f166ddcc5935005faa47a939be7dbee68a5e8b691ad10b6a0d8a067d2923b
6
+ metadata.gz: f2f6bea23161fbf3de643311ed2d14320acc1cbec8c2b1bf3aa697227d1839ace643fc751e86388f595444fcb35584df69720973e0934066ad1a3ffd33e3fe64
7
+ data.tar.gz: 1ccd8f20cba817c008bbae6a5bf8906a891d11fa897573c1cfcb38c9310aa2992aff2bd91dc7726681d14004b5240676ffa9b94ea04b00c5c24f33c7483d0824
@@ -22,12 +22,12 @@ module HostExt
22
22
  module Interfaces
23
23
  extend ActiveSupport::Concern
24
24
  def update(attributes = {})
25
- add_interfaces_to_compute_attributes(attributes)
25
+ add_interfaces_to_compute_attributes(attributes) if provider == 'Proxmox' && !attributes.nil? && attributes.key?('compute_attributes')
26
26
  super(attributes)
27
27
  end
28
28
 
29
29
  def add_interfaces_to_compute_attributes(attributes)
30
- attributes['compute_attributes']['interfaces_attributes'] = {}
30
+ attributes['compute_attributes'].store('interfaces_attributes', {})
31
31
  attributes['interfaces_attributes'].each do |index, interface_attributes|
32
32
  add_interface_to_compute_attributes(index, interface_attributes, attributes['compute_attributes']['interfaces_attributes'])
33
33
  end
@@ -63,7 +63,7 @@ module ForemanFogProxmox
63
63
  end
64
64
 
65
65
  def find_vm_in_servers_by_uuid(servers, uuid)
66
- servers.get(uuid)
66
+ servers.get(uuid) if !uuid.nil? && !uuid.to_s.empty?
67
67
  rescue Fog::Errors::NotFound
68
68
  nil
69
69
  rescue StandardError => e
@@ -15,26 +15,27 @@ GNU General Public License for more details.
15
15
  You should have received a copy of the GNU General Public License
16
16
  along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
17
17
 
18
- <% title @vm.name %>
18
+ <% title @vm.name unless @vm.nil? %>
19
19
  <div class='span12'>
20
20
  <table class="table table-bordered table-striped">
21
21
  <tr>
22
22
  <th colspan="2">Properties</th>
23
23
  </tr>
24
-
25
- <%= prop :name %>
26
- <%= prop :type %>
27
- <%= prop :node_id %>
28
- <%= prop :templated? %>
29
- <%= prop :memory %>
30
- <% unless @vm.container? %>
31
- <%= prop :vga %>
24
+ <% unless @vm.nil? %>
25
+ <%= prop :name %>
26
+ <%= prop :type %>
27
+ <%= prop :node_id %>
28
+ <%= prop :templated? %>
29
+ <%= prop :memory %>
30
+ <% unless @vm.container? %>
31
+ <%= prop :vga %>
32
+ <% end %>
33
+ <%= prop :cpus %>
34
+ <%= prop :uptime %>
35
+ <%= prop :vmid %>
36
+ <%= prop :description %>
37
+ <%= prop :disks %>
38
+ <%= prop :nics %>
32
39
  <% end %>
33
- <%= prop :cpus %>
34
- <%= prop :uptime %>
35
- <%= prop :vmid %>
36
- <%= prop :description %>
37
- <%= prop :disks %>
38
- <%= prop :nics %>
39
40
  </table>
40
41
  </div>
@@ -18,5 +18,5 @@
18
18
  # along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  module ForemanFogProxmox
21
- VERSION = '0.9.2'
21
+ VERSION = '0.9.3'
22
22
  end
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.9.2
4
+ version: 0.9.3
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-12-05 00:00:00.000000000 Z
12
+ date: 2019-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: deface