Class: OvirtSDK4::DiskAttachment

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

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (DiskAttachment) initialize(opts = {})

Creates a new instance of the OvirtSDK4::DiskAttachment 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):

  • :bootable (Boolean)

    The value of attribute bootable.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :disk (Disk, Hash)

    The value of attribute disk.

  • :id (String)

    The value of attribute id.

  • :interface (DiskInterface)

    The value of attribute interface.

  • :name (String)

    The value of attribute name.

  • :vm (Vm, Hash)

    The value of attribute vm.



26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
# File 'lib/ovirtsdk4/types.rb', line 26768

def initialize(opts = {})
  super(opts)
  self.bootable = opts[:bootable]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.disk = opts[:disk]
  self.id = opts[:id]
  self.interface = opts[:interface]
  self.name = opts[:name]
  self.vm = opts[:vm]
end

Instance Method Details

- (Boolean) bootable

Returns the value of the bootable attribute.

Returns:

  • (Boolean)


26591
26592
26593
# File 'lib/ovirtsdk4/types.rb', line 26591

def bootable
  return @bootable
end

- (Object) bootable=(value)

Sets the value of the bootable attribute.

Parameters:

  • value (Boolean)


26600
26601
26602
# File 'lib/ovirtsdk4/types.rb', line 26600

def bootable=(value)
  @bootable = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


26609
26610
26611
# File 'lib/ovirtsdk4/types.rb', line 26609

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


26618
26619
26620
# File 'lib/ovirtsdk4/types.rb', line 26618

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


26627
26628
26629
# File 'lib/ovirtsdk4/types.rb', line 26627

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


26636
26637
26638
# File 'lib/ovirtsdk4/types.rb', line 26636

def description=(value)
  @description = value
end

- (Disk) disk

Returns the value of the disk attribute.

Returns:



26645
26646
26647
# File 'lib/ovirtsdk4/types.rb', line 26645

def disk
  return @disk
end

- (Object) disk=(value)

Sets the value of the disk attribute.

The value parameter can be an instance of OvirtSDK4::Disk 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 (Disk, Hash)


26658
26659
26660
26661
26662
26663
# File 'lib/ovirtsdk4/types.rb', line 26658

def disk=(value)
  if value.is_a?(Hash)
    value = Disk.new(value)
  end
  @disk = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


26670
26671
26672
# File 'lib/ovirtsdk4/types.rb', line 26670

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


26679
26680
26681
# File 'lib/ovirtsdk4/types.rb', line 26679

def id=(value)
  @id = value
end

- (DiskInterface) interface

Returns the value of the interface attribute.

Returns:



26688
26689
26690
# File 'lib/ovirtsdk4/types.rb', line 26688

def interface
  return @interface
end

- (Object) interface=(value)

Sets the value of the interface attribute.

Parameters:



26697
26698
26699
# File 'lib/ovirtsdk4/types.rb', line 26697

def interface=(value)
  @interface = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


26706
26707
26708
# File 'lib/ovirtsdk4/types.rb', line 26706

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


26715
26716
26717
# File 'lib/ovirtsdk4/types.rb', line 26715

def name=(value)
  @name = value
end

- (Vm) vm

Returns the value of the vm attribute.

Returns:



26724
26725
26726
# File 'lib/ovirtsdk4/types.rb', line 26724

def vm
  return @vm
end

- (Object) vm=(value)

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)


26737
26738
26739
26740
26741
26742
# File 'lib/ovirtsdk4/types.rb', line 26737

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