Skip to content

Commit 3f27983

Browse files
authored
Fixes filtering of lxc container nics options (#94)
1 parent 5b84235 commit 3f27983

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/fog/proxmox/helpers/nic_helper.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ def self.flatten(nic_hash)
106106
end
107107
nic_value += ',' + Fog::Proxmox::Hash.stringify(options) unless options.empty?
108108
else
109-
nic_value = Fog::Proxmox::Hash.stringify(nic_hash.except(%i[id model macaddr])) unless nic_hash.empty?
109+
options = nic_hash.reject do |key, _value|
110+
%i[id model macaddr].include? key.to_sym
111+
end
112+
nic_value = Fog::Proxmox::Hash.stringify(options) unless options.empty?
110113
end
111114
{ "#{nic_hash[:id]}": nic_value }
112115
end

0 commit comments

Comments
 (0)