Skip to content

Commit dd03bba

Browse files
author
Kees van Veen
committed
another attempt to comply with rubocop
1 parent 7c75188 commit dd03bba

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

app/models/foreman_fog_proxmox/proxmox_volumes.rb

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,20 @@ def update_extra_volumes_definitions(data_in)
3333
# Start to look into the data that needs to be updated
3434
volumes_attributes = {}
3535
value.each do |index, dev_specs|
36-
nr_of_keys_found = dev_specs.keys.count
3736

3837
# Only if this contains only 1 set like: {"size"=>"xxGB"}
39-
if #{index} > 0 && nr_of_keys_found == 1
38+
if #{index} > 0 && dev_specs.keys.count == 1
4039

4140
# Copy the data from the first entry
42-
newid = "#{value['0']['controller']}#{index}"
41+
newid = "#{value['0']['controller']}#{index}"
4342
newdev = {
4443
'storage_type' => value['0']['storage_type'],
45-
'storage' => value['0']['storage'],
46-
'controller' => value['0']['controller'],
47-
'cache' => value['0']['cache'],
48-
'device' => index,
49-
'id' => newid,
50-
'size' => dev_specs['size'],
44+
'storage' => value['0']['storage'],
45+
'controller' => value['0']['controller'],
46+
'cache' => value['0']['cache'],
47+
'device' => index,
48+
'id' => newid,
49+
'size' => dev_specs['size'],
5150
}
5251
volumes_attributes[index] = newdev
5352
else

0 commit comments

Comments
 (0)