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.



41109
41110
41111
41112
41113
41114
41115
41116
41117
41118
# File 'lib/ovirtsdk4/types.rb', line 41109

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.



41123
41124
41125
41126
41127
41128
41129
41130
41131
41132
# File 'lib/ovirtsdk4/types.rb', line 41123

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)


40761
40762
40763
# File 'lib/ovirtsdk4/types.rb', line 40761

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


40770
40771
40772
# File 'lib/ovirtsdk4/types.rb', line 40770

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


40779
40780
40781
# File 'lib/ovirtsdk4/types.rb', line 40779

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


40788
40789
40790
# File 'lib/ovirtsdk4/types.rb', line 40788

def description=(value)
  @description = value
end

#deviceString

Returns the value of the device attribute.

Returns:

  • (String)


40797
40798
40799
# File 'lib/ovirtsdk4/types.rb', line 40797

def device
  @device
end

#device=(value) ⇒ Object

Sets the value of the device attribute.

Parameters:

  • value (String)


40806
40807
40808
# File 'lib/ovirtsdk4/types.rb', line 40806

def device=(value)
  @device = value
end

#fs_nameString

Returns the value of the fs_name attribute.

Returns:

  • (String)


40815
40816
40817
# File 'lib/ovirtsdk4/types.rb', line 40815

def fs_name
  @fs_name
end

#fs_name=(value) ⇒ Object

Sets the value of the fs_name attribute.

Parameters:

  • value (String)


40824
40825
40826
# File 'lib/ovirtsdk4/types.rb', line 40824

def fs_name=(value)
  @fs_name = value
end

#gluster_clientsArray<GlusterClient>

Returns the value of the gluster_clients attribute.

Returns:



40833
40834
40835
# File 'lib/ovirtsdk4/types.rb', line 40833

def gluster_clients
  @gluster_clients
end

#gluster_clients=(list) ⇒ Object

Sets the value of the gluster_clients attribute.

Parameters:



40842
40843
40844
40845
40846
40847
40848
40849
40850
40851
40852
# File 'lib/ovirtsdk4/types.rb', line 40842

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.



41137
41138
41139
41140
41141
41142
41143
41144
41145
41146
# File 'lib/ovirtsdk4/types.rb', line 41137

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)


40859
40860
40861
# File 'lib/ovirtsdk4/types.rb', line 40859

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


40868
40869
40870
# File 'lib/ovirtsdk4/types.rb', line 40868

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



40877
40878
40879
# File 'lib/ovirtsdk4/types.rb', line 40877

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:



40890
40891
40892
40893
40894
40895
# File 'lib/ovirtsdk4/types.rb', line 40890

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:



40902
40903
40904
# File 'lib/ovirtsdk4/types.rb', line 40902

def memory_pools
  @memory_pools
end

#memory_pools=(list) ⇒ Object

Sets the value of the memory_pools attribute.

Parameters:



40911
40912
40913
40914
40915
40916
40917
40918
40919
40920
40921
# File 'lib/ovirtsdk4/types.rb', line 40911

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)


40928
40929
40930
# File 'lib/ovirtsdk4/types.rb', line 40928

def mnt_options
  @mnt_options
end

#mnt_options=(value) ⇒ Object

Sets the value of the mnt_options attribute.

Parameters:

  • value (String)


40937
40938
40939
# File 'lib/ovirtsdk4/types.rb', line 40937

def mnt_options=(value)
  @mnt_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


40946
40947
40948
# File 'lib/ovirtsdk4/types.rb', line 40946

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


40955
40956
40957
# File 'lib/ovirtsdk4/types.rb', line 40955

def name=(value)
  @name = value
end

#pidInteger

Returns the value of the pid attribute.

Returns:

  • (Integer)


40964
40965
40966
# File 'lib/ovirtsdk4/types.rb', line 40964

def pid
  @pid
end

#pid=(value) ⇒ Object

Sets the value of the pid attribute.

Parameters:

  • value (Integer)


40973
40974
40975
# File 'lib/ovirtsdk4/types.rb', line 40973

def pid=(value)
  @pid = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


40982
40983
40984
# File 'lib/ovirtsdk4/types.rb', line 40982

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


40991
40992
40993
# File 'lib/ovirtsdk4/types.rb', line 40991

def port=(value)
  @port = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



41000
41001
41002
# File 'lib/ovirtsdk4/types.rb', line 41000

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:



41013
41014
41015
41016
41017
41018
# File 'lib/ovirtsdk4/types.rb', line 41013

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:



41025
41026
41027
# File 'lib/ovirtsdk4/types.rb', line 41025

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)


41038
41039
41040
41041
41042
41043
# File 'lib/ovirtsdk4/types.rb', line 41038

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


41050
41051
41052
# File 'lib/ovirtsdk4/types.rb', line 41050

def vms
  @vms
end

#vms=(list) ⇒ Object

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


41059
41060
41061
41062
41063
41064
41065
41066
41067
41068
41069
# File 'lib/ovirtsdk4/types.rb', line 41059

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