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.



38868
38869
38870
38871
38872
38873
38874
38875
38876
38877
# File 'lib/ovirtsdk4/types.rb', line 38868

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.



38882
38883
38884
38885
38886
38887
38888
38889
38890
38891
# File 'lib/ovirtsdk4/types.rb', line 38882

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)


38520
38521
38522
# File 'lib/ovirtsdk4/types.rb', line 38520

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


38529
38530
38531
# File 'lib/ovirtsdk4/types.rb', line 38529

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


38538
38539
38540
# File 'lib/ovirtsdk4/types.rb', line 38538

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


38547
38548
38549
# File 'lib/ovirtsdk4/types.rb', line 38547

def description=(value)
  @description = value
end

#deviceString

Returns the value of the device attribute.

Returns:

  • (String)


38556
38557
38558
# File 'lib/ovirtsdk4/types.rb', line 38556

def device
  @device
end

#device=(value) ⇒ Object

Sets the value of the device attribute.

Parameters:

  • value (String)


38565
38566
38567
# File 'lib/ovirtsdk4/types.rb', line 38565

def device=(value)
  @device = value
end

#fs_nameString

Returns the value of the fs_name attribute.

Returns:

  • (String)


38574
38575
38576
# File 'lib/ovirtsdk4/types.rb', line 38574

def fs_name
  @fs_name
end

#fs_name=(value) ⇒ Object

Sets the value of the fs_name attribute.

Parameters:

  • value (String)


38583
38584
38585
# File 'lib/ovirtsdk4/types.rb', line 38583

def fs_name=(value)
  @fs_name = value
end

#gluster_clientsArray<GlusterClient>

Returns the value of the gluster_clients attribute.

Returns:



38592
38593
38594
# File 'lib/ovirtsdk4/types.rb', line 38592

def gluster_clients
  @gluster_clients
end

#gluster_clients=(list) ⇒ Object

Sets the value of the gluster_clients attribute.

Parameters:



38601
38602
38603
38604
38605
38606
38607
38608
38609
38610
38611
# File 'lib/ovirtsdk4/types.rb', line 38601

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.



38896
38897
38898
38899
38900
38901
38902
38903
38904
38905
# File 'lib/ovirtsdk4/types.rb', line 38896

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)


38618
38619
38620
# File 'lib/ovirtsdk4/types.rb', line 38618

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


38627
38628
38629
# File 'lib/ovirtsdk4/types.rb', line 38627

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



38636
38637
38638
# File 'lib/ovirtsdk4/types.rb', line 38636

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:



38649
38650
38651
38652
38653
38654
# File 'lib/ovirtsdk4/types.rb', line 38649

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:



38661
38662
38663
# File 'lib/ovirtsdk4/types.rb', line 38661

def memory_pools
  @memory_pools
end

#memory_pools=(list) ⇒ Object

Sets the value of the memory_pools attribute.

Parameters:



38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
# File 'lib/ovirtsdk4/types.rb', line 38670

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)


38687
38688
38689
# File 'lib/ovirtsdk4/types.rb', line 38687

def mnt_options
  @mnt_options
end

#mnt_options=(value) ⇒ Object

Sets the value of the mnt_options attribute.

Parameters:

  • value (String)


38696
38697
38698
# File 'lib/ovirtsdk4/types.rb', line 38696

def mnt_options=(value)
  @mnt_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


38705
38706
38707
# File 'lib/ovirtsdk4/types.rb', line 38705

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


38714
38715
38716
# File 'lib/ovirtsdk4/types.rb', line 38714

def name=(value)
  @name = value
end

#pidInteger

Returns the value of the pid attribute.

Returns:

  • (Integer)


38723
38724
38725
# File 'lib/ovirtsdk4/types.rb', line 38723

def pid
  @pid
end

#pid=(value) ⇒ Object

Sets the value of the pid attribute.

Parameters:

  • value (Integer)


38732
38733
38734
# File 'lib/ovirtsdk4/types.rb', line 38732

def pid=(value)
  @pid = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


38741
38742
38743
# File 'lib/ovirtsdk4/types.rb', line 38741

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


38750
38751
38752
# File 'lib/ovirtsdk4/types.rb', line 38750

def port=(value)
  @port = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



38759
38760
38761
# File 'lib/ovirtsdk4/types.rb', line 38759

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:



38772
38773
38774
38775
38776
38777
# File 'lib/ovirtsdk4/types.rb', line 38772

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:



38784
38785
38786
# File 'lib/ovirtsdk4/types.rb', line 38784

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)


38797
38798
38799
38800
38801
38802
# File 'lib/ovirtsdk4/types.rb', line 38797

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


38809
38810
38811
# File 'lib/ovirtsdk4/types.rb', line 38809

def vms
  @vms
end

#vms=(list) ⇒ Object

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


38818
38819
38820
38821
38822
38823
38824
38825
38826
38827
38828
# File 'lib/ovirtsdk4/types.rb', line 38818

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