Class: OvirtSDK4::GlusterVolume

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (GlusterVolume) initialize(opts = {})

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

  • :bricks (Array<GlusterBrick>, Array<Hash>)

    The values of attribute bricks.

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :disperse_count (Integer)

    The value of attribute disperse_count.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :options (Array<Option>, Array<Hash>)

    The values of attribute options.

  • :redundancy_count (Integer)

    The value of attribute redundancy_count.

  • :replica_count (Integer)

    The value of attribute replica_count.

  • :statistics (Array<Statistic>, Array<Hash>)

    The values of attribute statistics.

  • :status (GlusterVolumeStatus)

    The value of attribute status.

  • :stripe_count (Integer)

    The value of attribute stripe_count.

  • :transport_types (Array<TransportType>, Array<Hash>)

    The values of attribute transport_types.

  • :volume_type (GlusterVolumeType)

    The value of attribute volume_type.



31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
# File 'lib/ovirtsdk4/types.rb', line 31533

def initialize(opts = {})
  super(opts)
  self.bricks = opts[:bricks]
  self.cluster = opts[:cluster]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.disperse_count = opts[:disperse_count]
  self.id = opts[:id]
  self.name = opts[:name]
  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

Instance Method Details

- (Array<GlusterBrick>) bricks

Returns the value of the bricks attribute.

Returns:



31203
31204
31205
# File 'lib/ovirtsdk4/types.rb', line 31203

def bricks
  return @bricks
end

- (Object) bricks=(list)

Sets the value of the bricks attribute.

Parameters:



31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
# File 'lib/ovirtsdk4/types.rb', line 31211

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

Returns the value of the cluster attribute.

Returns:



31228
31229
31230
# File 'lib/ovirtsdk4/types.rb', line 31228

def cluster
  return @cluster
end

- (Object) cluster=(value)

Sets the value of the cluster attribute.

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

Parameters:



31241
31242
31243
31244
31245
31246
# File 'lib/ovirtsdk4/types.rb', line 31241

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


31253
31254
31255
# File 'lib/ovirtsdk4/types.rb', line 31253

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


31262
31263
31264
# File 'lib/ovirtsdk4/types.rb', line 31262

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


31271
31272
31273
# File 'lib/ovirtsdk4/types.rb', line 31271

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


31280
31281
31282
# File 'lib/ovirtsdk4/types.rb', line 31280

def description=(value)
  @description = value
end

- (Integer) disperse_count

Returns the value of the disperse_count attribute.

Returns:

  • (Integer)


31289
31290
31291
# File 'lib/ovirtsdk4/types.rb', line 31289

def disperse_count
  return @disperse_count
end

- (Object) disperse_count=(value)

Sets the value of the disperse_count attribute.

Parameters:

  • value (Integer)


31298
31299
31300
# File 'lib/ovirtsdk4/types.rb', line 31298

def disperse_count=(value)
  @disperse_count = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


31307
31308
31309
# File 'lib/ovirtsdk4/types.rb', line 31307

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


31316
31317
31318
# File 'lib/ovirtsdk4/types.rb', line 31316

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


31325
31326
31327
# File 'lib/ovirtsdk4/types.rb', line 31325

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


31334
31335
31336
# File 'lib/ovirtsdk4/types.rb', line 31334

def name=(value)
  @name = value
end

- (Array<Option>) options

Returns the value of the options attribute.

Returns:



31343
31344
31345
# File 'lib/ovirtsdk4/types.rb', line 31343

def options
  return @options
end

- (Object) options=(list)

Sets the value of the options attribute.

Parameters:



31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
# File 'lib/ovirtsdk4/types.rb', line 31351

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

- (Integer) redundancy_count

Returns the value of the redundancy_count attribute.

Returns:

  • (Integer)


31368
31369
31370
# File 'lib/ovirtsdk4/types.rb', line 31368

def redundancy_count
  return @redundancy_count
end

- (Object) redundancy_count=(value)

Sets the value of the redundancy_count attribute.

Parameters:

  • value (Integer)


31377
31378
31379
# File 'lib/ovirtsdk4/types.rb', line 31377

def redundancy_count=(value)
  @redundancy_count = value
end

- (Integer) replica_count

Returns the value of the replica_count attribute.

Returns:

  • (Integer)


31386
31387
31388
# File 'lib/ovirtsdk4/types.rb', line 31386

def replica_count
  return @replica_count
end

- (Object) replica_count=(value)

Sets the value of the replica_count attribute.

Parameters:

  • value (Integer)


31395
31396
31397
# File 'lib/ovirtsdk4/types.rb', line 31395

def replica_count=(value)
  @replica_count = value
end

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



31404
31405
31406
# File 'lib/ovirtsdk4/types.rb', line 31404

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
# File 'lib/ovirtsdk4/types.rb', line 31412

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

- (GlusterVolumeStatus) status

Returns the value of the status attribute.

Returns:



31429
31430
31431
# File 'lib/ovirtsdk4/types.rb', line 31429

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



31438
31439
31440
# File 'lib/ovirtsdk4/types.rb', line 31438

def status=(value)
  @status = value
end

- (Integer) stripe_count

Returns the value of the stripe_count attribute.

Returns:

  • (Integer)


31447
31448
31449
# File 'lib/ovirtsdk4/types.rb', line 31447

def stripe_count
  return @stripe_count
end

- (Object) stripe_count=(value)

Sets the value of the stripe_count attribute.

Parameters:

  • value (Integer)


31456
31457
31458
# File 'lib/ovirtsdk4/types.rb', line 31456

def stripe_count=(value)
  @stripe_count = value
end

- (Array<TransportType>) transport_types

Returns the value of the transport_types attribute.

Returns:



31465
31466
31467
# File 'lib/ovirtsdk4/types.rb', line 31465

def transport_types
  return @transport_types
end

- (Object) transport_types=(list)

Sets the value of the transport_types attribute.

Parameters:



31473
31474
31475
# File 'lib/ovirtsdk4/types.rb', line 31473

def transport_types=(list)
  @transport_types = list
end

- (GlusterVolumeType) volume_type

Returns the value of the volume_type attribute.

Returns:



31482
31483
31484
# File 'lib/ovirtsdk4/types.rb', line 31482

def volume_type
  return @volume_type
end

- (Object) volume_type=(value)

Sets the value of the volume_type attribute.

Parameters:



31491
31492
31493
# File 'lib/ovirtsdk4/types.rb', line 31491

def volume_type=(value)
  @volume_type = value
end