Class: OvirtSDK4::GlusterBrick

Inherits:
GlusterBrickAdvancedDetails 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 = {}) ⇒ GlusterBrick

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

  • :brick_dir (String)

    The value of attribute brick_dir.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :device (String)

    The value of attribute device.

  • :fs_name (String)

    The value of attribute fs_name.

  • :gluster_clients (Array<GlusterClient>, Array<Hash>)

    The values of attribute gluster_clients.

  • :gluster_volume (GlusterVolume, Hash)

    The value of attribute gluster_volume.

  • :id (String)

    The value of attribute id.

  • :instance_type (InstanceType, Hash)

    The value of attribute instance_type.

  • :memory_pools (Array<GlusterMemoryPool>, Array<Hash>)

    The values of attribute memory_pools.

  • :mnt_options (String)

    The value of attribute mnt_options.

  • :name (String)

    The value of attribute name.

  • :pid (Integer)

    The value of attribute pid.

  • :port (Integer)

    The value of attribute port.

  • :server_id (String)

    The value of attribute server_id.

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

    The values of attribute statistics.

  • :status (GlusterBrickStatus)

    The value of attribute status.

  • :template (Template, Hash)

    The value of attribute template.

  • :vm (Vm, Hash)

    The value of attribute vm.

  • :vms (Array<Vm>, Array<Hash>)

    The values of attribute vms.



50671
50672
50673
50674
50675
50676
50677
50678
# File 'lib/ovirtsdk4/types.rb', line 50671

def initialize(opts = {})
  super(opts)
  self.brick_dir = opts[:brick_dir]
  self.gluster_volume = opts[:gluster_volume]
  self.server_id = opts[:server_id]
  self.statistics = opts[:statistics]
  self.status = opts[:status]
end

Instance Method Details

#==(other) ⇒ Object

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



50683
50684
50685
50686
50687
50688
50689
50690
# File 'lib/ovirtsdk4/types.rb', line 50683

def ==(other)
  super &&
  @brick_dir == other.brick_dir &&
  @gluster_volume == other.gluster_volume &&
  @server_id == other.server_id &&
  @statistics == other.statistics &&
  @status == other.status
end

#brick_dirString

Returns the value of the brick_dir attribute.

Returns:

  • (String)


50208
50209
50210
# File 'lib/ovirtsdk4/types.rb', line 50208

def brick_dir
  @brick_dir
end

#brick_dir=(value) ⇒ Object

Sets the value of the brick_dir attribute.

Parameters:

  • value (String)


50217
50218
50219
# File 'lib/ovirtsdk4/types.rb', line 50217

def brick_dir=(value)
  @brick_dir = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


50226
50227
50228
# File 'lib/ovirtsdk4/types.rb', line 50226

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


50235
50236
50237
# File 'lib/ovirtsdk4/types.rb', line 50235

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


50244
50245
50246
# File 'lib/ovirtsdk4/types.rb', line 50244

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


50253
50254
50255
# File 'lib/ovirtsdk4/types.rb', line 50253

def description=(value)
  @description = value
end

#deviceString

Returns the value of the device attribute.

Returns:

  • (String)


50262
50263
50264
# File 'lib/ovirtsdk4/types.rb', line 50262

def device
  @device
end

#device=(value) ⇒ Object

Sets the value of the device attribute.

Parameters:

  • value (String)


50271
50272
50273
# File 'lib/ovirtsdk4/types.rb', line 50271

def device=(value)
  @device = value
end

#fs_nameString

Returns the value of the fs_name attribute.

Returns:

  • (String)


50280
50281
50282
# File 'lib/ovirtsdk4/types.rb', line 50280

def fs_name
  @fs_name
end

#fs_name=(value) ⇒ Object

Sets the value of the fs_name attribute.

Parameters:

  • value (String)


50289
50290
50291
# File 'lib/ovirtsdk4/types.rb', line 50289

def fs_name=(value)
  @fs_name = value
end

#gluster_clientsArray<GlusterClient>

Returns the value of the gluster_clients attribute.

Returns:



50298
50299
50300
# File 'lib/ovirtsdk4/types.rb', line 50298

def gluster_clients
  @gluster_clients
end

#gluster_clients=(list) ⇒ Object

Sets the value of the gluster_clients attribute.

Parameters:



50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
# File 'lib/ovirtsdk4/types.rb', line 50307

def gluster_clients=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = GlusterClient.new(value)
      end
    end
  end
  @gluster_clients = list
end

#gluster_volumeGlusterVolume

Returns the value of the gluster_volume attribute.

Returns:



50324
50325
50326
# File 'lib/ovirtsdk4/types.rb', line 50324

def gluster_volume
  @gluster_volume
end

#gluster_volume=(value) ⇒ Object

Sets the value of the gluster_volume attribute.

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



50337
50338
50339
50340
50341
50342
# File 'lib/ovirtsdk4/types.rb', line 50337

