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.
50587 50588 50589 50590 50591 50592 50593 50594 |
# File 'lib/ovirtsdk4/types.rb', line 50587 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.
50599 50600 50601 50602 50603 50604 50605 50606 |
# File 'lib/ovirtsdk4/types.rb', line 50599 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.
50124 50125 50126 |
# File 'lib/ovirtsdk4/types.rb', line 50124 def brick_dir @brick_dir end |
#brick_dir=(value) ⇒ Object
Sets the value of the brick_dir
attribute.
50133 50134 50135 |
# File 'lib/ovirtsdk4/types.rb', line 50133 def brick_dir=(value) @brick_dir = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
50142 50143 50144 |
# File 'lib/ovirtsdk4/types.rb', line 50142 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
50151 50152 50153 |
# File 'lib/ovirtsdk4/types.rb', line 50151 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
50160 50161 50162 |
# File 'lib/ovirtsdk4/types.rb', line 50160 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
50169 50170 50171 |
# File 'lib/ovirtsdk4/types.rb', line 50169 def description=(value) @description = value end |
#device ⇒ String
Returns the value of the device
attribute.
50178 50179 50180 |
# File 'lib/ovirtsdk4/types.rb', line 50178 def device @device end |
#device=(value) ⇒ Object
Sets the value of the device
attribute.
50187 50188 50189 |
# File 'lib/ovirtsdk4/types.rb', line 50187 def device=(value) @device = value end |
#fs_name ⇒ String
Returns the value of the fs_name
attribute.
50196 50197 50198 |
# File 'lib/ovirtsdk4/types.rb', line 50196 def fs_name @fs_name end |
#fs_name=(value) ⇒ Object
Sets the value of the fs_name
attribute.
50205 50206 50207 |
# File 'lib/ovirtsdk4/types.rb', line 50205 def fs_name=(value) @fs_name = value end |
#gluster_clients ⇒ Array<GlusterClient>
Returns the value of the gluster_clients
attribute.
50214 50215 50216 |
# File 'lib/ovirtsdk4/types.rb', line 50214 def gluster_clients @gluster_clients end |
#gluster_clients=(list) ⇒ Object
Sets the value of the gluster_clients
attribute.
50223 50224 50225 50226 50227 50228 50229 50230 50231 50232 50233 |
# File 'lib/ovirtsdk4/types.rb', line 50223 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.
50240 50241 50242 |
# File 'lib/ovirtsdk4/types.rb', line 50240 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.
50253 50254 50255 50256 50257 50258 |
# File 'lib/ovirtsdk4/types.rb', line 50253 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.
50611 50612 50613 50614 50615 50616 50617 50618 |
# File 'lib/ovirtsdk4/types.rb', line 50611 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.
50265 50266 50267 |
# File 'lib/ovirtsdk4/types.rb', line 50265 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
50274 50275 50276 |
# File 'lib/ovirtsdk4/types.rb', line 50274 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
50283 50284 50285 |
# File 'lib/ovirtsdk4/types.rb', line 50283 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.
50296 50297 50298 50299 50300 50301 |
# File 'lib/ovirtsdk4/types.rb', line 50296 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.
50308 50309 50310 |
# File 'lib/ovirtsdk4/types.rb', line 50308 def memory_pools @memory_pools end |
#memory_pools=(list) ⇒ Object
Sets the value of the memory_pools
attribute.
50317 50318 50319 50320 50321 50322 50323 50324 50325 50326 50327 |
# File 'lib/ovirtsdk4/types.rb', line 50317 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.
50334 50335 50336 |
# File 'lib/ovirtsdk4/types.rb', line 50334 def @mnt_options end |
#mnt_options=(value) ⇒ Object
Sets the value of the mnt_options
attribute.
50343 50344 50345 |
# File 'lib/ovirtsdk4/types.rb', line 50343 def (value) @mnt_options = value end |
#name ⇒ String
Returns the value of the name
attribute.
50352 50353 50354 |
# File 'lib/ovirtsdk4/types.rb', line 50352 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
50361 50362 50363 |
# File 'lib/ovirtsdk4/types.rb', line 50361 def name=(value) @name = value end |
#pid ⇒ Integer
Returns the value of the pid
attribute.
50370 50371 50372 |
# File 'lib/ovirtsdk4/types.rb', line 50370 def pid @pid end |
#pid=(value) ⇒ Object
Sets the value of the pid
attribute.
50379 50380 50381 |
# File 'lib/ovirtsdk4/types.rb', line 50379 def pid=(value) @pid = value end |
#port ⇒ Integer
Returns the value of the port
attribute.
50388 50389 50390 |
# File 'lib/ovirtsdk4/types.rb', line 50388 def port @port end |
#port=(value) ⇒ Object
Sets the value of the port
attribute.
50397 50398 50399 |
# File 'lib/ovirtsdk4/types.rb', line 50397 def port=(value) @port = value end |
#server_id ⇒ String
Returns the value of the server_id
attribute.
50406 50407 50408 |
# File 'lib/ovirtsdk4/types.rb', line 50406 def server_id @server_id end |
#server_id=(value) ⇒ Object
Sets the value of the server_id
attribute.
50415 50416 50417 |
# File 'lib/ovirtsdk4/types.rb', line 50415 def server_id=(value) @server_id = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
50424 50425 50426 |
# File 'lib/ovirtsdk4/types.rb', line 50424 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
50433 50434 50435 50436 50437 50438 50439 50440 50441 50442 50443 |
# File 'lib/ovirtsdk4/types.rb', line 50433 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.
50450 50451 50452 |
# File 'lib/ovirtsdk4/types.rb', line 50450 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
50459 50460 50461 |
# File 'lib/ovirtsdk4/types.rb', line 50459 def status=(value) @status = value end |
#template ⇒ Template
Returns the value of the template
attribute.
50468 50469 50470 |
# File 'lib/ovirtsdk4/types.rb', line 50468 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.
50481 50482 50483 50484 50485 50486 |
# File 'lib/ovirtsdk4/types.rb', line 50481 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.
50493 50494 50495 |
# File 'lib/ovirtsdk4/types.rb', line 50493 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.
50506 50507 50508 50509 50510 50511 |
# File 'lib/ovirtsdk4/types.rb', line 50506 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.
50518 50519 50520 |
# File 'lib/ovirtsdk4/types.rb', line 50518 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
50527 50528 50529 50530 50531 50532 50533 50534 50535 50536 50537 |
# File 'lib/ovirtsdk4/types.rb', line 50527 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 |