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.



10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
# File 'lib/ovirtsdk4/types.rb', line 10091

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.



10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
# File 'lib/ovirtsdk4/types.rb', line 10105

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:



9934
9935
9936
# File 'lib/ovirtsdk4/types.rb', line 9934

def auto_converge
  @auto_converge
end

#auto_converge=(value) ⇒ Object

Sets the value of the auto_converge attribute.

Parameters:



9943
9944
9945
# File 'lib/ovirtsdk4/types.rb', line 9943

def auto_converge=(value)
  @auto_converge = value
end

#bandwidthMigrationBandwidth

Returns the value of the bandwidth attribute.

Returns:



9952
9953
9954
# File 'lib/ovirtsdk4/types.rb', line 9952

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:



9965
9966
9967
9968
9969
9970
# File 'lib/ovirtsdk4/types.rb', line 9965

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:



9977
9978
9979
# File 'lib/ovirtsdk4/types.rb', line 9977

def compressed
  @compressed
end

#compressed=(value) ⇒ Object

Sets the value of the compressed attribute.

Parameters:



9986
9987
9988
# File 'lib/ovirtsdk4/types.rb', line 9986

def compressed=(value)
  @compressed = value
end

#custom_parallel_migrationsInteger

Returns the value of the custom_parallel_migrations attribute.

Returns:

  • (Integer)


9995
9996
9997
# File 'lib/ovirtsdk4/types.rb', line 9995

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)


10004
10005
10006
# File 'lib/ovirtsdk4/types.rb', line 10004

def custom_parallel_migrations=(value)
  @custom_parallel_migrations = value
end

#encryptedInheritableBoolean

Returns the value of the encrypted attribute.

Returns:



10013
10014
10015
# File 'lib/ovirtsdk4/types.rb', line 10013

def encrypted
  @encrypted
end

#encrypted=(value) ⇒ Object

Sets the value of the encrypted attribute.

Parameters:



10022
10023
10024
# File 'lib/ovirtsdk4/types.rb', line 10022

def encrypted=(value)
  @encrypted = value
end

#hashObject

Generates a hash value for this object.



10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
# File 'lib/ovirtsdk4/types.rb', line 10119

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.



10031
10032
10033
# File 'lib/ovirtsdk4/types.rb', line 10031

def parallel_migrations_policy
  @parallel_migrations_policy
end

#parallel_migrations_policy=(value) ⇒ Object

Sets the value of the parallel_migrations_policy attribute.

Parameters:



10040
10041
10042
# File 'lib/ovirtsdk4/types.rb', line 10040

def parallel_migrations_policy=(value)
  @parallel_migrations_policy = value
end

#policyMigrationPolicy

Returns the value of the policy attribute.

Returns:



10049
10050
10051
# File 'lib/ovirtsdk4/types.rb', line 10049

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:



10062
10063
10064
10065
10066
10067
# File 'lib/ovirtsdk4/types.rb', line 10062

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