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|
|
@xml.elements('//TEMPLATE/DISK').each do |xml|
|
||||||
next if xml['TYPE'].downcase == 'swap'
|
next if xml['TYPE'].downcase == 'swap'
|
||||||
|
|
||||||
|
# rubocop:disable Style/ConditionalAssignment
|
||||||
if xml['DISK_ID'] == @rootfs_id
|
if xml['DISK_ID'] == @rootfs_id
|
||||||
adisks << Disk.new_root(xml, @sysds_path, @vm_id,
|
adisks << Disk.new_root(xml, @sysds_path, @vm_id,
|
||||||
@lxcrc[:mountopts])
|
@lxcrc[:mountopts])
|
||||||
@ -215,6 +216,7 @@ class LXCVM < OpenNebulaVM
|
|||||||
adisks << Disk.new_disk(xml, @sysds_path, @vm_id,
|
adisks << Disk.new_disk(xml, @sysds_path, @vm_id,
|
||||||
@lxcrc[:mountopts])
|
@lxcrc[:mountopts])
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Style/ConditionalAssignment
|
||||||
end
|
end
|
||||||
|
|
||||||
context_xml = @xml.element('//TEMPLATE/CONTEXT')
|
context_xml = @xml.element('//TEMPLATE/CONTEXT')
|
||||||
@ -271,11 +273,13 @@ class LXCVM < OpenNebulaVM
|
|||||||
key = match[1].strip
|
key = match[1].strip
|
||||||
value = match[2].strip
|
value = match[2].strip
|
||||||
|
|
||||||
|
# rubocop:disable Style/ConditionalAssignment
|
||||||
if !raw_map[key].nil?
|
if !raw_map[key].nil?
|
||||||
raw_map[key] = value
|
raw_map[key] = value
|
||||||
else
|
else
|
||||||
raw_map[key] = Array(raw_map[key]) << value
|
raw_map[key] = Array(raw_map[key]) << value
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Style/ConditionalAssignment
|
||||||
end
|
end
|
||||||
rescue StandardError
|
rescue StandardError
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user