Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/fog/proxmox/helpers/disk_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,35 +141,35 @@ def self.extract_size(disk_value)
end

def self.disk?(id)
DISKS_REGEXP.match(id) ? true : false
DISKS_REGEXP.match(id) || false
end

def self.cdrom?(value)
CDROM_REGEXP.match(value) ? true : false
CDROM_REGEXP.match(value) || false
end

def self.server_disk?(id)
SERVER_DISK_REGEXP.match(id) ? true : false
SERVER_DISK_REGEXP.match(id) || false
end

def self.rootfs?(id)
ROOTFS_REGEXP.match(id) ? true : false
ROOTFS_REGEXP.match(id) || false
end

def self.mount_point?(id)
MOUNT_POINT_REGEXP.match(id) ? true : false
MOUNT_POINT_REGEXP.match(id) || false
end

def self.container_disk?(id)
rootfs?(id) || mount_point?(id)
end

def self.template?(volid)
TEMPLATE_REGEXP.match(volid) ? true : false
TEMPLATE_REGEXP.match(volid) || false
end

def self.cloud_init?(volid)
CLOUD_INIT_REGEXP.match(volid) ? true : false
CLOUD_INIT_REGEXP.match(volid) || false
end

def self.of_type?(disk_h, vm_type)
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/proxmox/helpers/nic_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def self.collect_nics(attributes)
end

def self.nic?(id)
NICS_REGEXP.match(id) ? true : false
NICS_REGEXP.match(id) || false
end

def self.extract_ip(nic_value)
Expand Down
Loading