Class: OvirtSDK4::GlusterVolume
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::GlusterVolume
- 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. -
#bricks ⇒ Array<GlusterBrick>
Returns the value of the
bricks
attribute. -
#bricks=(list) ⇒ Object
Sets the value of the
bricks
attribute. -
#cluster ⇒ Cluster
Returns the value of the
cluster
attribute. -
#cluster=(value) ⇒ Object
Sets the value of the
cluster
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. -
#disperse_count ⇒ Integer
Returns the value of the
disperse_count
attribute. -
#disperse_count=(value) ⇒ Object
Sets the value of the
disperse_count
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 = {}) ⇒ GlusterVolume
constructor
Creates a new instance of the GlusterVolume class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#options ⇒ Array<Option>
Returns the value of the
options
attribute. -
#options=(list) ⇒ Object
Sets the value of the
options
attribute. -
#redundancy_count ⇒ Integer
Returns the value of the
redundancy_count
attribute. -
#redundancy_count=(value) ⇒ Object
Sets the value of the
redundancy_count
attribute. -
#replica_count ⇒ Integer
Returns the value of the
replica_count
attribute. -
#replica_count=(value) ⇒ Object
Sets the value of the
replica_count
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute. -
#status ⇒ GlusterVolumeStatus
Returns the value of the
status
attribute. -
#status=(value) ⇒ Object
Sets the value of the
status
attribute. -
#stripe_count ⇒ Integer
Returns the value of the
stripe_count
attribute. -
#stripe_count=(value) ⇒ Object
Sets the value of the
stripe_count
attribute. -
#transport_types ⇒ Array<TransportType>
Returns the value of the
transport_types
attribute. -
#transport_types=(list) ⇒ Object
Sets the value of the
transport_types
attribute. -
#volume_type ⇒ GlusterVolumeType
Returns the value of the
volume_type
attribute. -
#volume_type=(value) ⇒ Object
Sets the value of the
volume_type
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ GlusterVolume
Creates a new instance of the OvirtSDK4::GlusterVolume class.
43204 43205 43206 43207 43208 43209 43210 43211 43212 43213 43214 43215 43216 43217 |
# File 'lib/ovirtsdk4/types.rb', line 43204 def initialize(opts = {}) super(opts) self.bricks = opts[:bricks] self.cluster = opts[:cluster] self.disperse_count = opts[:disperse_count] self. = opts[:options] self.redundancy_count = opts[:redundancy_count] self.replica_count = opts[:replica_count] self.statistics = opts[:statistics] self.status = opts[:status] self.stripe_count = opts[:stripe_count] self.transport_types = opts[:transport_types] self.volume_type = opts[:volume_type] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
43222 43223 43224 43225 43226 43227 43228 43229 43230 43231 43232 43233 43234 43235 |
# File 'lib/ovirtsdk4/types.rb', line 43222 def ==(other) super && @bricks == other.bricks && @cluster == other.cluster && @disperse_count == other.disperse_count && @options == other. && @redundancy_count == other.redundancy_count && @replica_count == other.replica_count && @statistics == other.statistics && @status == other.status && @stripe_count == other.stripe_count && @transport_types == other.transport_types && @volume_type == other.volume_type end |
#bricks ⇒ Array<GlusterBrick>
Returns the value of the bricks
attribute.
42870 42871 42872 |
# File 'lib/ovirtsdk4/types.rb', line 42870 def bricks @bricks end |
#bricks=(list) ⇒ Object
Sets the value of the bricks
attribute.
42879 42880 42881 42882 42883 42884 42885 42886 42887 42888 42889 |
# File 'lib/ovirtsdk4/types.rb', line 42879 def bricks=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = GlusterBrick.new(value) end end end @bricks = list end |
#cluster ⇒ Cluster
Returns the value of the cluster
attribute.
42896 42897 42898 |
# File 'lib/ovirtsdk4/types.rb', line 42896 def cluster @cluster end |
#cluster=(value) ⇒ Object
Sets the value of the cluster
attribute.
The value
parameter can be an instance of Cluster 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.
42909 42910 42911 42912 42913 42914 |
# File 'lib/ovirtsdk4/types.rb', line 42909 def cluster=(value) if value.is_a?(Hash) value = Cluster.new(value) end @cluster = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
42921 42922 42923 |
# File 'lib/ovirtsdk4/types.rb', line 42921 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
42930 42931 42932 |
# File 'lib/ovirtsdk4/types.rb', line 42930 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
42939 42940 42941 |
# File 'lib/ovirtsdk4/types.rb', line 42939 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
42948 42949 42950 |
# File 'lib/ovirtsdk4/types.rb', line 42948 def description=(value) @description = value end |
#disperse_count ⇒ Integer
Returns the value of the disperse_count
attribute.
42957 42958 42959 |
# File 'lib/ovirtsdk4/types.rb', line 42957 def disperse_count @disperse_count end |
#disperse_count=(value) ⇒ Object
Sets the value of the disperse_count
attribute.
42966 42967 42968 |
# File 'lib/ovirtsdk4/types.rb', line 42966 def disperse_count=(value) @disperse_count = value end |
#hash ⇒ Object
Generates a hash value for this object.
43240 43241 43242 43243 43244 43245 43246 43247 43248 43249 43250 43251 43252 43253 |
# File 'lib/ovirtsdk4/types.rb', line 43240 def hash super + @bricks.hash + @cluster.hash + @disperse_count.hash + @options.hash + @redundancy_count.hash + @replica_count.hash + @statistics.hash + @status.hash + @stripe_count.hash + @transport_types.hash + @volume_type.hash end |
#id ⇒ String
Returns the value of the id
attribute.
42975 42976 42977 |
# File 'lib/ovirtsdk4/types.rb', line 42975 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
42984 42985 42986 |
# File 'lib/ovirtsdk4/types.rb', line 42984 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
42993 42994 42995 |
# File 'lib/ovirtsdk4/types.rb', line 42993 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
43002 43003 43004 |
# File 'lib/ovirtsdk4/types.rb', line 43002 def name=(value) @name = value end |
#options ⇒ Array<Option>
Returns the value of the options
attribute.
43011 43012 43013 |
# File 'lib/ovirtsdk4/types.rb', line 43011 def @options end |
#options=(list) ⇒ Object
Sets the value of the options
attribute.
43020 43021 43022 43023 43024 43025 43026 43027 43028 43029 43030 |
# File 'lib/ovirtsdk4/types.rb', line 43020 def (list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Option.new(value) end end end @options = list end |
#redundancy_count ⇒ Integer
Returns the value of the redundancy_count
attribute.
43037 43038 43039 |
# File 'lib/ovirtsdk4/types.rb', line 43037 def redundancy_count @redundancy_count end |
#redundancy_count=(value) ⇒ Object
Sets the value of the redundancy_count
attribute.
43046 43047 43048 |
# File 'lib/ovirtsdk4/types.rb', line 43046 def redundancy_count=(value) @redundancy_count = value end |
#replica_count ⇒ Integer
Returns the value of the replica_count
attribute.
43055 43056 43057 |
# File 'lib/ovirtsdk4/types.rb', line 43055 def replica_count @replica_count end |
#replica_count=(value) ⇒ Object
Sets the value of the replica_count
attribute.
43064 43065 43066 |
# File 'lib/ovirtsdk4/types.rb', line 43064 def replica_count=(value) @replica_count = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
43073 43074 43075 |
# File 'lib/ovirtsdk4/types.rb', line 43073 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
43082 43083 43084 43085 43086 43087 43088 43089 43090 43091 43092 |
# File 'lib/ovirtsdk4/types.rb', line 43082 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 ⇒ GlusterVolumeStatus
Returns the value of the status
attribute.
43099 43100 43101 |
# File 'lib/ovirtsdk4/types.rb', line 43099 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
43108 43109 43110 |
# File 'lib/ovirtsdk4/types.rb', line 43108 def status=(value) @status = value end |
#stripe_count ⇒ Integer
Returns the value of the stripe_count
attribute.
43117 43118 43119 |
# File 'lib/ovirtsdk4/types.rb', line 43117 def stripe_count @stripe_count end |
#stripe_count=(value) ⇒ Object
Sets the value of the stripe_count
attribute.
43126 43127 43128 |
# File 'lib/ovirtsdk4/types.rb', line 43126 def stripe_count=(value) @stripe_count = value end |
#transport_types ⇒ Array<TransportType>
Returns the value of the transport_types
attribute.
43135 43136 43137 |
# File 'lib/ovirtsdk4/types.rb', line 43135 def transport_types @transport_types end |
#transport_types=(list) ⇒ Object
Sets the value of the transport_types
attribute.
43144 43145 43146 |
# File 'lib/ovirtsdk4/types.rb', line 43144 def transport_types=(list) @transport_types = list end |
#volume_type ⇒ GlusterVolumeType
Returns the value of the volume_type
attribute.
43153 43154 43155 |
# File 'lib/ovirtsdk4/types.rb', line 43153 def volume_type @volume_type end |
#volume_type=(value) ⇒ Object
Sets the value of the volume_type
attribute.
43162 43163 43164 |
# File 'lib/ovirtsdk4/types.rb', line 43162 def volume_type=(value) @volume_type = value end |