L #-: Minor linting changes (#1253)

This commit is contained in:
Christian González authored and GitHub committed 2021-05-27 12:20:50 +02:00
1 parent bb7ea25185
commit 16ca4cbb41
3 files changed
+7 -6

No files matched your search

@@ -79,7 +79,7 @@ class FirecrackerVM < OpenNebulaVM
@exec_file = @fcrc[:firecracker_location]
end
# Returns a Hash representing the Firecracker configuration for this OpenNebulaVM
# Returns a Hash representing the Firecracker configuration for the VM
def to_fc
fc = {}
@@ -156,7 +156,7 @@ class FirecrackerVM < OpenNebulaVM
initrd = @xml['//TEMPLATE/OS/INITRD']
return if (initrd.nil? || initrd.empty?)
return if initrd.nil? || initrd.empty?
hash['initrd_path'] = File.basename(initrd, '/')
end
+3 -2
View File
@@ -44,7 +44,7 @@ class LXCConfiguration < Hash
:command => 'sudo lxc-console'
},
:datastore_location => '/var/lib/one/datastores',
:default_lxc_config => '/usr/share/lxc/config/common.conf',
:default_lxc_config => '/usr/share/lxc/config/common.conf'
}
# Configuration attributes that are not customizable
@@ -378,7 +378,8 @@ class Disk
end
if device.empty?
OpenNebula.log_error("Cannot detect block device from #{@mountpoint}")
msg = "Cannot detect block device from #{@mountpoint}"
OpenNebula.log_error(msg)
end
device
@@ -60,7 +60,7 @@ module Storage
resize_ext(device)
end
# Mount device in mapper folder <sys_ds_folder>/<vm_id>/mapper/disk.id
# Mount device in mapper folder <sys_ds>/<vm_id>/mapper/disk.id
return false unless mount(device, mountpoint)
# Resize device if xfs like filesystem is used
@@ -175,7 +175,7 @@ module Storage
true
end
# Adds path to the partition Hash. This is needed for lsblk version < 2.33
# Adds path to the partition Hash. Required for lsblk version < 2.33
def lsblk_path(p)
return unless !p['path'] && p['name']