# File lib/ovirtsdk4/types.rb, line 23278 def maintenance_reason_required return @maintenance_reason_required end
Creates a new instance of the {Cluster} class.
@param opts [Hash] 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.
@option opts [Boolean] :ballooning_enabled The value of attribute `ballooning_enabled`.
@option opts [String] :comment The value of attribute `comment`.
@option opts [Cpu, Hash] :cpu The value of attribute `cpu`.
@option opts [DataCenter, Hash] :data_center The value of attribute `data_center`.
@option opts [String] :description The value of attribute `description`.
@option opts [Display, Hash] :display The value of attribute `display`.
@option opts [ErrorHandling, Hash] :error_handling The value of attribute `error_handling`.
@option opts [FencingPolicy, Hash] :fencing_policy The value of attribute `fencing_policy`.
@option opts [Boolean] :gluster_service The value of attribute `gluster_service`.
@option opts [Boolean] :ha_reservation The value of attribute `ha_reservation`.
@option opts [String] :id The value of attribute `id`.
@option opts [Ksm, Hash] :ksm The value of attribute `ksm`.
@option opts [MacPool, Hash] :mac_pool The value of attribute `mac_pool`.
@option opts [Boolean] :maintenance_reason_required The value of attribute `maintenance_reason_required`.
@option opts [Network, Hash] :management_network The value of attribute `management_network`.
@option opts [MemoryPolicy, Hash] :memory_policy The value of attribute `memory_policy`.
@option opts [MigrationOptions, Hash] :migration The value of attribute `migration`.
@option opts [String] :name The value of attribute `name`.
@option opts [Boolean] :optional_reason The value of attribute `optional_reason`.
@option opts [Array<RngSource>, Array<Hash>] :required_rng_sources The values of attribute `required_rng_sources`.
@option opts [SchedulingPolicy, Hash] :scheduling_policy The value of attribute `scheduling_policy`.
@option opts [SerialNumber, Hash] :serial_number The value of attribute `serial_number`.
@option opts [Array<Version>, Array<Hash>] :supported_versions The values of attribute `supported_versions`.
@option opts [Boolean] :threads_as_cores The value of attribute `threads_as_cores`.
@option opts [Boolean] :trusted_service The value of attribute `trusted_service`.
@option opts [Boolean] :tunnel_migration The value of attribute `tunnel_migration`.
@option opts [Version, Hash] :version The value of attribute `version`.
@option opts [Boolean] :virt_service The value of attribute `virt_service`.
# File lib/ovirtsdk4/types.rb, line 23655 def initialize(opts = {}) super(opts) self.ballooning_enabled = opts[:ballooning_enabled] self.comment = opts[:comment] self.cpu = opts[:cpu] self.data_center = opts[:data_center] self.description = opts[:description] self.display = opts[:display] self.error_handling = opts[:error_handling] self.fencing_policy = opts[:fencing_policy] self.gluster_service = opts[:gluster_service] self.ha_reservation = opts[:ha_reservation] self.id = opts[:id] self.ksm = opts[:ksm] self.mac_pool = opts[:mac_pool] self.maintenance_reason_required = opts[:maintenance_reason_required] self.management_network = opts[:management_network] self.memory_policy = opts[:memory_policy] self.migration = opts[:migration] self.name = opts[:name] self.optional_reason = opts[:optional_reason] self.required_rng_sources = opts[:required_rng_sources] self.scheduling_policy = opts[:scheduling_policy] self.serial_number = opts[:serial_number] self.supported_versions = opts[:supported_versions] self.threads_as_cores = opts[:threads_as_cores] self.trusted_service = opts[:trusted_service] self.tunnel_migration = opts[:tunnel_migration] self.version = opts[:version] self.virt_service = opts[:virt_service] end
Returns the value of the `ballooning_enabled` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 22995 def ballooning_enabled return @ballooning_enabled end
Sets the value of the `ballooning_enabled` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23004 def ballooning_enabled=(value) @ballooning_enabled = value end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 23013 def comment return @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 23022 def comment=(value) @comment = value end
Returns the value of the `cpu` attribute.
@return [Cpu]
# File lib/ovirtsdk4/types.rb, line 23031 def cpu return @cpu end
Sets the value of the `cpu` attribute.
@param value [Cpu, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Cpu} 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.
# File lib/ovirtsdk4/types.rb, line 23044 def cpu=(value) if value.is_a?(Hash) value = Cpu.new(value) end @cpu = value end
Returns the value of the `data_center` attribute.
@return [DataCenter]
# File lib/ovirtsdk4/types.rb, line 23056 def data_center return @data_center end
Sets the value of the `data_center` attribute.
@param value [DataCenter, Hash]
The `value` parameter can be an instance of {OvirtSDK4::DataCenter} 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.
# File lib/ovirtsdk4/types.rb, line 23069 def data_center=(value) if value.is_a?(Hash) value = DataCenter.new(value) end @data_center = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 23081 def description return @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 23090 def description=(value) @description = value end
Returns the value of the `display` attribute.
@return [Display]
# File lib/ovirtsdk4/types.rb, line 23099 def display return @display end
Sets the value of the `display` attribute.
@param value [Display, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Display} 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.
# File lib/ovirtsdk4/types.rb, line 23112 def display=(value) if value.is_a?(Hash) value = Display.new(value) end @display = value end
Returns the value of the `error_handling` attribute.
@return [ErrorHandling]
# File lib/ovirtsdk4/types.rb, line 23124 def error_handling return @error_handling end
Sets the value of the `error_handling` attribute.
@param value [ErrorHandling, Hash]
The `value` parameter can be an instance of {OvirtSDK4::ErrorHandling} 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.
# File lib/ovirtsdk4/types.rb, line 23137 def error_handling=(value) if value.is_a?(Hash) value = ErrorHandling.new(value) end @error_handling = value end
Returns the value of the `fencing_policy` attribute.
@return [FencingPolicy]
# File lib/ovirtsdk4/types.rb, line 23149 def fencing_policy return @fencing_policy end
Sets the value of the `fencing_policy` attribute.
@param value [FencingPolicy, Hash]
The `value` parameter can be an instance of {OvirtSDK4::FencingPolicy} 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.
# File lib/ovirtsdk4/types.rb, line 23162 def fencing_policy=(value) if value.is_a?(Hash) value = FencingPolicy.new(value) end @fencing_policy = value end
Returns the value of the `gluster_service` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 23174 def gluster_service return @gluster_service end
Sets the value of the `gluster_service` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23183 def gluster_service=(value) @gluster_service = value end
Returns the value of the `ha_reservation` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 23192 def ha_reservation return @ha_reservation end
Sets the value of the `ha_reservation` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23201 def ha_reservation=(value) @ha_reservation = value end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 23210 def id return @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 23219 def id=(value) @id = value end
Returns the value of the `ksm` attribute.
@return [Ksm]
# File lib/ovirtsdk4/types.rb, line 23228 def ksm return @ksm end
Sets the value of the `ksm` attribute.
@param value [Ksm, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Ksm} 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.
# File lib/ovirtsdk4/types.rb, line 23241 def ksm=(value) if value.is_a?(Hash) value = Ksm.new(value) end @ksm = value end
Returns the value of the `mac_pool` attribute.
@return [MacPool]
# File lib/ovirtsdk4/types.rb, line 23253 def mac_pool return @mac_pool end
Sets the value of the `mac_pool` attribute.
@param value [MacPool, Hash]
The `value` parameter can be an instance of {OvirtSDK4::MacPool} 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.
# File lib/ovirtsdk4/types.rb, line 23266 def mac_pool=(value) if value.is_a?(Hash) value = MacPool.new(value) end @mac_pool = value end
Returns the value of the `maintenance_reason_required` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 23278 def maintenance_reason_required return @maintenance_reason_required end
Sets the value of the `maintenance_reason_required` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23287 def maintenance_reason_required=(value) @maintenance_reason_required = value end
Returns the value of the `management_network` attribute.
@return [Network]
# File lib/ovirtsdk4/types.rb, line 23296 def management_network return @management_network end
Sets the value of the `management_network` attribute.
@param value [Network, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Network} 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.
# File lib/ovirtsdk4/types.rb, line 23309 def management_network=(value) if value.is_a?(Hash) value = Network.new(value) end @management_network = value end
Returns the value of the `memory_policy` attribute.
@return [MemoryPolicy]
# File lib/ovirtsdk4/types.rb, line 23321 def memory_policy return @memory_policy end
Sets the value of the `memory_policy` attribute.
@param value [MemoryPolicy, Hash]
The `value` parameter can be an instance of {OvirtSDK4::MemoryPolicy} 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.
# File lib/ovirtsdk4/types.rb, line 23334 def memory_policy=(value) if value.is_a?(Hash) value = MemoryPolicy.new(value) end @memory_policy = value end
Returns the value of the `migration` attribute.
@return [MigrationOptions]
# File lib/ovirtsdk4/types.rb, line 23346 def migration return @migration end
Sets the value of the `migration` attribute.
@param value [MigrationOptions, Hash]
The `value` parameter can be an instance of {OvirtSDK4::MigrationOptions} 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.
# File lib/ovirtsdk4/types.rb, line 23359 def migration=(value) if value.is_a?(Hash) value = MigrationOptions.new(value) end @migration = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 23371 def name return @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 23380 def name=(value) @name = value end
Returns the value of the `optional_reason` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 23389 def optional_reason return @optional_reason end
Sets the value of the `optional_reason` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23398 def optional_reason=(value) @optional_reason = value end
Returns the value of the `required_rng_sources` attribute.
@return [Array<RngSource>]
# File lib/ovirtsdk4/types.rb, line 23407 def required_rng_sources return @required_rng_sources end
Sets the value of the `required_rng_sources` attribute.
@param list [Array<RngSource>]
# File lib/ovirtsdk4/types.rb, line 23415 def required_rng_sources=(list) @required_rng_sources = list end
Returns the value of the `scheduling_policy` attribute.
@return [SchedulingPolicy]
# File lib/ovirtsdk4/types.rb, line 23424 def scheduling_policy return @scheduling_policy end
Sets the value of the `scheduling_policy` attribute.
@param value [SchedulingPolicy, Hash]
The `value` parameter can be an instance of {OvirtSDK4::SchedulingPolicy} 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.
# File lib/ovirtsdk4/types.rb, line 23437 def scheduling_policy=(value) if value.is_a?(Hash) value = SchedulingPolicy.new(value) end @scheduling_policy = value end
Returns the value of the `serial_number` attribute.
@return [SerialNumber]
# File lib/ovirtsdk4/types.rb, line 23449 def serial_number return @serial_number end
Sets the value of the `serial_number` attribute.
@param value [SerialNumber, Hash]
The `value` parameter can be an instance of {OvirtSDK4::SerialNumber} 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.
# File lib/ovirtsdk4/types.rb, line 23462 def serial_number=(value) if value.is_a?(Hash) value = SerialNumber.new(value) end @serial_number = value end
Returns the value of the `supported_versions` attribute.
@return [Array<Version>]
# File lib/ovirtsdk4/types.rb, line 23474 def supported_versions return @supported_versions end
Sets the value of the `supported_versions` attribute.
@param list [Array<Version>]
# File lib/ovirtsdk4/types.rb, line 23482 def supported_versions=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Version.new(value) end end end @supported_versions = list end
Returns the value of the `threads_as_cores` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 23499 def threads_as_cores return @threads_as_cores end
Sets the value of the `threads_as_cores` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23508 def threads_as_cores=(value) @threads_as_cores = value end
Returns the value of the `trusted_service` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 23517 def trusted_service return @trusted_service end
Sets the value of the `trusted_service` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23526 def trusted_service=(value) @trusted_service = value end
Returns the value of the `tunnel_migration` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 23535 def tunnel_migration return @tunnel_migration end
Sets the value of the `tunnel_migration` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23544 def tunnel_migration=(value) @tunnel_migration = value end
Returns the value of the `version` attribute.
@return [Version]
# File lib/ovirtsdk4/types.rb, line 23553 def version return @version end
Sets the value of the `version` attribute.
@param value [Version, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 23566 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end
Returns the value of the `virt_service` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 23578 def virt_service return @virt_service end
Sets the value of the `virt_service` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 23587 def virt_service=(value) @virt_service = value end