class OvirtSDK4::GlusterVolume

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {GlusterVolume} 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 [Array<GlusterBrick>, Array<Hash>] :bricks The values of attribute `bricks`.

@option opts [Cluster, Hash] :cluster The value of attribute `cluster`.

@option opts [String] :comment The value of attribute `comment`.

@option opts [String] :description The value of attribute `description`.

@option opts [Integer] :disperse_count The value of attribute `disperse_count`.

@option opts [String] :id The value of attribute `id`.

@option opts [String] :name The value of attribute `name`.

@option opts [Array<Option>, Array<Hash>] :options The values of attribute `options`.

@option opts [Integer] :redundancy_count The value of attribute `redundancy_count`.

@option opts [Integer] :replica_count The value of attribute `replica_count`.

@option opts [Array<Statistic>, Array<Hash>] :statistics The values of attribute `statistics`.

@option opts [GlusterVolumeStatus] :status The value of attribute `status`.

@option opts [Integer] :stripe_count The value of attribute `stripe_count`.

@option opts [Array<TransportType>, Array<Hash>] :transport_types The values of attribute `transport_types`.

@option opts [GlusterVolumeType] :volume_type The value of attribute `volume_type`.

Calls superclass method OvirtSDK4::Identified::new
# File lib/ovirtsdk4/types.rb, line 43204
def initialize(opts = {})
  super(opts)
  self.bricks = opts[:bricks]
  self.cluster = opts[:cluster]
  self.disperse_count = opts[:disperse_count]
  self.options = opts[:options]
  self.redundancy_count = opts[:redundancy_count]
  self.replica_count = opts[:replica_count]
  self.statistics = opts[:statistics]
  self.status = opts[:status]
  self.stripe_count = opts[:stripe_count]
  self.transport_types = opts[:transport_types]
  self.volume_type = opts[:volume_type]
end

Public Instance Methods

==(other) click to toggle source

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

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 43222
def ==(other)
  super &&
  @bricks == other.bricks &&
  @cluster == other.cluster &&
  @disperse_count == other.disperse_count &&
  @options == other.options &&
  @redundancy_count == other.redundancy_count &&
  @replica_count == other.replica_count &&
  @statistics == other.statistics &&
  @status == other.status &&
  @stripe_count == other.stripe_count &&
  @transport_types == other.transport_types &&
  @volume_type == other.volume_type
end
bricks() click to toggle source

Returns the value of the `bricks` attribute.

@return [Array<GlusterBrick>]

# File lib/ovirtsdk4/types.rb, line 42870
def bricks
  @bricks
end
bricks=(list) click to toggle source

Sets the value of the `bricks` attribute.

@param list [Array<GlusterBrick>]

# File lib/ovirtsdk4/types.rb, line 42879
def bricks=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = GlusterBrick.new(value)
      end
    end
  end
  @bricks = list
end
cluster() click to toggle source

Returns the value of the `cluster` attribute.

@return [Cluster]

# File lib/ovirtsdk4/types.rb, line 42896
def cluster
  @cluster
end
cluster=(value) click to toggle source

Sets the value of the `cluster` attribute.

@param value [Cluster, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Cluster} 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 42909
def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end
comment() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 42921
def comment
  @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 42930
def comment=(value)
  @comment = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 42939
def description
  @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 42948
def description=(value)
  @description = value
end
disperse_count() click to toggle source

Returns the value of the `disperse_count` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 42957
def disperse_count
  @disperse_count
end
disperse_count=(value) click to toggle source

Sets the value of the `disperse_count` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 42966
def disperse_count=(value)
  @disperse_count = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 43240
def hash
  super +
  @bricks.hash +
  @cluster.hash +
  @disperse_count.hash +
  @options.hash +
  @redundancy_count.hash +
  @replica_count.hash +
  @statistics.hash +
  @status.hash +
  @stripe_count.hash +
  @transport_types.hash +
  @volume_type.hash
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 42975
def id
  @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 42984
def id=(value)
  @id = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 42993
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 43002
def name=(value)
  @name = value
end
options() click to toggle source

Returns the value of the `options` attribute.

@return [Array<Option>]

# File lib/ovirtsdk4/types.rb, line 43011
def options
  @options
end
options=(list) click to toggle source

Sets the value of the `options` attribute.

@param list [Array<Option>]

# File lib/ovirtsdk4/types.rb, line 43020
def options=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Option.new(value)
      end
    end
  end
  @options = list
end
redundancy_count() click to toggle source

Returns the value of the `redundancy_count` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 43037
def redundancy_count
  @redundancy_count
end
redundancy_count=(value) click to toggle source

Sets the value of the `redundancy_count` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 43046
def redundancy_count=(value)
  @redundancy_count = value
end
replica_count() click to toggle source

Returns the value of the `replica_count` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 43055
def replica_count
  @replica_count
end
replica_count=(value) click to toggle source

Sets the value of the `replica_count` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 43064
def replica_count=(value)
  @replica_count = value
end
statistics() click to toggle source

Returns the value of the `statistics` attribute.

@return [Array<Statistic>]

# File lib/ovirtsdk4/types.rb, line 43073
def statistics
  @statistics
end
statistics=(list) click to toggle source

Sets the value of the `statistics` attribute.

@param list [Array<Statistic>]

# File lib/ovirtsdk4/types.rb, line 43082
def statistics=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Statistic.new(value)
      end
    end
  end
  @statistics = list
end
status() click to toggle source

Returns the value of the `status` attribute.

@return [GlusterVolumeStatus]

# File lib/ovirtsdk4/types.rb, line 43099
def status
  @status
end
status=(value) click to toggle source

Sets the value of the `status` attribute.

@param value [GlusterVolumeStatus]

# File lib/ovirtsdk4/types.rb, line 43108
def status=(value)
  @status = value
end
stripe_count() click to toggle source

Returns the value of the `stripe_count` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 43117
def stripe_count
  @stripe_count
end
stripe_count=(value) click to toggle source

Sets the value of the `stripe_count` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 43126
def stripe_count=(value)
  @stripe_count = value
end
transport_types() click to toggle source

Returns the value of the `transport_types` attribute.

@return [Array<TransportType>]

# File lib/ovirtsdk4/types.rb, line 43135
def transport_types
  @transport_types
end
transport_types=(list) click to toggle source

Sets the value of the `transport_types` attribute.

@param list [Array<TransportType>]

# File lib/ovirtsdk4/types.rb, line 43144
def transport_types=(list)
  @transport_types = list
end
volume_type() click to toggle source

Returns the value of the `volume_type` attribute.

@return [GlusterVolumeType]

# File lib/ovirtsdk4/types.rb, line 43153
def volume_type
  @volume_type
end
volume_type=(value) click to toggle source

Sets the value of the `volume_type` attribute.

@param value [GlusterVolumeType]

# File lib/ovirtsdk4/types.rb, line 43162
def volume_type=(value)
  @volume_type = value
end