Class: OvirtSDK4::HostDevice

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ HostDevice

Creates a new instance of the OvirtSDK4::HostDevice class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :capability (String)

    The value of attribute capability.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :driver (String)

    The value of attribute driver.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :iommu_group (Integer)

    The value of attribute iommu_group.

  • :name (String)

    The value of attribute name.

  • :parent_device (HostDevice, Hash)

    The value of attribute parent_device.

  • :physical_function (HostDevice, Hash)

    The value of attribute physical_function.

  • :placeholder (Boolean)

    The value of attribute placeholder.

  • :product (Product, Hash)

    The value of attribute product.

  • :vendor (Vendor, Hash)

    The value of attribute vendor.

  • :virtual_functions (Integer)

    The value of attribute virtual_functions.

  • :vm (Vm, Hash)

    The value of attribute vm.



42872
42873
42874
42875
42876
42877
42878
42879
42880
42881
42882
42883
42884
42885
# File 'lib/ovirtsdk4/types.rb', line 42872

def initialize(opts = {})
  super(opts)
  self.capability = opts[:capability]
  self.driver = opts[:driver]
  self.host = opts[:host]
  self.iommu_group = opts[:iommu_group]
  self.parent_device = opts[:parent_device]
  self.physical_function = opts[:physical_function]
  self.placeholder = opts[:placeholder]
  self.product = opts[:product]
  self.vendor = opts[:vendor]
  self.virtual_functions = opts[:virtual_functions]
  self.vm = opts[:vm]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



42890
42891
42892
42893
42894
42895
42896
42897
42898
42899
42900
42901
42902
42903
# File 'lib/ovirtsdk4/types.rb', line 42890

def ==(other)
  super &&
  @capability == other.capability &&
  @driver == other.driver &&
  @host == other.host &&
  @iommu_group == other.iommu_group &&
  @parent_device == other.parent_device &&
  @physical_function == other.physical_function &&
  @placeholder == other.placeholder &&
  @product == other.product &&
  @vendor == other.vendor &&
  @virtual_functions == other.virtual_functions &&
  @vm == other.vm
end

#capabilityString

Returns the value of the capability attribute.

Returns:

  • (String)


42527
42528
42529
# File 'lib/ovirtsdk4/types.rb', line 42527

def capability
  @capability
end

#capability=(value) ⇒ Object

Sets the value of the capability attribute.

Parameters:

  • value (String)


42536
42537
42538
# File 'lib/ovirtsdk4/types.rb', line 42536

def capability=(value)
  @capability = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


42545
42546
42547
# File 'lib/ovirtsdk4/types.rb', line 42545

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


42554
42555
42556
# File 'lib/ovirtsdk4/types.rb', line 42554

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


42563
42564
42565
# File 'lib/ovirtsdk4/types.rb', line 42563

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


42572
42573
42574
# File 'lib/ovirtsdk4/types.rb', line 42572

def description=(value)
  @description = value
end

#driverString

Returns the value of the driver attribute.

Returns:

  • (String)


42581
42582
42583
# File 'lib/ovirtsdk4/types.rb', line 42581

def driver
  @driver
end

#driver=(value) ⇒ Object

Sets the value of the driver attribute.

Parameters:

  • value (String)


42590
42591
42592
# File 'lib/ovirtsdk4/types.rb', line 42590

def driver=(value)
  @driver = value
end

#hashObject

Generates a hash value for this object.



42908
42909
42910
42911
42912
42913
42914
42915
42916
42917
42918
42919
42920
42921
# File 'lib/ovirtsdk4/types.rb', line 42908

def hash
  super +
  @capability.hash +
  @driver.hash +
  @host.hash +
  @iommu_group.hash +
  @parent_device.hash +
  @physical_function.hash +
  @placeholder.hash +
  @product.hash +
  @vendor.hash +
  @virtual_functions.hash +
  @vm.hash
end

#hostHost

Returns the value of the host attribute.

Returns:



42599
42600
42601
# File 'lib/ovirtsdk4/types.rb', line 42599

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

The value parameter can be an instance of OvirtSDK4::Host or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:

  • value (Host, Hash)


42612
42613
42614
42615
42616
42617
# File 'lib/ovirtsdk4/types.rb', line 42612

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


42624
42625
42626
# File 'lib/ovirtsdk4/types.rb', line 42624

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


