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.
53154 53155 53156 53157 53158 53159 53160 53161 |
# File 'lib/ovirtsdk4/types.rb', line 53154 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.
53166 53167 53168 53169 53170 53171 53172 53173 |
# File 'lib/ovirtsdk4/types.rb', line 53166 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.
52691 52692 52693 |
# File 'lib/ovirtsdk4/types.rb', line 52691 def brick_dir @brick_dir end |
#brick_dir=(value) ⇒ Object
Sets the value of the brick_dir
attribute.
52700 52701 52702 |
# File 'lib/ovirtsdk4/types.rb', line 52700 def brick_dir=(value) @brick_dir = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
52709 52710 52711 |
# File 'lib/ovirtsdk4/types.rb', line 52709 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
52718 52719 52720 |
# File 'lib/ovirtsdk4/types.rb', line 52718 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
52727 52728 52729 |
# File 'lib/ovirtsdk4/types.rb', line 52727 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
52736 52737 52738 |
# File 'lib/ovirtsdk4/types.rb', line 52736 def description=(value) @description = value end |
#device ⇒ String
Returns the value of the device
attribute.
52745 52746 52747 |
# File 'lib/ovirtsdk4/types.rb', line 52745 def device @device end |
#device=(value) ⇒ Object
Sets the value of the device
attribute.
52754 52755 52756 |
# File 'lib/ovirtsdk4/types.rb', line 52754 def device=(value) @device = value end |
#fs_name ⇒ String
Returns the value of the fs_name
attribute.
52763 52764 52765 |
# File 'lib/ovirtsdk4/types.rb', line 52763 def fs_name @fs_name end |
#fs_name=(value) ⇒ Object
Sets the value of the fs_name
attribute.
52772 52773 52774 |
# File 'lib/ovirtsdk4/types.rb', line 52772 def fs_name=(value) @fs_name = value end |
#gluster_clients ⇒ Array<GlusterClient>
Returns the value of the gluster_clients
attribute.
52781 52782 52783 |
# File 'lib/ovirtsdk4/types.rb', line 52781 def gluster_clients @gluster_clients end |
#gluster_clients=(list) ⇒ Object
Sets the value of the gluster_clients
attribute.
52790 52791 52792 52793 52794 52795 52796 52797 52798 52799 52800 |
# File 'lib/ovirtsdk4/types.rb', line 52790 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.
52807 52808 52809 |
# File 'lib/ovirtsdk4/types.rb', line 52807 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.
52820 52821 52822 52823 52824 52825 |
# File 'lib/ovirtsdk4/types.rb', line 52820 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.
53178 53179 53180 53181 53182 53183 53184 53185 |
# File 'lib/ovirtsdk4/types.rb', line 53178 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.
52832 52833 52834 |
# File 'lib/ovirtsdk4/types.rb', line 52832 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
52841 52842 52843 |
# File 'lib/ovirtsdk4/types.rb', line 52841 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
52850 52851 52852 |
# File 'lib/ovirtsdk4/types.rb', line 52850 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.
52863 52864 52865 52866 52867 52868 |
# File 'lib/ovirtsdk4/types.rb', line 52863 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.
52875 52876 52877 |
# File 'lib/ovirtsdk4/types.rb', line 52875 def memory_pools @memory_pools end |
#memory_pools=(list) ⇒ Object
Sets the value of the memory_pools
attribute.
52884 52885 52886 52887 52888 52889 52890 52891 52892 52893 52894 |
# File 'lib/ovirtsdk4/types.rb', line 52884 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.
52901 52902 52903 |
# File 'lib/ovirtsdk4/types.rb', line 52901 def @mnt_options end |
#mnt_options=(value) ⇒ Object
Sets the value of the mnt_options
attribute.
52910 52911 52912 |
# File 'lib/ovirtsdk4/types.rb', line 52910 def (value) @mnt_options = value end |
#name ⇒ String
Returns the value of the name
attribute.
52919 52920 52921 |
# File 'lib/ovirtsdk4/types.rb', line 52919 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
52928 52929 52930 |
# File 'lib/ovirtsdk4/types.rb', line 52928 def name=(value) @name = value end |
#pid ⇒ Integer
Returns the value of the pid
attribute.
52937 52938 52939 |
# File 'lib/ovirtsdk4/types.rb', line 52937 def pid @pid end |
#pid=(value) ⇒ Object
Sets the value of the pid
attribute.
52946 52947 52948 |
# File 'lib/ovirtsdk4/types.rb', line 52946 def pid=(value) @pid = value end |
#port ⇒ Integer
Returns the value of the port
attribute.
52955 52956 52957 |
# File 'lib/ovirtsdk4/types.rb', line 52955 def port @port end |
#port=(value) ⇒ Object
Sets the value of the port
attribute.
52964 52965 52966 |
# File 'lib/ovirtsdk4/types.rb', line 52964 def port=(value) @port = value end |
#server_id ⇒ String
Returns the value of the server_id
attribute.
52973 52974 52975 |
# File 'lib/ovirtsdk4/types.rb', line 52973 def server_id @server_id end |
#server_id=(value) ⇒ Object
Sets the value of the server_id
attribute.
52982 52983 52984 |
# File 'lib/ovirtsdk4/types.rb', line 52982 def server_id=(value) @server_id = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
52991 52992 52993 |
# File 'lib/ovirtsdk4/types.rb', line 52991 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
53000 53001 53002 53003 53004 53005 53006 53007 53008 53009 53010 |
# File 'lib/ovirtsdk4/types.rb', line 53000 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.
53017 53018 53019 |
# File 'lib/ovirtsdk4/types.rb', line 53017 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
53026 53027 53028 |
# File 'lib/ovirtsdk4/types.rb', line 53026 def status=(value) @status = value end |
#template ⇒ Template
Returns the value of the template
attribute.
53035 53036 53037 |
# File 'lib/ovirtsdk4/types.rb', line 53035 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.
53048 53049 53050 53051 53052 53053 |
# File 'lib/ovirtsdk4/types.rb', line 53048 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.
53060 53061 53062 |
# File 'lib/ovirtsdk4/types.rb', line 53060 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.
53073 53074 53075 53076 53077 53078 |
# File 'lib/ovirtsdk4/types.rb', line 53073 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.
53085 53086 53087 |
# File 'lib/ovirtsdk4/types.rb', line 53085 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
53094 53095 53096 53097 53098 53099 53100 53101 53102 53103 53104 |
# File 'lib/ovirtsdk4/types.rb', line 53094 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 |