From 3f279836e25bd3084ea3bcc13d1907a87aeadc68 Mon Sep 17 00:00:00 2001 From: Manisha Singhal Date: Thu, 1 Aug 2024 10:19:16 +0200 Subject: [PATCH] Fixes filtering of lxc container nics options (#94) --- lib/fog/proxmox/helpers/nic_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/fog/proxmox/helpers/nic_helper.rb b/lib/fog/proxmox/helpers/nic_helper.rb index 55a6e19..e6a2fac 100644 --- a/lib/fog/proxmox/helpers/nic_helper.rb +++ b/lib/fog/proxmox/helpers/nic_helper.rb @@ -106,7 +106,10 @@ def self.flatten(nic_hash) end nic_value += ',' + Fog::Proxmox::Hash.stringify(options) unless options.empty? else - nic_value = Fog::Proxmox::Hash.stringify(nic_hash.except(%i[id model macaddr])) unless nic_hash.empty? + options = nic_hash.reject do |key, _value| + %i[id model macaddr].include? key.to_sym + end + nic_value = Fog::Proxmox::Hash.stringify(options) unless options.empty? end { "#{nic_hash[:id]}": nic_value } end