Class: OvirtSDK4::OperatingSystem

Inherits:
Struct
  • Object
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 = {}) ⇒ OperatingSystem

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

  • :boot (Boot, Hash)

    The value of attribute boot.

  • :cmdline (String)

    The value of attribute cmdline.

  • :custom_kernel_cmdline (String)

    The value of attribute custom_kernel_cmdline.

  • :initrd (String)

    The value of attribute initrd.

  • :kernel (String)

    The value of attribute kernel.

  • :reported_kernel_cmdline (String)

    The value of attribute reported_kernel_cmdline.

  • :type (String)

    The value of attribute type.

  • :version (Version, Hash)

    The value of attribute version.



12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
# File 'lib/ovirtsdk4/types.rb', line 12770

def initialize(opts = {})
  super(opts)
  self.boot = opts[:boot]
  self.cmdline = opts[:cmdline]
  self.custom_kernel_cmdline = opts[:custom_kernel_cmdline]
  self.initrd = opts[:initrd]
  self.kernel = opts[:kernel]
  self.reported_kernel_cmdline = opts[:reported_kernel_cmdline]
  self.type = opts[:type]
  self.version = opts[:version]
end

Instance Method Details

#==(other) ⇒ Object

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



12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
# File 'lib/ovirtsdk4/types.rb', line 12785

def ==(other)
  super &&
  @boot == other.boot &&
  @cmdline == other.cmdline &&
  @custom_kernel_cmdline == other.custom_kernel_cmdline &&
  @initrd == other.initrd &&
  @kernel == other.kernel &&
  @reported_kernel_cmdline == other.reported_kernel_cmdline &&
  @type == other.type &&
  @version == other.version
end

#bootBoot

Returns the value of the boot attribute.

Returns:



12593
12594
12595
# File 'lib/ovirtsdk4/types.rb', line 12593

def boot
  @boot
end

#boot=(value) ⇒ Object

Sets the value of the boot attribute.

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


12606
12607
12608
12609
12610
12611
# File 'lib/ovirtsdk4/types.rb', line 12606

def boot=(value)
  if value.is_a?(Hash)
    value = Boot.new(value)
  end
  @boot = value
end

#cmdlineString

Returns the value of the cmdline attribute.

Returns:

  • (String)


12618
12619
12620
# File 'lib/ovirtsdk4/types.rb', line 12618

def cmdline
  @cmdline
end

#cmdline=(value) ⇒ Object

Sets the value of the cmdline attribute.

Parameters:

  • value (String)


12627
12628
12629
# File 'lib/ovirtsdk4/types.rb', line 12627

def cmdline=(value)
  @cmdline = value
end

#custom_kernel_cmdlineString

Returns the value of the custom_kernel_cmdline attribute.

Returns:

  • (String)


12636
12637
12638
# File 'lib/ovirtsdk4/types.rb', line 12636

def custom_kernel_cmdline
  @custom_kernel_cmdline
end

#custom_kernel_cmdline=(value) ⇒ Object

Sets the value of the custom_kernel_cmdline attribute.

Parameters:

  • value (String)


12645
12646
12647
# File 'lib/ovirtsdk4/types.rb', line 12645

def custom_kernel_cmdline=(value)
  @custom_kernel_cmdline = value
end

#hashObject

Generates a hash value for this object.



12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
# File 'lib/ovirtsdk4/types.rb', line 12800

def hash
  super +
  @boot.hash +
  @cmdline.hash +
  @custom_kernel_cmdline.hash +
  @initrd.hash +
  @kernel.hash +
  @reported_kernel_cmdline.hash +
  @type.hash +
  @version.hash
end

#initrdString

Returns the value of the initrd attribute.

Returns:

  • (String)


12654
12655
12656
# File 'lib/ovirtsdk4/types.rb', line 12654

def initrd
  @initrd
end

#initrd=(value) ⇒ Object

Sets the value of the initrd attribute.

Parameters:

  • value (String)


12663
12664
12665
# File 'lib/ovirtsdk4/types.rb', line 12663

def initrd=(value)
  @initrd = value
end

#kernelString

Returns the value of the kernel attribute.

Returns:

  • (String)


12672
12673
12674
# File 'lib/ovirtsdk4/types.rb', line 12672

def kernel
  @kernel
end

#kernel=(value) ⇒ Object

Sets the value of the kernel attribute.

Parameters:

  • value (String)


12681
12682
12683
# File 'lib/ovirtsdk4/types.rb', line 12681

def kernel=(value)
  @kernel = value
end

#reported_kernel_cmdlineString

Returns the value of the reported_kernel_cmdline attribute.

Returns:

  • (String)


12690
12691
12692
# File 'lib/ovirtsdk4/types.rb', line 12690

def reported_kernel_cmdline
  @reported_kernel_cmdline
end

#reported_kernel_cmdline=(value) ⇒ Object

Sets the value of the reported_kernel_cmdline attribute.

Parameters:

  • value (String)


12699
12700
12701
# File 'lib/ovirtsdk4/types.rb', line 12699

def reported_kernel_cmdline=(value)
  @reported_kernel_cmdline = value
end

#typeString

Returns the value of the type attribute.

Returns:

  • (String)


12708
12709
12710
# File 'lib/ovirtsdk4/types.rb', line 12708

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (String)


12717
12718
12719
# File 'lib/ovirtsdk4/types.rb', line 12717

def type=(value)
  @type = value
end

#versionVersion

Returns the value of the version attribute.

Returns:



12726
12727
12728
# File 'lib/ovirtsdk4/types.rb', line 12726

def version
  @version
end

#version=(value) ⇒ Object

Sets the value of the version attribute.

The value parameter can be an instance of Version 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:



12739
12740
12741
12742
12743
12744
# File 'lib/ovirtsdk4/types.rb', line 12739

def version=(value)
  if value.is_a?(Hash)
    value = Version.new(value)
  end
  @version = value
end