42633
42634
42635
# File 'lib/ovirtsdk4/types.rb', line 42633

def id=(value)
  @id = value
end

#iommu_groupInteger

Returns the value of the iommu_group attribute.

Returns:

  • (Integer)


42642
42643
42644
# File 'lib/ovirtsdk4/types.rb', line 42642

def iommu_group
  @iommu_group
end

#iommu_group=(value) ⇒ Object

Sets the value of the iommu_group attribute.

Parameters:

  • value (Integer)


42651
42652
42653
# File 'lib/ovirtsdk4/types.rb', line 42651

def iommu_group=(value)
  @iommu_group = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


42660
42661
42662
# File 'lib/ovirtsdk4/types.rb', line 42660

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


42669
42670
42671
# File 'lib/ovirtsdk4/types.rb', line 42669

def name=(value)
  @name = value
end

#parent_deviceHostDevice

Returns the value of the parent_device attribute.

Returns:



42678
42679
42680
# File 'lib/ovirtsdk4/types.rb', line 42678

def parent_device
  @parent_device
end

#parent_device=(value) ⇒ Object

Sets the value of the parent_device attribute.

The value parameter can be an instance of OvirtSDK4::HostDevice or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



42691
42692
42693
42694
42695
42696
# File 'lib/ovirtsdk4/types.rb', line 42691

def parent_device=(value)
  if value.is_a?(Hash)
    value = HostDevice.new(value)
  end
  @parent_device = value
end

#physical_functionHostDevice

Returns the value of the physical_function attribute.

Returns:



42703
42704
42705
# File 'lib/ovirtsdk4/types.rb', line 42703

def physical_function
  @physical_function
end

#physical_function=(value) ⇒ Object

Sets the value of the physical_function attribute.

The value parameter can be an instance of OvirtSDK4::HostDevice or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



42716
42717
42718
42719
42720
42721
# File 'lib/ovirtsdk4/types.rb', line 42716

def physical_function=(value)
  if value.is_a?(Hash)
    value = HostDevice.new(value)
  end
  @physical_function = value
end

#placeholderBoolean

Returns the value of the placeholder attribute.

Returns:

  • (Boolean)


42728
42729
42730
# File 'lib/ovirtsdk4/types.rb', line 42728

def placeholder
  @placeholder
end

#placeholder=(value) ⇒ Object

Sets the value of the placeholder attribute.

Parameters:

  • value (Boolean)


42737
42738
42739
# File 'lib/ovirtsdk4/types.rb', line 42737

def placeholder=(value)
  @placeholder = value
end

#productProduct

Returns the value of the product attribute.

Returns:



42746
42747
42748
# File 'lib/ovirtsdk4/types.rb', line 42746

def product
  @product
end

#product=(value) ⇒ Object

Sets the value of the product attribute.

The value parameter can be an instance of Product or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



42759
42760
42761
42762
42763
42764
# File 'lib/ovirtsdk4/types.rb', line 42759

def product=(value)
  if value.is_a?(Hash)
    value = Product.new(value)
  end
  @product = value
end

#vendorVendor

Returns the value of the vendor attribute.

Returns:



42771
42772
42773
# File 'lib/ovirtsdk4/types.rb', line 42771

def vendor
  @vendor
end

#vendor=(value) ⇒ Object

Sets the value of the vendor attribute.

The value parameter can be an instance of Vendor or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



42784
42785
42786
42787
42788
42789
# File 'lib/ovirtsdk4/types.rb', line 42784

def vendor=(value)
  if value.is_a?(Hash)
    value = Vendor.new(value)
  end
  @vendor = value
end

#virtual_functionsInteger

Returns the value of the virtual_functions attribute.

Returns:

  • (Integer)


42796
42797
42798
# File 'lib/ovirtsdk4/types.rb', line 42796

def virtual_functions
  @virtual_functions
end

#virtual_functions=(value) ⇒ Object

Sets the value of the virtual_functions attribute.

Parameters:

  • value (Integer)


42805
42806
42807
# File 'lib/ovirtsdk4/types.rb', line 42805

def virtual_functions=(value)
  @virtual_functions = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



42814
42815
42816
# File 'lib/ovirtsdk4/types.rb', line 42814

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

The value parameter can be an instance of Vm or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:

  • value (Vm, Hash)


42827
42828
42829
42830
42831
42832
# File 'lib/ovirtsdk4/types.rb', line 42827

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end