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.
40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 |
# File 'lib/ovirtsdk4/types.rb', line 40177 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.
40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 |
# File 'lib/ovirtsdk4/types.rb', line 40195 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.
39843 39844 39845 |
# File 'lib/ovirtsdk4/types.rb', line 39843 def bricks @bricks end |
#bricks=(list) ⇒ Object
Sets the value of the bricks
attribute.
39852 39853 39854 39855 39856 39857 39858 39859 39860 39861 39862 |
# File 'lib/ovirtsdk4/types.rb', line 39852 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.
39869 39870 39871 |
# File 'lib/ovirtsdk4/types.rb', line 39869 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.
39882 39883 39884 39885 39886 39887 |
# File 'lib/ovirtsdk4/types.rb', line 39882 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.
39894 39895 39896 |
# File 'lib/ovirtsdk4/types.rb', line 39894 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
39903 39904 39905 |
# File 'lib/ovirtsdk4/types.rb', line 39903 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
39912 39913 39914 |
# File 'lib/ovirtsdk4/types.rb', line 39912 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
39921 39922 39923 |
# File 'lib/ovirtsdk4/types.rb', line 39921 def description=(value) @description = value end |
#disperse_count ⇒ Integer
Returns the value of the disperse_count
attribute.
39930 39931 39932 |
# File 'lib/ovirtsdk4/types.rb', line 39930 def disperse_count @disperse_count end |
#disperse_count=(value) ⇒ Object
Sets the value of the disperse_count
attribute.
39939 39940 39941 |
# File 'lib/ovirtsdk4/types.rb', line 39939 def disperse_count=(value) @disperse_count = value end |
#hash ⇒ Object
Generates a hash value for this object.
40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 |
# File 'lib/ovirtsdk4/types.rb', line 40213 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.
39948 39949 39950 |
# File 'lib/ovirtsdk4/types.rb', line 39948 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
39957 39958 39959 |
# File 'lib/ovirtsdk4/types.rb', line 39957 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
39966 39967 39968 |
# File 'lib/ovirtsdk4/types.rb', line 39966 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
39975 39976 39977 |
# File 'lib/ovirtsdk4/types.rb', line 39975 def name=(value) @name = value end |
#options ⇒ Array<Option>
Returns the value of the options
attribute.
39984 39985 39986 |
# File 'lib/ovirtsdk4/types.rb', line 39984 def @options end |
#options=(list) ⇒ Object
Sets the value of the options
attribute.
39993 39994 39995 39996 39997 39998 39999 40000 40001 40002 40003 |
# File 'lib/ovirtsdk4/types.rb', line 39993 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.
40010 40011 40012 |
# File 'lib/ovirtsdk4/types.rb', line 40010 def redundancy_count @redundancy_count end |
#redundancy_count=(value) ⇒ Object
Sets the value of the redundancy_count
attribute.
40019 40020 40021 |
# File 'lib/ovirtsdk4/types.rb', line 40019 def redundancy_count=(value) @redundancy_count = value end |
#replica_count ⇒ Integer
Returns the value of the replica_count
attribute.
40028 40029 40030 |
# File 'lib/ovirtsdk4/types.rb', line 40028 def replica_count @replica_count end |
#replica_count=(value) ⇒ Object
Sets the value of the replica_count
attribute.
40037 40038 40039 |
# File 'lib/ovirtsdk4/types.rb', line 40037 def replica_count=(value) @replica_count = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
40046 40047 40048 |
# File 'lib/ovirtsdk4/types.rb', line 40046 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
40055 40056 40057 40058 40059 40060 40061 40062 40063 40064 40065 |
# File 'lib/ovirtsdk4/types.rb', line 40055 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.
40072 40073 40074 |
# File 'lib/ovirtsdk4/types.rb', line 40072 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
40081 40082 40083 |
# File 'lib/ovirtsdk4/types.rb', line 40081 def status=(value) @status = value end |
#stripe_count ⇒ Integer
Returns the value of the stripe_count
attribute.
40090 40091 40092 |
# File 'lib/ovirtsdk4/types.rb', line 40090 def stripe_count @stripe_count end |
#stripe_count=(value) ⇒ Object
Sets the value of the stripe_count
attribute.
40099 40100 40101 |
# File 'lib/ovirtsdk4/types.rb', line 40099 def stripe_count=(value) @stripe_count = value end |
#transport_types ⇒ Array<TransportType>
Returns the value of the transport_types
attribute.
40108 40109 40110 |
# File 'lib/ovirtsdk4/types.rb', line 40108 def transport_types @transport_types end |
#transport_types=(list) ⇒ Object
Sets the value of the transport_types
attribute.
40117 40118 40119 |
# File 'lib/ovirtsdk4/types.rb', line 40117 def transport_types=(list) @transport_types = list end |
#volume_type ⇒ GlusterVolumeType
Returns the value of the volume_type
attribute.
40126 40127 40128 |
# File 'lib/ovirtsdk4/types.rb', line 40126 def volume_type @volume_type end |
#volume_type=(value) ⇒ Object
Sets the value of the volume_type
attribute.
40135 40136 40137 |
# File 'lib/ovirtsdk4/types.rb', line 40135 def volume_type=(value) @volume_type = value end |