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
trueifselfandotherhave the same attributes and values. -
#bricks ⇒ Array<GlusterBrick>
Returns the value of the
bricksattribute. -
#bricks=(list) ⇒ Object
Sets the value of the
bricksattribute. -
#cluster ⇒ Cluster
Returns the value of the
clusterattribute. -
#cluster=(value) ⇒ Object
Sets the value of the
clusterattribute. -
#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. -
#disperse_count ⇒ Integer
Returns the value of the
disperse_countattribute. -
#disperse_count=(value) ⇒ Object
Sets the value of the
disperse_countattribute. -
#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 = {}) ⇒ GlusterVolume
constructor
Creates a new instance of the GlusterVolume class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#options ⇒ Array<Option>
Returns the value of the
optionsattribute. -
#options=(list) ⇒ Object
Sets the value of the
optionsattribute. -
#redundancy_count ⇒ Integer
Returns the value of the
redundancy_countattribute. -
#redundancy_count=(value) ⇒ Object
Sets the value of the
redundancy_countattribute. -
#replica_count ⇒ Integer
Returns the value of the
replica_countattribute. -
#replica_count=(value) ⇒ Object
Sets the value of the
replica_countattribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statisticsattribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statisticsattribute. -
#status ⇒ GlusterVolumeStatus
Returns the value of the
statusattribute. -
#status=(value) ⇒ Object
Sets the value of the
statusattribute. -
#stripe_count ⇒ Integer
Returns the value of the
stripe_countattribute. -
#stripe_count=(value) ⇒ Object
Sets the value of the
stripe_countattribute. -
#transport_types ⇒ Array<TransportType>
Returns the value of the
transport_typesattribute. -
#transport_types=(list) ⇒ Object
Sets the value of the
transport_typesattribute. -
#volume_type ⇒ GlusterVolumeType
Returns the value of the
volume_typeattribute. -
#volume_type=(value) ⇒ Object
Sets the value of the
volume_typeattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ GlusterVolume
Creates a new instance of the OvirtSDK4::GlusterVolume class.
43497 43498 43499 43500 43501 43502 43503 43504 43505 43506 43507 43508 43509 43510 |
# File 'lib/ovirtsdk4/types.rb', line 43497 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.
43515 43516 43517 43518 43519 43520 43521 43522 43523 43524 43525 43526 43527 43528 |
# File 'lib/ovirtsdk4/types.rb', line 43515 def ==(other) super && @bricks == other.bricks && @cluster == other.cluster && @disperse_count == other.disperse_count && == 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.
43163 43164 43165 |
# File 'lib/ovirtsdk4/types.rb', line 43163 def bricks @bricks end |
#bricks=(list) ⇒ Object
Sets the value of the bricks attribute.
43172 43173 43174 43175 43176 43177 43178 43179 43180 43181 43182 |
# File 'lib/ovirtsdk4/types.rb', line 43172 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.
43189 43190 43191 |
# File 'lib/ovirtsdk4/types.rb', line 43189 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.
43202 43203 43204 43205 43206 43207 |
# File 'lib/ovirtsdk4/types.rb', line 43202 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.
43214 43215 43216 |
# File 'lib/ovirtsdk4/types.rb', line 43214 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
43223 43224 43225 |
# File 'lib/ovirtsdk4/types.rb', line 43223 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
43232 43233 43234 |
# File 'lib/ovirtsdk4/types.rb', line 43232 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
43241 43242 43243 |
# File 'lib/ovirtsdk4/types.rb', line 43241 def description=(value) @description = value end |
#disperse_count ⇒ Integer
Returns the value of the disperse_count attribute.
43250 43251 43252 |
# File 'lib/ovirtsdk4/types.rb', line 43250 def disperse_count @disperse_count end |
#disperse_count=(value) ⇒ Object
Sets the value of the disperse_count attribute.
43259 43260 43261 |
# File 'lib/ovirtsdk4/types.rb', line 43259 def disperse_count=(value) @disperse_count = value end |
#hash ⇒ Object
Generates a hash value for this object.
43533 43534 43535 43536 43537 43538 43539 43540 43541 43542 43543 43544 43545 43546 |
# File 'lib/ovirtsdk4/types.rb', line 43533 def hash super + @bricks.hash + @cluster.hash + @disperse_count.hash + .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.
43268 43269 43270 |
# File 'lib/ovirtsdk4/types.rb', line 43268 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
43277 43278 43279 |
# File 'lib/ovirtsdk4/types.rb', line 43277 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
43286 43287 43288 |
# File 'lib/ovirtsdk4/types.rb', line 43286 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
43295 43296 43297 |
# File 'lib/ovirtsdk4/types.rb', line 43295 def name=(value) @name = value end |
#options ⇒ Array<Option>
Returns the value of the options attribute.
43304 43305 43306 |
# File 'lib/ovirtsdk4/types.rb', line 43304 def end |
#options=(list) ⇒ Object
Sets the value of the options attribute.
43313 43314 43315 43316 43317 43318 43319 43320 43321 43322 43323 |
# File 'lib/ovirtsdk4/types.rb', line 43313 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 = list end |
#redundancy_count ⇒ Integer
Returns the value of the redundancy_count attribute.
43330 43331 43332 |
# File 'lib/ovirtsdk4/types.rb', line 43330 def redundancy_count @redundancy_count end |
#redundancy_count=(value) ⇒ Object
Sets the value of the redundancy_count attribute.
43339 43340 43341 |
# File 'lib/ovirtsdk4/types.rb', line 43339 def redundancy_count=(value) @redundancy_count = value end |
#replica_count ⇒ Integer
Returns the value of the replica_count attribute.
43348 43349 43350 |
# File 'lib/ovirtsdk4/types.rb', line 43348 def replica_count @replica_count end |
#replica_count=(value) ⇒ Object
Sets the value of the replica_count attribute.
43357 43358 43359 |
# File 'lib/ovirtsdk4/types.rb', line 43357 def replica_count=(value) @replica_count = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics attribute.
43366 43367 43368 |
# File 'lib/ovirtsdk4/types.rb', line 43366 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
43375 43376 43377 43378 43379 43380 43381 43382 43383 43384 43385 |
# File 'lib/ovirtsdk4/types.rb', line 43375 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.
43392 43393 43394 |
# File 'lib/ovirtsdk4/types.rb', line 43392 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
43401 43402 43403 |
# File 'lib/ovirtsdk4/types.rb', line 43401 def status=(value) @status = value end |
#stripe_count ⇒ Integer
Returns the value of the stripe_count attribute.
43410 43411 43412 |
# File 'lib/ovirtsdk4/types.rb', line 43410 def stripe_count @stripe_count end |
#stripe_count=(value) ⇒ Object
Sets the value of the stripe_count attribute.
43419 43420 43421 |
# File 'lib/ovirtsdk4/types.rb', line 43419 def stripe_count=(value) @stripe_count = value end |
#transport_types ⇒ Array<TransportType>
Returns the value of the transport_types attribute.
43428 43429 43430 |
# File 'lib/ovirtsdk4/types.rb', line 43428 def transport_types @transport_types end |
#transport_types=(list) ⇒ Object
Sets the value of the transport_types attribute.
43437 43438 43439 |
# File 'lib/ovirtsdk4/types.rb', line 43437 def transport_types=(list) @transport_types = list end |
#volume_type ⇒ GlusterVolumeType
Returns the value of the volume_type attribute.
43446 43447 43448 |
# File 'lib/ovirtsdk4/types.rb', line 43446 def volume_type @volume_type end |
#volume_type=(value) ⇒ Object
Sets the value of the volume_type attribute.
43455 43456 43457 |
# File 'lib/ovirtsdk4/types.rb', line 43455 def volume_type=(value) @volume_type = value end |