def gluster_volume=(value)
  if value.is_a?(Hash)
    value = GlusterVolume.new(value)
  end
  @gluster_volume = value
end

#hashObject

Generates a hash value for this object.



50695
50696
50697
50698
50699
50700
50701
50702
# File 'lib/ovirtsdk4/types.rb', line 50695

def hash
  super +
  @brick_dir.hash +
  @gluster_volume.hash +
  @server_id.hash +
  @statistics.hash +
  @status.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


50349
50350
50351
# File 'lib/ovirtsdk4/types.rb', line 50349

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


50358
50359
50360
# File 'lib/ovirtsdk4/types.rb', line 50358

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



50367
50368
50369
# File 'lib/ovirtsdk4/types.rb', line 50367

def instance_type
  @instance_type
end

#instance_type=(value) ⇒ Object

Sets the value of the instance_type attribute.

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



50380
50381
50382
50383
50384
50385
# File 'lib/ovirtsdk4/types.rb', line 50380

def instance_type=(value)
  if value.is_a?(Hash)
    value = InstanceType.new(value)
  end
  @instance_type = value
end

#memory_poolsArray<GlusterMemoryPool>

Returns the value of the memory_pools attribute.

Returns:



50392
50393
50394
# File 'lib/ovirtsdk4/types.rb', line 50392

def memory_pools
  @memory_pools
end

#memory_pools=(list) ⇒ Object

Sets the value of the memory_pools attribute.

Parameters:



50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
# File 'lib/ovirtsdk4/types.rb', line 50401

def memory_pools=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = GlusterMemoryPool.new(value)
      end
    end
  end
  @memory_pools = list
end

#mnt_optionsString

Returns the value of the mnt_options attribute.

Returns:

  • (String)


50418
50419
50420
# File 'lib/ovirtsdk4/types.rb', line 50418

def mnt_options
  @mnt_options
end

#mnt_options=(value) ⇒ Object

Sets the value of the mnt_options attribute.

Parameters:

  • value (String)


50427
50428
50429
# File 'lib/ovirtsdk4/types.rb', line 50427

def mnt_options=(value)
  @mnt_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


50436
50437
50438
# File 'lib/ovirtsdk4/types.rb', line 50436

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


50445
50446
50447
# File 'lib/ovirtsdk4/types.rb', line 50445

def name=(value)
  @name = value
end

#pidInteger

Returns the value of the pid attribute.

Returns:

  • (Integer)


50454
50455
50456
# File 'lib/ovirtsdk4/types.rb', line 50454

def pid
  @pid
end

#pid=(value) ⇒ Object

Sets the value of the pid attribute.

Parameters:

  • value (Integer)


50463
50464
50465
# File 'lib/ovirtsdk4/types.rb', line 50463

def pid=(value)
  @pid = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


50472
50473
50474
# File 'lib/ovirtsdk4/types.rb', line 50472

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


50481
50482
50483
# File 'lib/ovirtsdk4/types.rb', line 50481

def port=(value)
  @port = value
end

#server_idString

Returns the value of the server_id attribute.

Returns:

  • (String)


50490
50491
50492
# File 'lib/ovirtsdk4/types.rb', line 50490

def server_id
  @server_id
end

#server_id=(value) ⇒ Object

Sets the value of the server_id attribute.

Parameters:

  • value (String)


50499
50500
50501
# File 'lib/ovirtsdk4/types.rb', line 50499

def server_id=(value)
  @server_id = value
end

#statisticsArray<Statistic>

Returns the value of the statistics attribute.

Returns:



50508
50509
50510
# File 'lib/ovirtsdk4/types.rb', line 50508

def statistics
  @statistics
end

#statistics=(list) ⇒ Object

Sets the value of the statistics attribute.

Parameters:



50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
# File 'lib/ovirtsdk4/types.rb', line 50517

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

#statusGlusterBrickStatus

Returns the value of the status attribute.

Returns:



50534
50535
50536
# File 'lib/ovirtsdk4/types.rb', line 50534

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:



50543
50544
50545
# File 'lib/ovirtsdk4/types.rb', line 50543

def status=(value)
  @status = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



50552
50553
50554
# File 'lib/ovirtsdk4/types.rb', line 50552

def template
  @template
end

#template=(value) ⇒ Object

Sets the value of the template attribute.

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



50565
50566
50567
50568
50569
50570
# File 'lib/ovirtsdk4/types.rb', line 50565

def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



50577
50578
50579
# File 'lib/ovirtsdk4/types.rb', line 50577

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

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

  • value (Vm, Hash)


50590
50591
50592
50593
50594
50595
# File 'lib/ovirtsdk4/types.rb', line 50590

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end

#vmsArray<Vm>

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


50602
50603
50604
# File 'lib/ovirtsdk4/types.rb', line 50602

def vms
  @vms
end

#vms=(list) ⇒ Object

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
# File 'lib/ovirtsdk4/types.rb', line 50611

def vms=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Vm.new(value)
      end
    end
  end
  @vms = list
end