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

#href, #href=

Constructor Details

- (GlusterBrick) initialize(opts = {})

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.



41266
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276
41277
41278
41279
41280
41281
41282
41283
41284
41285
41286
41287
41288
# File 'lib/ovirtsdk4/types.rb', line 41266

def initialize(opts = {})
  super(opts)
  self.brick_dir = opts[:brick_dir]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.device = opts[:device]
  self.fs_name = opts[:fs_name]
  self.gluster_clients = opts[:gluster_clients]
  self.gluster_volume = opts[:gluster_volume]
  self.id = opts[:id]
  self.instance_type = opts[:instance_type]
  self.memory_pools = opts[:memory_pools]
  self.mnt_options = opts[:mnt_options]
  self.name = opts[:name]
  self.pid = opts[:pid]
  self.port = opts[:port]
  self.server_id = opts[:server_id]
  self.statistics = opts[:statistics]
  self.status = opts[:status]
  self.template = opts[:template]
  self.vm = opts[:vm]
  self.vms = opts[:vms]
end

Instance Method Details

- (String) brick_dir

Returns the value of the brick_dir attribute.

Returns:

  • (String)


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

def brick_dir
  return @brick_dir
end

- (Object) brick_dir=(value)

Sets the value of the brick_dir attribute.

Parameters:

  • value (String)


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

def brick_dir=(value)
  @brick_dir = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


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

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


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

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


40843
40844
40845
# File 'lib/ovirtsdk4/types.rb', line 40843

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


40852
40853
40854
# File 'lib/ovirtsdk4/types.rb', line 40852

def description=(value)
  @description = value
end

- (String) device

Returns the value of the device attribute.

Returns:

  • (String)


40861
40862
40863
# File 'lib/ovirtsdk4/types.rb', line 40861

def device
  return @device
end

- (Object) device=(value)

Sets the value of the device attribute.

Parameters:

  • value (String)


40870
40871
40872
# File 'lib/ovirtsdk4/types.rb', line 40870

def device=(value)
  @device = value
end

- (String) fs_name

Returns the value of the fs_name attribute.

Returns:

  • (String)


40879
40880
40881
# File 'lib/ovirtsdk4/types.rb', line 40879

def fs_name
  return @fs_name
end

- (Object) fs_name=(value)

Sets the value of the fs_name attribute.

Parameters:

  • value (String)


40888
40889
40890
# File 'lib/ovirtsdk4/types.rb', line 40888

def fs_name=(value)
  @fs_name = value
end

- (Array<GlusterClient>) gluster_clients

Returns the value of the gluster_clients attribute.

Returns:



40897
40898
40899
# File 'lib/ovirtsdk4/types.rb', line 40897

def gluster_clients
  return @gluster_clients
end

- (Object) gluster_clients=(list)

Sets the value of the gluster_clients attribute.

Parameters:



40905
40906
40907
40908
40909
40910
40911
40912
40913
40914
40915
# File 'lib/ovirtsdk4/types.rb', line 40905

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

- (GlusterVolume) gluster_volume

Returns the value of the gluster_volume attribute.

Returns:



40922
40923
40924
# File 'lib/ovirtsdk4/types.rb', line 40922

def gluster_volume
  return @gluster_volume
end

- (Object) gluster_volume=(value)

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:



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

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

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


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

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


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

def id=(value)
  @id = value
end

- (InstanceType) instance_type

Returns the value of the instance_type attribute.

Returns:



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

def instance_type
  return @instance_type
end

- (Object) instance_type=(value)

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:



40978
40979
40980
40981
40982
40983
# File 'lib/ovirtsdk4/types.rb', line 40978

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

- (Array<GlusterMemoryPool>) memory_pools

Returns the value of the memory_pools attribute.

Returns:



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

def memory_pools
  return @memory_pools
end

- (Object) memory_pools=(list)

Sets the value of the memory_pools attribute.

Parameters:



40998
40999
41000
41001
41002
41003
41004
41005
41006
41007
41008
# File 'lib/ovirtsdk4/types.rb', line 40998

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

- (String) mnt_options

Returns the value of the mnt_options attribute.

Returns:

  • (String)


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

def mnt_options
  return @mnt_options
end

- (Object) mnt_options=(value)

Sets the value of the mnt_options attribute.

Parameters:

  • value (String)


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

def mnt_options=(value)
  @mnt_options = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


41033
41034
41035
# File 'lib/ovirtsdk4/types.rb', line 41033

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


41042
41043
41044
# File 'lib/ovirtsdk4/types.rb', line 41042

def name=(value)
  @name = value
end

- (Integer) pid

Returns the value of the pid attribute.

Returns:

  • (Integer)


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

def pid
  return @pid
end

- (Object) pid=(value)

Sets the value of the pid attribute.

Parameters:

  • value (Integer)


41060
41061
41062
# File 'lib/ovirtsdk4/types.rb', line 41060

def pid=(value)
  @pid = value
end

- (Integer) port

Returns the value of the port attribute.

Returns:

  • (Integer)


41069
41070
41071
# File 'lib/ovirtsdk4/types.rb', line 41069

def port
  return @port
end

- (Object) port=(value)

Sets the value of the port attribute.

Parameters:

  • value (Integer)


41078
41079
41080
# File 'lib/ovirtsdk4/types.rb', line 41078

def port=(value)
  @port = value
end

- (String) server_id

Returns the value of the server_id attribute.

Returns:

  • (String)


41087
41088
41089
# File 'lib/ovirtsdk4/types.rb', line 41087

def server_id
  return @server_id
end

- (Object) server_id=(value)

Sets the value of the server_id attribute.

Parameters:

  • value (String)


41096
41097
41098
# File 'lib/ovirtsdk4/types.rb', line 41096

def server_id=(value)
  @server_id = value
end

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



41105
41106
41107
# File 'lib/ovirtsdk4/types.rb', line 41105

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



41113
41114
41115
41116
41117
41118
41119
41120
41121
41122
41123
# File 'lib/ovirtsdk4/types.rb', line 41113

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

- (GlusterBrickStatus) status

Returns the value of the status attribute.

Returns:



41130
41131
41132
# File 'lib/ovirtsdk4/types.rb', line 41130

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



41139
41140
41141
# File 'lib/ovirtsdk4/types.rb', line 41139

def status=(value)
  @status = value
end

- (Template) template

Returns the value of the template attribute.

Returns:



41148
41149
41150
# File 'lib/ovirtsdk4/types.rb', line 41148

def template
  return @template
end

- (Object) template=(value)

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:



41161
41162
41163
41164
41165
41166
# File 'lib/ovirtsdk4/types.rb', line 41161

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

- (Vm) vm

Returns the value of the vm attribute.

Returns:



41173
41174
41175
# File 'lib/ovirtsdk4/types.rb', line 41173

def vm
  return @vm
end

- (Object) vm=(value)

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)


41186
41187
41188
41189
41190
41191
# File 'lib/ovirtsdk4/types.rb', line 41186

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

- (Array<Vm>) vms

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


41198
41199
41200
# File 'lib/ovirtsdk4/types.rb', line 41198

def vms
  return @vms
end

- (Object) vms=(list)

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


41206
41207
41208
41209
41210
41211
41212
41213
41214
41215
41216
# File 'lib/ovirtsdk4/types.rb', line 41206

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