foreman_nutanix 0.0.5 → 0.0.6

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: f2fe33e8b9f7999fbd374d6dfa10f3c52005004299dfe6b7003c297d46e46d3a
4
- data.tar.gz: ca98e7a92c0a5867d1c637d41e825df7c840e515098f75246a6d2fe7cc57a5fd
3
+ metadata.gz: 649b828adcd2f71eb4948c2a005a5fd3e21c251588d16e55160d34b34436e7a4
4
+ data.tar.gz: '0729eac7438b5956415018a158a3097f190952f308986f64be2a69a63081cdb1'
5
5
  SHA512:
6
- metadata.gz: 48bd46610653b7629b1c28c1cd3fceb44bd65e3131d36964c1b6f9376db1810d116a935072f31aa074faaefbcf8d94cd6d27baaabf1dc4035719bc66b2a0686e
7
- data.tar.gz: 45a9ee8ce535a062ed664264533ecb17e28e24c5b8eec1956d27dfd9dbbfa82d288e0b0b1bfcb24d5d4458b84fa800d335eb47ecf47c9290f25b5997da18a2f0
6
+ metadata.gz: 8d29846a1f3416fd5a96567d438a77baa6310ba3afedc00aee27edf2e5bcf1a4f419aca4c3b08deb03df49612d9a2298f074a3d80ad5600a4adbfc8c5f40e098
7
+ data.tar.gz: 72c26e9df3cceb9678a20214f545acca131ba732757a10daf6ac6bc2fce1479bdfc49f8030295623c6555a76d6b7aa2e485bf8f131caec36b204416104dfaec3
@@ -1,5 +1,7 @@
1
1
  module ForemanNutanix
2
2
  class NutanixAdapter
3
+ include Enumerable
4
+
3
5
  def initialize(cluster)
4
6
  Rails.logger.info "=== NUTANIX: NutanixAdapter::initialize cluster=#{cluster} ==="
5
7
  @cluster = cluster
@@ -425,7 +425,8 @@ module ForemanNutanix
425
425
  # Associate host with VM
426
426
  def associated_host(vm)
427
427
  Rails.logger.info "=== NUTANIX: ASSOCIATED_HOST CALLED for vm: #{vm.name} ==="
428
- associate_by('ip', [vm.vm_ip_address, vm.private_ip_address])
428
+ macs = vm.interfaces.map(&:mac)
429
+ associate_by('mac', macs)
429
430
  end
430
431
 
431
432
  # User data support
@@ -1,3 +1,3 @@
1
1
  module ForemanNutanix
2
- VERSION = '0.0.5'.freeze
2
+ VERSION = '0.0.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_nutanix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Granger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-09 00:00:00.000000000 Z
11
+ date: 2025-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc