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.
54821 54822 54823 54824 54825 54826 54827 54828 |
# File 'lib/ovirtsdk4/types.rb', line 54821 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.
54833 54834 54835 54836 54837 54838 54839 54840 |
# File 'lib/ovirtsdk4/types.rb', line 54833 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.
54358 54359 54360 |
# File 'lib/ovirtsdk4/types.rb', line 54358 def brick_dir @brick_dir end |
#brick_dir=(value) ⇒ Object
Sets the value of the brick_dir
attribute.
54367 54368 54369 |
# File 'lib/ovirtsdk4/types.rb', line 54367 def brick_dir=(value) @brick_dir = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
54376 54377 54378 |
# File 'lib/ovirtsdk4/types.rb', line 54376 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
54385 54386 54387 |
# File 'lib/ovirtsdk4/types.rb', line 54385 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
54394 54395 54396 |
# File 'lib/ovirtsdk4/types.rb', line 54394 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
54403 54404 54405 |
# File 'lib/ovirtsdk4/types.rb', line 54403 def description=(value) @description = value end |
#device ⇒ String
Returns the value of the device
attribute.
54412 54413 54414 |
# File 'lib/ovirtsdk4/types.rb', line 54412 def device @device end |
#device=(value) ⇒ Object
Sets the value of the device
attribute.
54421 54422 54423 |
# File 'lib/ovirtsdk4/types.rb', line 54421 def device=(value) @device = value end |
#fs_name ⇒ String
Returns the value of the fs_name
attribute.
54430 54431 54432 |
# File 'lib/ovirtsdk4/types.rb', line 54430 def fs_name @fs_name end |
#fs_name=(value) ⇒ Object
Sets the value of the fs_name
attribute.
54439 54440 54441 |
# File 'lib/ovirtsdk4/types.rb', line 54439 def fs_name=(value) @fs_name = value end |
#gluster_clients ⇒ Array<GlusterClient>
Returns the value of the gluster_clients
attribute.
54448 54449 54450 |
# File 'lib/ovirtsdk4/types.rb', line 54448 def gluster_clients @gluster_clients end |
#gluster_clients=(list) ⇒ Object
Sets the value of the gluster_clients
attribute.
54457 54458 54459 54460 54461 54462 54463 54464 54465 54466 54467 |
# File 'lib/ovirtsdk4/types.rb', line 54457 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.
54474 54475 54476 |
# File 'lib/ovirtsdk4/types.rb', line 54474 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.
54487 54488 54489 54490 54491 54492 |
# File 'lib/ovirtsdk4/types.rb', line 54487 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.
54845 54846 54847 54848 54849 54850 54851 54852 |
# File 'lib/ovirtsdk4/types.rb', line 54845 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.
54499 54500 54501 |
# File 'lib/ovirtsdk4/types.rb', line 54499 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
54508 54509 54510 |
# File 'lib/ovirtsdk4/types.rb', line 54508 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
54517 54518 54519 |
# File 'lib/ovirtsdk4/types.rb', line 54517 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.
54530 54531 54532 54533 54534 54535 |
# File 'lib/ovirtsdk4/types.rb', line 54530 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.
54542 54543 54544 |
# File 'lib/ovirtsdk4/types.rb', line 54542 def memory_pools @memory_pools end |
#memory_pools=(list) ⇒ Object
Sets the value of the memory_pools
attribute.
54551 54552 54553 54554 54555 54556 54557 54558 54559 54560 54561 |
# File 'lib/ovirtsdk4/types.rb', line 54551 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.
54568 54569 54570 |
# File 'lib/ovirtsdk4/types.rb', line 54568 def @mnt_options end |
#mnt_options=(value) ⇒ Object
Sets the value of the mnt_options
attribute.
54577 54578 54579 |
# File 'lib/ovirtsdk4/types.rb', line 54577 def (value) @mnt_options = value end |
#name ⇒ String
Returns the value of the name
attribute.
54586 54587 54588 |
# File 'lib/ovirtsdk4/types.rb', line 54586 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
54595 54596 54597 |
# File 'lib/ovirtsdk4/types.rb', line 54595 def name=(value) @name = value end |
#pid ⇒ Integer
Returns the value of the pid
attribute.
54604 54605 54606 |
# File 'lib/ovirtsdk4/types.rb', line 54604 def pid @pid end |
#pid=(value) ⇒ Object
Sets the value of the pid
attribute.
54613 54614 54615 |
# File 'lib/ovirtsdk4/types.rb', line 54613 def pid=(value) @pid = value end |
#port ⇒ Integer
Returns the value of the port
attribute.
54622 54623 54624 |
# File 'lib/ovirtsdk4/types.rb', line 54622 def port @port end |
#port=(value) ⇒ Object
Sets the value of the port
attribute.
54631 54632 54633 |
# File 'lib/ovirtsdk4/types.rb', line 54631 def port=(value) @port = value end |
#server_id ⇒ String
Returns the value of the server_id
attribute.
54640 54641 54642 |
# File 'lib/ovirtsdk4/types.rb', line 54640 def server_id @server_id end |
#server_id=(value) ⇒ Object
Sets the value of the server_id
attribute.
54649 54650 54651 |
# File 'lib/ovirtsdk4/types.rb', line 54649 def server_id=(value) @server_id = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
54658 54659 54660 |
# File 'lib/ovirtsdk4/types.rb', line 54658 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
54667 54668 54669 54670 54671 54672 54673 54674 54675 54676 54677 |
# File 'lib/ovirtsdk4/types.rb', line 54667 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.
54684 54685 54686 |
# File 'lib/ovirtsdk4/types.rb', line 54684 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
54693 54694 54695 |
# File 'lib/ovirtsdk4/types.rb', line 54693 def status=(value) @status = value end |
#template ⇒ Template
Returns the value of the template
attribute.
54702 54703 54704 |
# File 'lib/ovirtsdk4/types.rb', line 54702 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.
54715 54716 54717 54718 54719 54720 |
# File 'lib/ovirtsdk4/types.rb', line 54715 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.
54727 54728 54729 |
# File 'lib/ovirtsdk4/types.rb', line 54727 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.
54740 54741 54742 54743 54744 54745 |
# File 'lib/ovirtsdk4/types.rb', line 54740 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.
54752 54753 54754 |
# File 'lib/ovirtsdk4/types.rb', line 54752 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
54761 54762 54763 54764 54765 54766 54767 54768 54769 54770 54771 |
# File 'lib/ovirtsdk4/types.rb', line 54761 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 |