Class: OvirtSDK4::MigrationOptions

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 = {}) ⇒ MigrationOptions

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

  • :auto_converge (InheritableBoolean)

    The value of attribute auto_converge.

  • :bandwidth (MigrationBandwidth, Hash)

    The value of attribute bandwidth.

  • :compressed (InheritableBoolean)

    The value of attribute compressed.

  • :custom_parallel_migrations (Integer)

    The value of attribute custom_parallel_migrations.

  • :encrypted (InheritableBoolean)

    The value of attribute encrypted.

  • :parallel_migrations_policy (ParallelMigrationsPolicy)

    The value of attribute parallel_migrations_policy.

  • :policy (MigrationPolicy, Hash)

    The value of attribute policy.



10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
# File 'lib/ovirtsdk4/types.rb', line 10338

def initialize(opts = {})
  super(opts)
  self.auto_converge = opts[:auto_converge]
  self.bandwidth = opts[:bandwidth]
  self.compressed = opts[:compressed]
  self.custom_parallel_migrations = opts[:custom_parallel_migrations]
  self.encrypted = opts[:encrypted]
  self.parallel_migrations_policy = opts[:parallel_migrations_policy]
  self.policy = opts[:policy]
end

Instance Method Details

#==(other) ⇒ Object

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



10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
# File 'lib/ovirtsdk4/types.rb', line 10352

def ==(other)
  super &&
  @auto_converge == other.auto_converge &&
  @bandwidth == other.bandwidth &&
  @compressed == other.compressed &&
  @custom_parallel_migrations == other.custom_parallel_migrations &&
  @encrypted == other.encrypted &&
  @parallel_migrations_policy == other.parallel_migrations_policy &&
  @policy == other.policy
end

#auto_convergeInheritableBoolean

Returns the value of the auto_converge attribute.

Returns:



10181
10182
10183
# File 'lib/ovirtsdk4/types.rb', line 10181

def auto_converge
  @auto_converge
end

#auto_converge=(value) ⇒ Object

Sets the value of the auto_converge attribute.

Parameters:



10190
10191
10192
# File 'lib/ovirtsdk4/types.rb', line 10190

def auto_converge=(value)
  @auto_converge = value
end

#bandwidthMigrationBandwidth

Returns the value of the bandwidth attribute.

Returns:



10199
10200
10201
# File 'lib/ovirtsdk4/types.rb', line 10199

def bandwidth
  @bandwidth
end

#bandwidth=(value) ⇒ Object

Sets the value of the bandwidth attribute.

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



10212
10213
10214
10215
10216
10217
# File 'lib/ovirtsdk4/types.rb', line 10212

def bandwidth=(value)
  if value.is_a?(Hash)
    value = MigrationBandwidth.new(value)
  end
  @bandwidth = value
end

#compressedInheritableBoolean

Returns the value of the compressed attribute.

Returns:



10224
10225
10226
# File 'lib/ovirtsdk4/types.rb', line 10224

def compressed
  @compressed
end

#compressed=(value) ⇒ Object

Sets the value of the compressed attribute.

Parameters:



10233
10234
10235
# File 'lib/ovirtsdk4/types.rb', line 10233

def compressed=(value)
  @compressed = value
end

#custom_parallel_migrationsInteger

Returns the value of the custom_parallel_migrations attribute.

Returns:

  • (Integer)


10242
10243
10244
# File 'lib/ovirtsdk4/types.rb', line 10242

def custom_parallel_migrations
  @custom_parallel_migrations
end

#custom_parallel_migrations=(value) ⇒ Object

Sets the value of the custom_parallel_migrations attribute.

Parameters:

  • value (Integer)


10251
10252
10253
# File 'lib/ovirtsdk4/types.rb', line 10251

def custom_parallel_migrations=(value)
  @custom_parallel_migrations = value
end

#encryptedInheritableBoolean

Returns the value of the encrypted attribute.

Returns:



10260
10261
10262
# File 'lib/ovirtsdk4/types.rb', line 10260

def encrypted
  @encrypted
end

#encrypted=(value) ⇒ Object

Sets the value of the encrypted attribute.

Parameters:



10269
10270
10271
# File 'lib/ovirtsdk4/types.rb', line 10269

def encrypted=(value)
  @encrypted = value
end

#hashObject

Generates a hash value for this object.



10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
# File 'lib/ovirtsdk4/types.rb', line 10366

def hash
  super +
  @auto_converge.hash +
  @bandwidth.hash +
  @compressed.hash +
  @custom_parallel_migrations.hash +
  @encrypted.hash +
  @parallel_migrations_policy.hash +
  @policy.hash
end

#parallel_migrations_policyParallelMigrationsPolicy

Returns the value of the parallel_migrations_policy attribute.



10278
10279
10280
# File 'lib/ovirtsdk4/types.rb', line 10278

def parallel_migrations_policy
  @parallel_migrations_policy
end

#parallel_migrations_policy=(value) ⇒ Object

Sets the value of the parallel_migrations_policy attribute.

Parameters:



10287
10288
10289
# File 'lib/ovirtsdk4/types.rb', line 10287

def parallel_migrations_policy=(value)
  @parallel_migrations_policy = value
end

#policyMigrationPolicy

Returns the value of the policy attribute.

Returns:



10296
10297
10298
# File 'lib/ovirtsdk4/types.rb', line 10296

def policy
  @policy
end

#policy=(value) ⇒ Object

Sets the value of the policy attribute.

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



10309
10310
10311
10312
10313
10314
# File 'lib/ovirtsdk4/types.rb', line 10309

def policy=(value)
  if value.is_a?(Hash)
    value = MigrationPolicy.new(value)
  end
  @policy = value
end