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.


13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
# File 'lib/ovirtsdk4/types.rb', line 13023

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.


13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
# File 'lib/ovirtsdk4/types.rb', line 13038

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:


12846
12847
12848
# File 'lib/ovirtsdk4/types.rb', line 12846

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)

12859
12860
12861
12862
12863
12864
# File 'lib/ovirtsdk4/types.rb', line 12859

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)

12871
12872
12873
# File 'lib/ovirtsdk4/types.rb', line 12871

def cmdline
  @cmdline
end

#cmdline=(value) ⇒ Object

Sets the value of the cmdline attribute.

Parameters:

  • value (String)

12880
12881
12882
# File 'lib/ovirtsdk4/types.rb', line 12880

def cmdline=(value)
  @cmdline = value
end

#custom_kernel_cmdlineString

Returns the value of the custom_kernel_cmdline attribute.

Returns:

  • (String)

12889
12890
12891
# File 'lib/ovirtsdk4/types.rb', line 12889

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)

12898
12899
12900
# File 'lib/ovirtsdk4/types.rb', line 12898

def custom_kernel_cmdline=(value)
  @custom_kernel_cmdline = value
end

#hashObject

Generates a hash value for this object.


13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
# File 'lib/ovirtsdk4/types.rb', line 13053

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)

12907
12908
12909
# File 'lib/ovirtsdk4/types.rb', line 12907

def initrd
  @initrd
end

#initrd=(value) ⇒ Object

Sets the value of the initrd attribute.

Parameters:

  • value (String)

12916
12917
12918
# File 'lib/ovirtsdk4/types.rb', line 12916

def initrd=(value)
  @initrd = value
end

#kernelString

Returns the value of the kernel attribute.

Returns:

  • (String)

12925
12926
12927
# File 'lib/ovirtsdk4/types.rb', line 12925

def kernel
  @kernel
end

#kernel=(value) ⇒ Object

Sets the value of the kernel attribute.

Parameters:

  • value (String)

12934
12935
12936
# File 'lib/ovirtsdk4/types.rb', line 12934

def kernel=(value)
  @kernel = value
end

#reported_kernel_cmdlineString

Returns the value of the reported_kernel_cmdline attribute.

Returns:

  • (String)

12943
12944
12945
# File 'lib/ovirtsdk4/types.rb', line 12943

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)

12952
12953
12954
# File 'lib/ovirtsdk4/types.rb', line 12952

def reported_kernel_cmdline=(value)
  @reported_kernel_cmdline = value
end

#typeString

Returns the value of the type attribute.

Returns:

  • (String)

12961
12962
12963
# File 'lib/ovirtsdk4/types.rb', line 12961

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (String)

12970
12971
12972
# File 'lib/ovirtsdk4/types.rb', line 12970

def type=(value)
  @type = value
end

#versionVersion

Returns the value of the version attribute.

Returns:


12979
12980
12981
# File 'lib/ovirtsdk4/types.rb', line 12979

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:


12992
12993
12994
12995
12996
12997
# File 'lib/ovirtsdk4/types.rb', line 12992

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