Class: OvirtSDK4::GlusterBrickAdvancedDetails

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

Direct Known Subclasses

GlusterBrick

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ GlusterBrickAdvancedDetails

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

  • :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.

  • :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.

  • :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.



39513
39514
39515
39516
39517
39518
39519
39520
39521
39522
# File 'lib/ovirtsdk4/types.rb', line 39513

def initialize(opts = {})
  super(opts)
  self.device = opts[:device]
  self.fs_name = opts[:fs_name]
  self.gluster_clients = opts[:gluster_clients]
  self.memory_pools = opts[:memory_pools]
  self.mnt_options = opts[:mnt_options]
  self.pid = opts[:pid]
  self.port = opts[:port]
end

Instance Method Details

#==(other) ⇒ Object

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



39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
# File 'lib/ovirtsdk4/types.rb', line 39527

def ==(other)
  super &&
  @device == other.device &&
  @fs_name == other.fs_name &&
  @gluster_clients == other.gluster_clients &&
  @memory_pools == other.memory_pools &&
  @mnt_options == other.mnt_options &&
  @pid == other.pid &&
  @port == other.port
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


39165
39166
39167
# File 'lib/ovirtsdk4/types.rb', line 39165

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


39174
39175
39176
# File 'lib/ovirtsdk4/types.rb', line 39174

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


39183
39184
39185
# File 'lib/ovirtsdk4/types.rb', line 39183

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


39192
39193
39194
# File 'lib/ovirtsdk4/types.rb', line 39192

def description=(value)
  @description = value
end

#deviceString

Returns the value of the device attribute.

Returns:

  • (String)


39201
39202
39203
# File 'lib/ovirtsdk4/types.rb', line 39201

def device
  @device
end

#device=(value) ⇒ Object

Sets the value of the device attribute.

Parameters:

  • value (String)


39210
39211
39212
# File 'lib/ovirtsdk4/types.rb', line 39210

def device=(value)
  @device = value
end

#fs_nameString

Returns the value of the fs_name attribute.

Returns:

  • (String)


39219
39220
39221
# File 'lib/ovirtsdk4/types.rb', line 39219

def fs_name
  @fs_name
end

#fs_name=(value) ⇒ Object

Sets the value of the fs_name attribute.

Parameters:

  • value (String)


39228
39229
39230
# File 'lib/ovirtsdk4/types.rb', line 39228

def fs_name=(value)
  @fs_name = value
end

#gluster_clientsArray<GlusterClient>

Returns the value of the gluster_clients attribute.

Returns:



39237
39238
39239
# File 'lib/ovirtsdk4/types.rb', line 39237

def gluster_clients
  @gluster_clients
end

#gluster_clients=(list) ⇒ Object

Sets the value of the gluster_clients attribute.

Parameters:



39246
39247
39248
39249
39250
39251
39252
39253
39254
39255
39256
# File 'lib/ovirtsdk4/types.rb', line 39246

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

#hashObject

Generates a hash value for this object.



39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
# File 'lib/ovirtsdk4/types.rb', line 39541

def hash
  super +
  @device.hash +
  @fs_name.hash +
  @gluster_clients.hash +
  @memory_pools.hash +
  @mnt_options.hash +
  @pid.hash +
  @port.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


39263
39264
39265
# File 'lib/ovirtsdk4/types.rb', line 39263

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


39272
39273
39274
# File 'lib/ovirtsdk4/types.rb', line 39272

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



39281
39282
39283
# File 'lib/ovirtsdk4/types.rb', line 39281

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:



39294
39295
39296
39297
39298
39299
# File 'lib/ovirtsdk4/types.rb', line 39294

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:



39306
39307
39308
# File 'lib/ovirtsdk4/types.rb', line 39306

def memory_pools
  @memory_pools
end

#memory_pools=(list) ⇒ Object

Sets the value of the memory_pools attribute.

Parameters:



39315
39316
39317
39318
39319
39320
39321
39322
39323
39324
39325
# File 'lib/ovirtsdk4/types.rb', line 39315

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)


39332
39333
39334
# File 'lib/ovirtsdk4/types.rb', line 39332

def mnt_options
  @mnt_options
end

#mnt_options=(value) ⇒ Object

Sets the value of the mnt_options attribute.

Parameters:

  • value (String)


39341
39342
39343
# File 'lib/ovirtsdk4/types.rb', line 39341

def mnt_options=(value)
  @mnt_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


39350
39351
39352
# File 'lib/ovirtsdk4/types.rb', line 39350

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


39359
39360
39361
# File 'lib/ovirtsdk4/types.rb', line 39359

def name=(value)
  @name = value
end

#pidInteger

Returns the value of the pid attribute.

Returns:

  • (Integer)


39368
39369
39370
# File 'lib/ovirtsdk4/types.rb', line 39368

def pid
  @pid
end

#pid=(value) ⇒ Object

Sets the value of the pid attribute.

Parameters:

  • value (Integer)


39377
39378
39379
# File 'lib/ovirtsdk4/types.rb', line 39377

def pid=(value)
  @pid = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


39386
39387
39388
# File 'lib/ovirtsdk4/types.rb', line 39386

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


39395
39396
39397
# File 'lib/ovirtsdk4/types.rb', line 39395

def port=(value)
  @port = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



39404
39405
39406
# File 'lib/ovirtsdk4/types.rb', line 39404

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:



39417
39418
39419
39420
39421
39422
# File 'lib/ovirtsdk4/types.rb', line 39417

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:



39429
39430
39431
# File 'lib/ovirtsdk4/types.rb', line 39429

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)


39442
39443
39444
39445
39446
39447
# File 'lib/ovirtsdk4/types.rb', line 39442

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


39454
39455
39456
# File 'lib/ovirtsdk4/types.rb', line 39454

def vms
  @vms
end

#vms=(list) ⇒ Object

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


39463
39464
39465
39466
39467
39468
39469
39470
39471
39472
39473
# File 'lib/ovirtsdk4/types.rb', line 39463

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