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.
50740 50741 50742 50743 50744 50745 50746 50747 |
# File 'lib/ovirtsdk4/types.rb', line 50740 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.
50752 50753 50754 50755 50756 50757 50758 50759 |
# File 'lib/ovirtsdk4/types.rb', line 50752 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.
50277 50278 50279 |
# File 'lib/ovirtsdk4/types.rb', line 50277 def brick_dir @brick_dir end |
#brick_dir=(value) ⇒ Object
Sets the value of the brick_dir
attribute.
50286 50287 50288 |
# File 'lib/ovirtsdk4/types.rb', line 50286 def brick_dir=(value) @brick_dir = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
50295 50296 50297 |
# File 'lib/ovirtsdk4/types.rb', line 50295 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
50304 50305 50306 |
# File 'lib/ovirtsdk4/types.rb', line 50304 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
50313 50314 50315 |
# File 'lib/ovirtsdk4/types.rb', line 50313 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
50322 50323 50324 |
# File 'lib/ovirtsdk4/types.rb', line 50322 def description=(value) @description = value end |
#device ⇒ String
Returns the value of the device
attribute.
50331 50332 50333 |
# File 'lib/ovirtsdk4/types.rb', line 50331 def device @device end |
#device=(value) ⇒ Object
Sets the value of the device
attribute.
50340 50341 50342 |
# File 'lib/ovirtsdk4/types.rb', line 50340 def device=(value) @device = value end |
#fs_name ⇒ String
Returns the value of the fs_name
attribute.
50349 50350 50351 |
# File 'lib/ovirtsdk4/types.rb', line 50349 def fs_name @fs_name end |
#fs_name=(value) ⇒ Object
Sets the value of the fs_name
attribute.
50358 50359 50360 |
# File 'lib/ovirtsdk4/types.rb', line 50358 def fs_name=(value) @fs_name = value end |
#gluster_clients ⇒ Array<GlusterClient>
Returns the value of the gluster_clients
attribute.
50367 50368 50369 |
# File 'lib/ovirtsdk4/types.rb', line 50367 def gluster_clients @gluster_clients end |
#gluster_clients=(list) ⇒ Object
Sets the value of the gluster_clients
attribute.
50376 50377 50378 50379 50380 50381 50382 50383 50384 50385 50386 |
# File 'lib/ovirtsdk4/types.rb', line 50376 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.
50393 50394 50395 |
# File 'lib/ovirtsdk4/types.rb', line 50393 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.
50406 50407 50408 50409 50410 50411 |
# File 'lib/ovirtsdk4/types.rb', line 50406 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.
50764 50765 50766 50767 50768 50769 50770 50771 |
# File 'lib/ovirtsdk4/types.rb', line 50764 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.
50418 50419 50420 |
# File 'lib/ovirtsdk4/types.rb', line 50418 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
50427 50428 50429 |
# File 'lib/ovirtsdk4/types.rb', line 50427 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
50436 50437 50438 |
# File 'lib/ovirtsdk4/types.rb', line 50436 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.
50449 50450 50451 50452 50453 50454 |
# File 'lib/ovirtsdk4/types.rb', line 50449 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.
50461 50462 50463 |
# File 'lib/ovirtsdk4/types.rb', line 50461 def memory_pools @memory_pools end |
#memory_pools=(list) ⇒ Object
Sets the value of the memory_pools
attribute.
50470 50471 50472 50473 50474 50475 50476 50477 50478 50479 50480 |
# File 'lib/ovirtsdk4/types.rb', line 50470 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.
50487 50488 50489 |
# File 'lib/ovirtsdk4/types.rb', line 50487 def @mnt_options end |
#mnt_options=(value) ⇒ Object
Sets the value of the mnt_options
attribute.
50496 50497 50498 |
# File 'lib/ovirtsdk4/types.rb', line 50496 def (value) @mnt_options = value end |
#name ⇒ String
Returns the value of the name
attribute.
50505 50506 50507 |
# File 'lib/ovirtsdk4/types.rb', line 50505 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
50514 50515 50516 |
# File 'lib/ovirtsdk4/types.rb', line 50514 def name=(value) @name = value end |
#pid ⇒ Integer
Returns the value of the pid
attribute.
50523 50524 50525 |
# File 'lib/ovirtsdk4/types.rb', line 50523 def pid @pid end |
#pid=(value) ⇒ Object
Sets the value of the pid
attribute.
50532 50533 50534 |
# File 'lib/ovirtsdk4/types.rb', line 50532 def pid=(value) @pid = value end |
#port ⇒ Integer
Returns the value of the port
attribute.
50541 50542 50543 |
# File 'lib/ovirtsdk4/types.rb', line 50541 def port @port end |
#port=(value) ⇒ Object
Sets the value of the port
attribute.
50550 50551 50552 |
# File 'lib/ovirtsdk4/types.rb', line 50550 def port=(value) @port = value end |
#server_id ⇒ String
Returns the value of the server_id
attribute.
50559 50560 50561 |
# File 'lib/ovirtsdk4/types.rb', line 50559 def server_id @server_id end |
#server_id=(value) ⇒ Object
Sets the value of the server_id
attribute.
50568 50569 50570 |
# File 'lib/ovirtsdk4/types.rb', line 50568 def server_id=(value) @server_id = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
50577 50578 50579 |
# File 'lib/ovirtsdk4/types.rb', line 50577 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
50586 50587 50588 50589 50590 50591 50592 50593 50594 50595 50596 |
# File 'lib/ovirtsdk4/types.rb', line 50586 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.
50603 50604 50605 |
# File 'lib/ovirtsdk4/types.rb', line 50603 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
50612 50613 50614 |
# File 'lib/ovirtsdk4/types.rb', line 50612 def status=(value) @status = value end |
#template ⇒ Template
Returns the value of the template
attribute.
50621 50622 50623 |
# File 'lib/ovirtsdk4/types.rb', line 50621 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.
50634 50635 50636 50637 50638 50639 |
# File 'lib/ovirtsdk4/types.rb', line 50634 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.
50646 50647 50648 |
# File 'lib/ovirtsdk4/types.rb', line 50646 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.
50659 50660 50661 50662 50663 50664 |
# File 'lib/ovirtsdk4/types.rb', line 50659 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.
50671 50672 50673 |
# File 'lib/ovirtsdk4/types.rb', line 50671 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
50680 50681 50682 50683 50684 50685 50686 50687 50688 50689 50690 |
# File 'lib/ovirtsdk4/types.rb', line 50680 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 |