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.
40108 40109 40110 40111 40112 40113 40114 40115 40116 40117 40118 40119 40120 40121 |
# File 'lib/ovirtsdk4/types.rb', line 40108 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.
40126 40127 40128 40129 40130 40131 40132 40133 40134 40135 40136 40137 40138 40139 |
# File 'lib/ovirtsdk4/types.rb', line 40126 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.
39774 39775 39776 |
# File 'lib/ovirtsdk4/types.rb', line 39774 def bricks @bricks end |
#bricks=(list) ⇒ Object
Sets the value of the bricks attribute.
39783 39784 39785 39786 39787 39788 39789 39790 39791 39792 39793 |
# File 'lib/ovirtsdk4/types.rb', line 39783 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.
39800 39801 39802 |
# File 'lib/ovirtsdk4/types.rb', line 39800 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.
39813 39814 39815 39816 39817 39818 |
# File 'lib/ovirtsdk4/types.rb', line 39813 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.
39825 39826 39827 |
# File 'lib/ovirtsdk4/types.rb', line 39825 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
39834 39835 39836 |
# File 'lib/ovirtsdk4/types.rb', line 39834 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
39843 39844 39845 |
# File 'lib/ovirtsdk4/types.rb', line 39843 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
39852 39853 39854 |
# File 'lib/ovirtsdk4/types.rb', line 39852 def description=(value) @description = value end |
#disperse_count ⇒ Integer
Returns the value of the disperse_count attribute.
39861 39862 39863 |
# File 'lib/ovirtsdk4/types.rb', line 39861 def disperse_count @disperse_count end |
#disperse_count=(value) ⇒ Object
Sets the value of the disperse_count attribute.
39870 39871 39872 |
# File 'lib/ovirtsdk4/types.rb', line 39870 def disperse_count=(value) @disperse_count = value end |
#hash ⇒ Object
Generates a hash value for this object.
40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 |
# File 'lib/ovirtsdk4/types.rb', line 40144 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.
39879 39880 39881 |
# File 'lib/ovirtsdk4/types.rb', line 39879 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
39888 39889 39890 |
# File 'lib/ovirtsdk4/types.rb', line 39888 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
39897 39898 39899 |
# File 'lib/ovirtsdk4/types.rb', line 39897 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
39906 39907 39908 |
# File 'lib/ovirtsdk4/types.rb', line 39906 def name=(value) @name = value end |
#options ⇒ Array<Option>
Returns the value of the options attribute.
39915 39916 39917 |
# File 'lib/ovirtsdk4/types.rb', line 39915 def end |
#options=(list) ⇒ Object
Sets the value of the options attribute.
39924 39925 39926 39927 39928 39929 39930 39931 39932 39933 39934 |
# File 'lib/ovirtsdk4/types.rb', line 39924 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.
39941 39942 39943 |
# File 'lib/ovirtsdk4/types.rb', line 39941 def redundancy_count @redundancy_count end |
#redundancy_count=(value) ⇒ Object
Sets the value of the redundancy_count attribute.
39950 39951 39952 |
# File 'lib/ovirtsdk4/types.rb', line 39950 def redundancy_count=(value) @redundancy_count = value end |
#replica_count ⇒ Integer
Returns the value of the replica_count attribute.
39959 39960 39961 |
# File 'lib/ovirtsdk4/types.rb', line 39959 def replica_count @replica_count end |
#replica_count=(value) ⇒ Object
Sets the value of the replica_count attribute.
39968 39969 39970 |
# File 'lib/ovirtsdk4/types.rb', line 39968 def replica_count=(value) @replica_count = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics attribute.
39977 39978 39979 |
# File 'lib/ovirtsdk4/types.rb', line 39977 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
39986 39987 39988 39989 39990 39991 39992 39993 39994 39995 39996 |
# File 'lib/ovirtsdk4/types.rb', line 39986 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.
40003 40004 40005 |
# File 'lib/ovirtsdk4/types.rb', line 40003 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
40012 40013 40014 |
# File 'lib/ovirtsdk4/types.rb', line 40012 def status=(value) @status = value end |
#stripe_count ⇒ Integer
Returns the value of the stripe_count attribute.
40021 40022 40023 |
# File 'lib/ovirtsdk4/types.rb', line 40021 def stripe_count @stripe_count end |
#stripe_count=(value) ⇒ Object
Sets the value of the stripe_count attribute.
40030 40031 40032 |
# File 'lib/ovirtsdk4/types.rb', line 40030 def stripe_count=(value) @stripe_count = value end |
#transport_types ⇒ Array<TransportType>
Returns the value of the transport_types attribute.
40039 40040 40041 |
# File 'lib/ovirtsdk4/types.rb', line 40039 def transport_types @transport_types end |
#transport_types=(list) ⇒ Object
Sets the value of the transport_types attribute.
40048 40049 40050 |
# File 'lib/ovirtsdk4/types.rb', line 40048 def transport_types=(list) @transport_types = list end |
#volume_type ⇒ GlusterVolumeType
Returns the value of the volume_type attribute.
40057 40058 40059 |
# File 'lib/ovirtsdk4/types.rb', line 40057 def volume_type @volume_type end |
#volume_type=(value) ⇒ Object
Sets the value of the volume_type attribute.
40066 40067 40068 |
# File 'lib/ovirtsdk4/types.rb', line 40066 def volume_type=(value) @volume_type = value end |