Class: OvirtSDK4::GlusterBrick
- Inherits:
-
GlusterBrickAdvancedDetails
- Object
- Struct
- Identified
- Device
- GlusterBrickAdvancedDetails
- OvirtSDK4::GlusterBrick
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#brick_dir ⇒ String
Returns the value of the
brick_dir
attribute. -
#brick_dir=(value) ⇒ Object
Sets the value of the
brick_dir
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#device ⇒ String
Returns the value of the
device
attribute. -
#device=(value) ⇒ Object
Sets the value of the
device
attribute. -
#fs_name ⇒ String
Returns the value of the
fs_name
attribute. -
#fs_name=(value) ⇒ Object
Sets the value of the
fs_name
attribute. -
#gluster_clients ⇒ Array<GlusterClient>
Returns the value of the
gluster_clients
attribute. -
#gluster_clients=(list) ⇒ Object
Sets the value of the
gluster_clients
attribute. -
#gluster_volume ⇒ GlusterVolume
Returns the value of the
gluster_volume
attribute. -
#gluster_volume=(value) ⇒ Object
Sets the value of the
gluster_volume
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ GlusterBrick
constructor
Creates a new instance of the GlusterBrick class.
-
#instance_type ⇒ InstanceType
Returns the value of the
instance_type
attribute. -
#instance_type=(value) ⇒ Object
Sets the value of the
instance_type
attribute. -
#memory_pools ⇒ Array<GlusterMemoryPool>
Returns the value of the
memory_pools
attribute. -
#memory_pools=(list) ⇒ Object
Sets the value of the
memory_pools
attribute. -
#mnt_options ⇒ String
Returns the value of the
mnt_options
attribute. -
#mnt_options=(value) ⇒ Object
Sets the value of the
mnt_options
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#pid ⇒ Integer
Returns the value of the
pid
attribute. -
#pid=(value) ⇒ Object
Sets the value of the
pid
attribute. -
#port ⇒ Integer
Returns the value of the
port
attribute. -
#port=(value) ⇒ Object
Sets the value of the
port
attribute. -
#server_id ⇒ String
Returns the value of the
server_id
attribute. -
#server_id=(value) ⇒ Object
Sets the value of the
server_id
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute. -
#status ⇒ GlusterBrickStatus
Returns the value of the
status
attribute. -
#status=(value) ⇒ Object
Sets the value of the
status
attribute. -
#template ⇒ Template
Returns the value of the
template
attribute. -
#template=(value) ⇒ Object
Sets the value of the
template
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vms
attribute. -
#vms=(list) ⇒ Object
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ GlusterBrick
Creates a new instance of the OvirtSDK4::GlusterBrick class.
51464 51465 51466 51467 51468 51469 51470 51471 |
# File 'lib/ovirtsdk4/types.rb', line 51464 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.
51476 51477 51478 51479 51480 51481 51482 51483 |
# File 'lib/ovirtsdk4/types.rb', line 51476 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_dir ⇒ String
Returns the value of the brick_dir
attribute.
51001 51002 51003 |
# File 'lib/ovirtsdk4/types.rb', line 51001 def brick_dir @brick_dir end |
#brick_dir=(value) ⇒ Object
Sets the value of the brick_dir
attribute.
51010 51011 51012 |
# File 'lib/ovirtsdk4/types.rb', line 51010 def brick_dir=(value) @brick_dir = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
51019 51020 51021 |
# File 'lib/ovirtsdk4/types.rb', line 51019 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
51028 51029 51030 |
# File 'lib/ovirtsdk4/types.rb', line 51028 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
51037 51038 51039 |
# File 'lib/ovirtsdk4/types.rb', line 51037 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
51046 51047 51048 |
# File 'lib/ovirtsdk4/types.rb', line 51046 def description=(value) @description = value end |
#device ⇒ String
Returns the value of the device
attribute.
51055 51056 51057 |
# File 'lib/ovirtsdk4/types.rb', line 51055 def device @device end |
#device=(value) ⇒ Object
Sets the value of the device
attribute.
51064 51065 51066 |
# File 'lib/ovirtsdk4/types.rb', line 51064 def device=(value) @device = value end |
#fs_name ⇒ String
Returns the value of the fs_name
attribute.
51073 51074 51075 |
# File 'lib/ovirtsdk4/types.rb', line 51073 def fs_name @fs_name end |
#fs_name=(value) ⇒ Object
Sets the value of the fs_name
attribute.
51082 51083 51084 |
# File 'lib/ovirtsdk4/types.rb', line 51082 def fs_name=(value) @fs_name = value end |
#gluster_clients ⇒ Array<GlusterClient>
Returns the value of the gluster_clients
attribute.
51091 51092 51093 |
# File 'lib/ovirtsdk4/types.rb', line 51091 def gluster_clients @gluster_clients end |
#gluster_clients=(list) ⇒ Object
Sets the value of the gluster_clients
attribute.
51100 51101 51102 51103 51104 51105 51106 51107 51108 51109 51110 |
# File 'lib/ovirtsdk4/types.rb', line 51100 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_volume ⇒ GlusterVolume
Returns the value of the gluster_volume
attribute.
51117 51118 51119 |
# File 'lib/ovirtsdk4/types.rb', line 51117 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.
51130 51131 51132 51133 51134 51135 |
# File 'lib/ovirtsdk4/types.rb', line 51130 def gluster_volume=(value) if value.is_a?(Hash) value = GlusterVolume.new(value) end @gluster_volume = value end |
#hash ⇒ Object
Generates a hash value for this object.
51488 51489 51490 51491 51492 51493 51494 51495 |
# File 'lib/ovirtsdk4/types.rb', line 51488 def hash super + @brick_dir.hash + @gluster_volume.hash + @server_id.hash + @statistics.hash + @status.hash end |
#id ⇒ String
Returns the value of the id
attribute.
51142 51143 51144 |
# File 'lib/ovirtsdk4/types.rb', line 51142 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
51151 51152 51153 |
# File 'lib/ovirtsdk4/types.rb', line 51151 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
51160 51161 51162 |
# File 'lib/ovirtsdk4/types.rb', line 51160 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.
51173 51174 51175 51176 51177 51178 |
# File 'lib/ovirtsdk4/types.rb', line 51173 def instance_type=(value) if value.is_a?(Hash) value = InstanceType.new(value) end @instance_type = value end |
#memory_pools ⇒ Array<GlusterMemoryPool>
Returns the value of the memory_pools
attribute.
51185 51186 51187 |
# File 'lib/ovirtsdk4/types.rb', line 51185 def memory_pools @memory_pools end |
#memory_pools=(list) ⇒ Object
Sets the value of the memory_pools
attribute.
51194 51195 51196 51197 51198 51199 51200 51201 51202 51203 51204 |
# File 'lib/ovirtsdk4/types.rb', line 51194 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_options ⇒ String
Returns the value of the mnt_options
attribute.
51211 51212 51213 |
# File 'lib/ovirtsdk4/types.rb', line 51211 def @mnt_options end |
#mnt_options=(value) ⇒ Object
Sets the value of the mnt_options
attribute.
51220 51221 51222 |
# File 'lib/ovirtsdk4/types.rb', line 51220 def (value) @mnt_options = value end |
#name ⇒ String
Returns the value of the name
attribute.
51229 51230 51231 |
# File 'lib/ovirtsdk4/types.rb', line 51229 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
51238 51239 51240 |
# File 'lib/ovirtsdk4/types.rb', line 51238 def name=(value) @name = value end |
#pid ⇒ Integer
Returns the value of the pid
attribute.
51247 51248 51249 |
# File 'lib/ovirtsdk4/types.rb', line 51247 def pid @pid end |
#pid=(value) ⇒ Object
Sets the value of the pid
attribute.
51256 51257 51258 |
# File 'lib/ovirtsdk4/types.rb', line 51256 def pid=(value) @pid = value end |
#port ⇒ Integer
Returns the value of the port
attribute.
51265 51266 51267 |
# File 'lib/ovirtsdk4/types.rb', line 51265 def port @port end |
#port=(value) ⇒ Object
Sets the value of the port
attribute.
51274 51275 51276 |
# File 'lib/ovirtsdk4/types.rb', line 51274 def port=(value) @port = value end |
#server_id ⇒ String
Returns the value of the server_id
attribute.
51283 51284 51285 |
# File 'lib/ovirtsdk4/types.rb', line 51283 def server_id @server_id end |
#server_id=(value) ⇒ Object
Sets the value of the server_id
attribute.
51292 51293 51294 |
# File 'lib/ovirtsdk4/types.rb', line 51292 def server_id=(value) @server_id = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
51301 51302 51303 |
# File 'lib/ovirtsdk4/types.rb', line 51301 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
51310 51311 51312 51313 51314 51315 51316 51317 51318 51319 51320 |
# File 'lib/ovirtsdk4/types.rb', line 51310 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 |
#status ⇒ GlusterBrickStatus
Returns the value of the status
attribute.
51327 51328 51329 |
# File 'lib/ovirtsdk4/types.rb', line 51327 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
51336 51337 51338 |
# File 'lib/ovirtsdk4/types.rb', line 51336 def status=(value) @status = value end |
#template ⇒ Template
Returns the value of the template
attribute.
51345 51346 51347 |
# File 'lib/ovirtsdk4/types.rb', line 51345 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.
51358 51359 51360 51361 51362 51363 |
# File 'lib/ovirtsdk4/types.rb', line 51358 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.
51370 51371 51372 |
# File 'lib/ovirtsdk4/types.rb', line 51370 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.
51383 51384 51385 51386 51387 51388 |
# File 'lib/ovirtsdk4/types.rb', line 51383 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
51395 51396 51397 |
# File 'lib/ovirtsdk4/types.rb', line 51395 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
51404 51405 51406 51407 51408 51409 51410 51411 51412 51413 51414 |
# File 'lib/ovirtsdk4/types.rb', line 51404 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 |