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
trueifselfandotherhave the same attributes and values. -
#brick_dir ⇒ String
Returns the value of the
brick_dirattribute. -
#brick_dir=(value) ⇒ Object
Sets the value of the
brick_dirattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#device ⇒ String
Returns the value of the
deviceattribute. -
#device=(value) ⇒ Object
Sets the value of the
deviceattribute. -
#fs_name ⇒ String
Returns the value of the
fs_nameattribute. -
#fs_name=(value) ⇒ Object
Sets the value of the
fs_nameattribute. -
#gluster_clients ⇒ Array<GlusterClient>
Returns the value of the
gluster_clientsattribute. -
#gluster_clients=(list) ⇒ Object
Sets the value of the
gluster_clientsattribute. -
#gluster_volume ⇒ GlusterVolume
Returns the value of the
gluster_volumeattribute. -
#gluster_volume=(value) ⇒ Object
Sets the value of the
gluster_volumeattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ GlusterBrick
constructor
Creates a new instance of the GlusterBrick class.
-
#instance_type ⇒ InstanceType
Returns the value of the
instance_typeattribute. -
#instance_type=(value) ⇒ Object
Sets the value of the
instance_typeattribute. -
#memory_pools ⇒ Array<GlusterMemoryPool>
Returns the value of the
memory_poolsattribute. -
#memory_pools=(list) ⇒ Object
Sets the value of the
memory_poolsattribute. -
#mnt_options ⇒ String
Returns the value of the
mnt_optionsattribute. -
#mnt_options=(value) ⇒ Object
Sets the value of the
mnt_optionsattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#pid ⇒ Integer
Returns the value of the
pidattribute. -
#pid=(value) ⇒ Object
Sets the value of the
pidattribute. -
#port ⇒ Integer
Returns the value of the
portattribute. -
#port=(value) ⇒ Object
Sets the value of the
portattribute. -
#server_id ⇒ String
Returns the value of the
server_idattribute. -
#server_id=(value) ⇒ Object
Sets the value of the
server_idattribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statisticsattribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statisticsattribute. -
#status ⇒ GlusterBrickStatus
Returns the value of the
statusattribute. -
#status=(value) ⇒ Object
Sets the value of the
statusattribute. -
#template ⇒ Template
Returns the value of the
templateattribute. -
#template=(value) ⇒ Object
Sets the value of the
templateattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vmsattribute. -
#vms=(list) ⇒ Object
Sets the value of the
vmsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ GlusterBrick
Creates a new instance of the OvirtSDK4::GlusterBrick class.
55114 55115 55116 55117 55118 55119 55120 55121 |
# File 'lib/ovirtsdk4/types.rb', line 55114 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.
55126 55127 55128 55129 55130 55131 55132 55133 |
# File 'lib/ovirtsdk4/types.rb', line 55126 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.
54651 54652 54653 |
# File 'lib/ovirtsdk4/types.rb', line 54651 def brick_dir @brick_dir end |
#brick_dir=(value) ⇒ Object
Sets the value of the brick_dir attribute.
54660 54661 54662 |
# File 'lib/ovirtsdk4/types.rb', line 54660 def brick_dir=(value) @brick_dir = value end |
#comment ⇒ String
Returns the value of the comment attribute.
54669 54670 54671 |
# File 'lib/ovirtsdk4/types.rb', line 54669 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
54678 54679 54680 |
# File 'lib/ovirtsdk4/types.rb', line 54678 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
54687 54688 54689 |
# File 'lib/ovirtsdk4/types.rb', line 54687 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
54696 54697 54698 |
# File 'lib/ovirtsdk4/types.rb', line 54696 def description=(value) @description = value end |
#device ⇒ String
Returns the value of the device attribute.
54705 54706 54707 |
# File 'lib/ovirtsdk4/types.rb', line 54705 def device @device end |
#device=(value) ⇒ Object
Sets the value of the device attribute.
54714 54715 54716 |
# File 'lib/ovirtsdk4/types.rb', line 54714 def device=(value) @device = value end |
#fs_name ⇒ String
Returns the value of the fs_name attribute.
54723 54724 54725 |
# File 'lib/ovirtsdk4/types.rb', line 54723 def fs_name @fs_name end |
#fs_name=(value) ⇒ Object
Sets the value of the fs_name attribute.
54732 54733 54734 |
# File 'lib/ovirtsdk4/types.rb', line 54732 def fs_name=(value) @fs_name = value end |
#gluster_clients ⇒ Array<GlusterClient>
Returns the value of the gluster_clients attribute.
54741 54742 54743 |
# File 'lib/ovirtsdk4/types.rb', line 54741 def gluster_clients @gluster_clients end |
#gluster_clients=(list) ⇒ Object
Sets the value of the gluster_clients attribute.
54750 54751 54752 54753 54754 54755 54756 54757 54758 54759 54760 |
# File 'lib/ovirtsdk4/types.rb', line 54750 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.
54767 54768 54769 |
# File 'lib/ovirtsdk4/types.rb', line 54767 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.
54780 54781 54782 54783 54784 54785 |
# File 'lib/ovirtsdk4/types.rb', line 54780 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.
55138 55139 55140 55141 55142 55143 55144 55145 |
# File 'lib/ovirtsdk4/types.rb', line 55138 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.
54792 54793 54794 |
# File 'lib/ovirtsdk4/types.rb', line 54792 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
54801 54802 54803 |
# File 'lib/ovirtsdk4/types.rb', line 54801 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type attribute.
54810 54811 54812 |
# File 'lib/ovirtsdk4/types.rb', line 54810 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.
54823 54824 54825 54826 54827 54828 |
# File 'lib/ovirtsdk4/types.rb', line 54823 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.
54835 54836 54837 |
# File 'lib/ovirtsdk4/types.rb', line 54835 def memory_pools @memory_pools end |
#memory_pools=(list) ⇒ Object
Sets the value of the memory_pools attribute.
54844 54845 54846 54847 54848 54849 54850 54851 54852 54853 54854 |
# File 'lib/ovirtsdk4/types.rb', line 54844 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.
54861 54862 54863 |
# File 'lib/ovirtsdk4/types.rb', line 54861 def end |
#mnt_options=(value) ⇒ Object
Sets the value of the mnt_options attribute.
54870 54871 54872 |
# File 'lib/ovirtsdk4/types.rb', line 54870 def (value) = value end |
#name ⇒ String
Returns the value of the name attribute.
54879 54880 54881 |
# File 'lib/ovirtsdk4/types.rb', line 54879 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
54888 54889 54890 |
# File 'lib/ovirtsdk4/types.rb', line 54888 def name=(value) @name = value end |
#pid ⇒ Integer
Returns the value of the pid attribute.
54897 54898 54899 |
# File 'lib/ovirtsdk4/types.rb', line 54897 def pid @pid end |
#pid=(value) ⇒ Object
Sets the value of the pid attribute.
54906 54907 54908 |
# File 'lib/ovirtsdk4/types.rb', line 54906 def pid=(value) @pid = value end |
#port ⇒ Integer
Returns the value of the port attribute.
54915 54916 54917 |
# File 'lib/ovirtsdk4/types.rb', line 54915 def port @port end |
#port=(value) ⇒ Object
Sets the value of the port attribute.
54924 54925 54926 |
# File 'lib/ovirtsdk4/types.rb', line 54924 def port=(value) @port = value end |
#server_id ⇒ String
Returns the value of the server_id attribute.
54933 54934 54935 |
# File 'lib/ovirtsdk4/types.rb', line 54933 def server_id @server_id end |
#server_id=(value) ⇒ Object
Sets the value of the server_id attribute.
54942 54943 54944 |
# File 'lib/ovirtsdk4/types.rb', line 54942 def server_id=(value) @server_id = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics attribute.
54951 54952 54953 |
# File 'lib/ovirtsdk4/types.rb', line 54951 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
54960 54961 54962 54963 54964 54965 54966 54967 54968 54969 54970 |
# File 'lib/ovirtsdk4/types.rb', line 54960 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.
54977 54978 54979 |
# File 'lib/ovirtsdk4/types.rb', line 54977 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
54986 54987 54988 |
# File 'lib/ovirtsdk4/types.rb', line 54986 def status=(value) @status = value end |
#template ⇒ Template
Returns the value of the template attribute.
54995 54996 54997 |
# File 'lib/ovirtsdk4/types.rb', line 54995 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.
55008 55009 55010 55011 55012 55013 |
# File 'lib/ovirtsdk4/types.rb', line 55008 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.
55020 55021 55022 |
# File 'lib/ovirtsdk4/types.rb', line 55020 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.
55033 55034 55035 55036 55037 55038 |
# File 'lib/ovirtsdk4/types.rb', line 55033 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.
55045 55046 55047 |
# File 'lib/ovirtsdk4/types.rb', line 55045 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms attribute.
55054 55055 55056 55057 55058 55059 55060 55061 55062 55063 55064 |
# File 'lib/ovirtsdk4/types.rb', line 55054 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 |