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.
40753 40754 40755 40756 40757 40758 40759 40760 40761 40762 40763 40764 40765 40766 |
# File 'lib/ovirtsdk4/types.rb', line 40753 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.
40771 40772 40773 40774 40775 40776 40777 40778 40779 40780 40781 40782 40783 40784 |
# File 'lib/ovirtsdk4/types.rb', line 40771 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.
40419 40420 40421 |
# File 'lib/ovirtsdk4/types.rb', line 40419 def bricks @bricks end |
#bricks=(list) ⇒ Object
Sets the value of the bricks
attribute.
40428 40429 40430 40431 40432 40433 40434 40435 40436 40437 40438 |
# File 'lib/ovirtsdk4/types.rb', line 40428 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.
40445 40446 40447 |
# File 'lib/ovirtsdk4/types.rb', line 40445 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.
40458 40459 40460 40461 40462 40463 |
# File 'lib/ovirtsdk4/types.rb', line 40458 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.
40470 40471 40472 |
# File 'lib/ovirtsdk4/types.rb', line 40470 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
40479 40480 40481 |
# File 'lib/ovirtsdk4/types.rb', line 40479 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
40488 40489 40490 |
# File 'lib/ovirtsdk4/types.rb', line 40488 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
40497 40498 40499 |
# File 'lib/ovirtsdk4/types.rb', line 40497 def description=(value) @description = value end |
#disperse_count ⇒ Integer
Returns the value of the disperse_count
attribute.
40506 40507 40508 |
# File 'lib/ovirtsdk4/types.rb', line 40506 def disperse_count @disperse_count end |
#disperse_count=(value) ⇒ Object
Sets the value of the disperse_count
attribute.
40515 40516 40517 |
# File 'lib/ovirtsdk4/types.rb', line 40515 def disperse_count=(value) @disperse_count = value end |
#hash ⇒ Object
Generates a hash value for this object.
40789 40790 40791 40792 40793 40794 40795 40796 40797 40798 40799 40800 40801 40802 |
# File 'lib/ovirtsdk4/types.rb', line 40789 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.
40524 40525 40526 |
# File 'lib/ovirtsdk4/types.rb', line 40524 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
40533 40534 40535 |
# File 'lib/ovirtsdk4/types.rb', line 40533 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
40542 40543 40544 |
# File 'lib/ovirtsdk4/types.rb', line 40542 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
40551 40552 40553 |
# File 'lib/ovirtsdk4/types.rb', line 40551 def name=(value) @name = value end |
#options ⇒ Array<Option>
Returns the value of the options
attribute.
40560 40561 40562 |
# File 'lib/ovirtsdk4/types.rb', line 40560 def @options end |
#options=(list) ⇒ Object
Sets the value of the options
attribute.
40569 40570 40571 40572 40573 40574 40575 40576 40577 40578 40579 |
# File 'lib/ovirtsdk4/types.rb', line 40569 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.
40586 40587 40588 |
# File 'lib/ovirtsdk4/types.rb', line 40586 def redundancy_count @redundancy_count end |
#redundancy_count=(value) ⇒ Object
Sets the value of the redundancy_count
attribute.
40595 40596 40597 |
# File 'lib/ovirtsdk4/types.rb', line 40595 def redundancy_count=(value) @redundancy_count = value end |
#replica_count ⇒ Integer
Returns the value of the replica_count
attribute.
40604 40605 40606 |
# File 'lib/ovirtsdk4/types.rb', line 40604 def replica_count @replica_count end |
#replica_count=(value) ⇒ Object
Sets the value of the replica_count
attribute.
40613 40614 40615 |
# File 'lib/ovirtsdk4/types.rb', line 40613 def replica_count=(value) @replica_count = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
40622 40623 40624 |
# File 'lib/ovirtsdk4/types.rb', line 40622 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
40631 40632 40633 40634 40635 40636 40637 40638 40639 40640 40641 |
# File 'lib/ovirtsdk4/types.rb', line 40631 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.
40648 40649 40650 |
# File 'lib/ovirtsdk4/types.rb', line 40648 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
40657 40658 40659 |
# File 'lib/ovirtsdk4/types.rb', line 40657 def status=(value) @status = value end |
#stripe_count ⇒ Integer
Returns the value of the stripe_count
attribute.
40666 40667 40668 |
# File 'lib/ovirtsdk4/types.rb', line 40666 def stripe_count @stripe_count end |
#stripe_count=(value) ⇒ Object
Sets the value of the stripe_count
attribute.
40675 40676 40677 |
# File 'lib/ovirtsdk4/types.rb', line 40675 def stripe_count=(value) @stripe_count = value end |
#transport_types ⇒ Array<TransportType>
Returns the value of the transport_types
attribute.
40684 40685 40686 |
# File 'lib/ovirtsdk4/types.rb', line 40684 def transport_types @transport_types end |
#transport_types=(list) ⇒ Object
Sets the value of the transport_types
attribute.
40693 40694 40695 |
# File 'lib/ovirtsdk4/types.rb', line 40693 def transport_types=(list) @transport_types = list end |
#volume_type ⇒ GlusterVolumeType
Returns the value of the volume_type
attribute.
40702 40703 40704 |
# File 'lib/ovirtsdk4/types.rb', line 40702 def volume_type @volume_type end |
#volume_type=(value) ⇒ Object
Sets the value of the volume_type
attribute.
40711 40712 40713 |
# File 'lib/ovirtsdk4/types.rb', line 40711 def volume_type=(value) @volume_type = value end |