Files
ubicloud/model/pci_device.rb
Benjamin Satzger f66ec451f5 Introduce PciDevice model
Adds the concept of a PCI device. A PCI device always belongs to
a single VM host and may be bound to a single VM.
2024-05-07 16:10:05 +02:00

19 lines
274 B
Ruby

# frozen_string_literal: true
require_relative "../model"
class PciDevice < Sequel::Model
include ResourceMethods
many_to_one :vm_host
many_to_one :vm
def self.ubid_type
UBID::TYPE_ETC
end
def is_gpu
["0300", "0302"].include? device_class
end
end