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

#href, #href=

Constructor Details

- (MigrationOptions) initialize(opts = {})

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):



6702
6703
6704
6705
6706
6707
6708
# File 'lib/ovirtsdk4/types.rb', line 6702

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

Instance Method Details

- (InheritableBoolean) auto_converge

Returns the value of the auto_converge attribute.

Returns:



6605
6606
6607
# File 'lib/ovirtsdk4/types.rb', line 6605

def auto_converge
  return @auto_converge
end

- (Object) auto_converge=(value)

Sets the value of the auto_converge attribute.

Parameters:



6614
6615
6616
# File 'lib/ovirtsdk4/types.rb', line 6614

def auto_converge=(value)
  @auto_converge = value
end

- (MigrationBandwidth) bandwidth

Returns the value of the bandwidth attribute.

Returns:



6623
6624
6625
# File 'lib/ovirtsdk4/types.rb', line 6623

def bandwidth
  return @bandwidth
end

- (Object) bandwidth=(value)

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:



6636
6637
6638
6639
6640
6641
# File 'lib/ovirtsdk4/types.rb', line 6636

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

- (InheritableBoolean) compressed

Returns the value of the compressed attribute.

Returns:



6648
6649
6650
# File 'lib/ovirtsdk4/types.rb', line 6648

def compressed
  return @compressed
end

- (Object) compressed=(value)

Sets the value of the compressed attribute.

Parameters:



6657
6658
6659
# File 'lib/ovirtsdk4/types.rb', line 6657

def compressed=(value)
  @compressed = value
end

- (MigrationPolicy) policy

Returns the value of the policy attribute.

Returns:



6666
6667
6668
# File 'lib/ovirtsdk4/types.rb', line 6666

def policy
  return @policy
end

- (Object) policy=(value)

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:



6679
6680
6681
6682
6683
6684
# File 'lib/ovirtsdk4/types.rb', line 6679

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