1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

L #-: Minor linting changes (#1253)

This commit is contained in:
Christian González 2021-05-27 12:20:50 +02:00 committed by GitHub
parent bb7ea25185
commit 16ca4cbb41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View File

@ -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

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

View File

@ -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']