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.

  • :description (String)

    The value of attribute description.

  • :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.



13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
# File 'lib/ovirtsdk4/types.rb', line 13823

def initialize(opts = {})
  super(opts)
  self.boot = opts[:boot]
  self.cmdline = opts[:cmdline]
  self.custom_kernel_cmdline = opts[:custom_kernel_cmdline]
  self.description = opts[:description]
  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.



13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
# File 'lib/ovirtsdk4/types.rb', line 13839

def ==(other)
  super &&
  @boot == other.boot &&
  @cmdline == other.cmdline &&
  @custom_kernel_cmdline == other.custom_kernel_cmdline &&
  @description == other.description &&
  @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:



13626
13627
13628
# File 'lib/ovirtsdk4/types.rb', line 13626

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)


13639
13640
13641
13642
13643
13644
# File 'lib/ovirtsdk4/types.rb', line 13639

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)


13651
13652
13653
# File 'lib/ovirtsdk4/types.rb', line 13651

def cmdline
  @cmdline
end

#cmdline=(value) ⇒ Object

Sets the value of the cmdline attribute.

Parameters:

  • value (String)


13660
13661
13662
# File 'lib/ovirtsdk4/types.rb', line 13660

def cmdline=(value)
  @cmdline = value
end

#custom_kernel_cmdlineString

Returns the value of the custom_kernel_cmdline attribute.

Returns:

  • (String)


13669
13670
13671
# File 'lib/ovirtsdk4/types.rb', line 13669

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)


13678
13679
13680
# File 'lib/ovirtsdk4/types.rb', line 13678

def custom_kernel_cmdline=(value)
  @custom_kernel_cmdline = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


13687
13688
13689
# File 'lib/ovirtsdk4/types.rb', line 13687

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


13696
13697
13698
# File 'lib/ovirtsdk4/types.rb', line 13696

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
# File 'lib/ovirtsdk4/types.rb', line 13855

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

#initrdString

Returns the value of the initrd attribute.

Returns:

  • (String)


13705
13706
13707
# File 'lib/ovirtsdk4/types.rb', line 13705

def initrd
  @initrd
end

#initrd=(value) ⇒ Object

Sets the value of the initrd attribute.

Parameters:

  • value (String)


13714
13715
13716
# File 'lib/ovirtsdk4/types.rb', line 13714

def initrd=(value)
  @initrd = value
end

#kernelString

Returns the value of the kernel attribute.

Returns:

  • (String)


13723
13724
13725
# File 'lib/ovirtsdk4/types.rb', line 13723

def kernel
  @kernel
end

#kernel=(value) ⇒ Object

Sets the value of the kernel attribute.

Parameters:

  • value (String)


13732
13733
13734
# File 'lib/ovirtsdk4/types.rb', line 13732

def kernel=(value)
  @kernel = value
end

#reported_kernel_cmdlineString

Returns the value of the reported_kernel_cmdline attribute.

Returns:

  • (String)


13741
13742
13743
# File 'lib/ovirtsdk4/types.rb', line 13741

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)


13750
13751
13752
# File 'lib/ovirtsdk4/types.rb', line 13750

def reported_kernel_cmdline=(value)
  @reported_kernel_cmdline = value
end

#typeString

Returns the value of the type attribute.

Returns:

  • (String)


13759
13760
13761
# File 'lib/ovirtsdk4/types.rb', line 13759

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (String)


13768
13769
13770
# File 'lib/ovirtsdk4/types.rb', line 13768

def type=(value)
  @type = value
end

#versionVersion

Returns the value of the version attribute.

Returns:



13777
13778
13779
# File 'lib/ovirtsdk4/types.rb', line 13777

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:



13790
13791
13792
13793
13794
13795
# File 'lib/ovirtsdk4/types.rb', line 13790

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