mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-01 05:47:01 +03:00
L #-: Adjust for new rubocop version
(cherry picked from commit 2eeea9b80ba896d0b293c49000c93b84e5558b68)
This commit is contained in:
parent
b369372f62
commit
828d3b38c3
@ -208,6 +208,7 @@ class LXCVM < OpenNebulaVM
|
||||
@xml.elements('//TEMPLATE/DISK').each do |xml|
|
||||
next if xml['TYPE'].downcase == 'swap'
|
||||
|
||||
# rubocop:disable Style/ConditionalAssignment
|
||||
if xml['DISK_ID'] == @rootfs_id
|
||||
adisks << Disk.new_root(xml, @sysds_path, @vm_id,
|
||||
@lxcrc[:mountopts])
|
||||
@ -215,6 +216,7 @@ class LXCVM < OpenNebulaVM
|
||||
adisks << Disk.new_disk(xml, @sysds_path, @vm_id,
|
||||
@lxcrc[:mountopts])
|
||||
end
|
||||
# rubocop:enable Style/ConditionalAssignment
|
||||
end
|
||||
|
||||
context_xml = @xml.element('//TEMPLATE/CONTEXT')
|
||||
@ -271,11 +273,13 @@ class LXCVM < OpenNebulaVM
|
||||
key = match[1].strip
|
||||
value = match[2].strip
|
||||
|
||||
# rubocop:disable Style/ConditionalAssignment
|
||||
if !raw_map[key].nil?
|
||||
raw_map[key] = value
|
||||
else
|
||||
raw_map[key] = Array(raw_map[key]) << value
|
||||
end
|
||||
# rubocop:enable Style/ConditionalAssignment
|
||||
end
|
||||
rescue StandardError
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user