Class: OvirtSDK4::Qos

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ Qos

Creates a new instance of the OvirtSDK4::Qos class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :comment (String)

    The value of attribute comment.

  • :cpu_limit (Integer)

    The value of attribute cpu_limit.

  • :data_center (DataCenter, Hash)

    The value of attribute data_center.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :inbound_average (Integer)

    The value of attribute inbound_average.

  • :inbound_burst (Integer)

    The value of attribute inbound_burst.

  • :inbound_peak (Integer)

    The value of attribute inbound_peak.

  • :max_iops (Integer)

    The value of attribute max_iops.

  • :max_read_iops (Integer)

    The value of attribute max_read_iops.

  • :max_read_throughput (Integer)

    The value of attribute max_read_throughput.

  • :max_throughput (Integer)

    The value of attribute max_throughput.

  • :max_write_iops (Integer)

    The value of attribute max_write_iops.

  • :max_write_throughput (Integer)

    The value of attribute max_write_throughput.

  • :name (String)

    The value of attribute name.

  • :outbound_average (Integer)

    The value of attribute outbound_average.

  • :outbound_average_linkshare (Integer)

    The value of attribute outbound_average_linkshare.

  • :outbound_average_realtime (Integer)

    The value of attribute outbound_average_realtime.

  • :outbound_average_upperlimit (Integer)

    The value of attribute outbound_average_upperlimit.

  • :outbound_burst (Integer)

    The value of attribute outbound_burst.

  • :outbound_peak (Integer)

    The value of attribute outbound_peak.

  • :type (QosType)

    The value of attribute type.



15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
# File 'lib/ovirtsdk4/types.rb', line 15304

def initialize(opts = {})
  super(opts)
  self.cpu_limit = opts[:cpu_limit]
  self.data_center = opts[:data_center]
  self.inbound_average = opts[:inbound_average]
  self.inbound_burst = opts[:inbound_burst]
  self.inbound_peak = opts[:inbound_peak]
  self.max_iops = opts[:max_iops]
  self.max_read_iops = opts[:max_read_iops]
  self.max_read_throughput = opts[:max_read_throughput]
  self.max_throughput = opts[:max_throughput]
  self.max_write_iops = opts[:max_write_iops]
  self.max_write_throughput = opts[:max_write_throughput]
  self.outbound_average = opts[:outbound_average]
  self.outbound_average_linkshare = opts[:outbound_average_linkshare]
  self.outbound_average_realtime = opts[:outbound_average_realtime]
  self.outbound_average_upperlimit = opts[:outbound_average_upperlimit]
  self.outbound_burst = opts[:outbound_burst]
  self.outbound_peak = opts[:outbound_peak]
  self.type = opts[:type]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
# File 'lib/ovirtsdk4/types.rb', line 15329

def ==(other)
  super &&
  @cpu_limit == other.cpu_limit &&
  @data_center == other.data_center &&
  @inbound_average == other.inbound_average &&
  @inbound_burst == other.inbound_burst &&
  @inbound_peak == other.inbound_peak &&
  @max_iops == other.max_iops &&
  @max_read_iops == other.max_read_iops &&
  @max_read_throughput == other.max_read_throughput &&
  @max_throughput == other.max_throughput &&
  @max_write_iops == other.max_write_iops &&
  @max_write_throughput == other.max_write_throughput &&
  @outbound_average == other.outbound_average &&
  @outbound_average_linkshare == other.outbound_average_linkshare &&
  @outbound_average_realtime == other.outbound_average_realtime &&
  @outbound_average_upperlimit == other.outbound_average_upperlimit &&
  @outbound_burst == other.outbound_burst &&
  @outbound_peak == other.outbound_peak &&
  @type == other.type
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


14854
14855
14856
# File 'lib/ovirtsdk4/types.rb', line 14854

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


14863
14864
14865
# File 'lib/ovirtsdk4/types.rb', line 14863

def comment=(value)
  @comment = value
end

#cpu_limitInteger

Returns the value of the cpu_limit attribute.

Returns:

  • (Integer)


14872
14873
14874
# File 'lib/ovirtsdk4/types.rb', line 14872

def cpu_limit
  @cpu_limit
end

#cpu_limit=(value) ⇒ Object

Sets the value of the cpu_limit attribute.

Parameters:

  • value (Integer)


14881
14882
14883
# File 'lib/ovirtsdk4/types.rb', line 14881

def cpu_limit=(value)
  @cpu_limit = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



14890
14891
14892
# File 'lib/ovirtsdk4/types.rb', line 14890

def data_center
  @data_center
end

#data_center=(value) ⇒ Object

Sets the value of the data_center attribute.

The value parameter can be an instance of DataCenter 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.

Parameters:



14903
14904
14905
14906
14907
14908
# File 'lib/ovirtsdk4/types.rb', line 14903

def data_center=(value)
  if value.is_a?(Hash)
    value = DataCenter.new(value)
  end
  @data_center = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


14915
14916
14917
# File 'lib/ovirtsdk4/types.rb', line 14915

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


14924
14925
14926
# File 'lib/ovirtsdk4/types.rb', line 14924

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
# File 'lib/ovirtsdk4/types.rb', line 15354

def hash
  super +
  @cpu_limit.hash +
  @data_center.hash +
  @inbound_average.hash +
  @inbound_burst.hash +
  @inbound_peak.hash +
  @max_iops.hash +
  @max_read_iops.hash +
  @max_read_throughput.hash +
  @max_throughput.hash +
  @max_write_iops.hash +
  @max_write_throughput.hash +
  @outbound_average.hash +
  @outbound_average_linkshare.hash +
  @outbound_average_realtime.hash +
  @outbound_average_upperlimit.hash +
  @outbound_burst.hash +
  @outbound_peak.hash +
  @type.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


14933
14934
14935
# File 'lib/ovirtsdk4/types.rb', line 14933

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


14942
14943
14944
# File 'lib/ovirtsdk4/types.rb', line 14942

def id=(value)
  @id = value
end

#inbound_averageInteger

Returns the value of the inbound_average attribute.

Returns:

  • (Integer)


14951
14952
14953
# File 'lib/ovirtsdk4/types.rb', line 14951

def inbound_average
  @inbound_average
end

#inbound_average=(value) ⇒ Object

Sets the value of the inbound_average attribute.

Parameters:

  • value (Integer)


14960
14961
14962
# File 'lib/ovirtsdk4/types.rb', line 14960

def inbound_average=(value)
  @inbound_average = value
end

#inbound_burstInteger

Returns the value of the inbound_burst attribute.

Returns:

  • (Integer)


14969
14970
14971
# File 'lib/ovirtsdk4/types.rb', line 14969

def inbound_burst
  @inbound_burst
end

#inbound_burst=(value) ⇒ Object

Sets the value of the inbound_burst attribute.

Parameters:

  • value (Integer)


14978
14979
14980
# File 'lib/ovirtsdk4/types.rb', line 14978

def inbound_burst=(value)
  @inbound_burst = value
end

#inbound_peakInteger

Returns the value of the inbound_peak attribute.

Returns:

  • (Integer)


14987
14988
14989
# File 'lib/ovirtsdk4/types.rb', line 14987

def inbound_peak
  @inbound_peak
end

#inbound_peak=(value) ⇒ Object

Sets the value of the inbound_peak attribute.

Parameters:

  • value (Integer)


14996
14997
14998
# File 'lib/ovirtsdk4/types.rb', line 14996

def inbound_peak=(value)
  @inbound_peak = value
end

#max_iopsInteger

Returns the value of the max_iops attribute.

Returns:

  • (Integer)


15005
15006
15007
# File 'lib/ovirtsdk4/types.rb', line 15005

def max_iops
  @max_iops
end

#max_iops=(value) ⇒ Object

Sets the value of the max_iops attribute.

Parameters:

  • value (Integer)


15014
15015
15016
# File 'lib/ovirtsdk4/types.rb', line 15014

def max_iops=(value)
  @max_iops = value
end

#max_read_iopsInteger

Returns the value of the max_read_iops attribute.

Returns:

  • (Integer)


15023
15024
15025
# File 'lib/ovirtsdk4/types.rb', line 15023

def max_read_iops
  @max_read_iops
end

#max_read_iops=(value) ⇒ Object

Sets the value of the max_read_iops attribute.

Parameters:

  • value (Integer)


15032
15033
15034
# File 'lib/ovirtsdk4/types.rb', line 15032

def max_read_iops=(value)
  @max_read_iops = value
end

#max_read_throughputInteger

Returns the value of the max_read_throughput attribute.

Returns:

  • (Integer)


15041
15042
15043
# File 'lib/ovirtsdk4/types.rb', line 15041

def max_read_throughput
  @max_read_throughput
end

#max_read_throughput=(value) ⇒ Object

Sets the value of the max_read_throughput attribute.

Parameters:

  • value (Integer)


15050
15051
15052
# File 'lib/ovirtsdk4/types.rb', line 15050

def max_read_throughput=(value)
  @max_read_throughput = value
end

#max_throughputInteger

Returns the value of the max_throughput attribute.

Returns:

  • (Integer)


15059
15060
15061
# File 'lib/ovirtsdk4/types.rb', line 15059

def max_throughput
  @max_throughput
end

#max_throughput=(value) ⇒ Object

Sets the value of the max_throughput attribute.

Parameters:

  • value (Integer)


15068
15069
15070
# File 'lib/ovirtsdk4/types.rb', line 15068

def max_throughput=(value)
  @max_throughput = value
end

#max_write_iopsInteger

Returns the value of the max_write_iops attribute.

Returns:

  • (Integer)


15077
15078
15079
# File 'lib/ovirtsdk4/types.rb', line 15077

def max_write_iops
  @max_write_iops
end

#max_write_iops=(value) ⇒ Object

Sets the value of the max_write_iops attribute.

Parameters:

  • value (Integer)


15086
15087
15088
# File 'lib/ovirtsdk4/types.rb', line 15086

def max_write_iops=(value)
  @max_write_iops = value
end

#max_write_throughputInteger

Returns the value of the max_write_throughput attribute.

Returns:

  • (Integer)


15095
15096
15097
# File 'lib/ovirtsdk4/types.rb', line 15095

def max_write_throughput
  @max_write_throughput
end

#max_write_throughput=(value) ⇒ Object

Sets the value of the max_write_throughput attribute.

Parameters:

  • value (Integer)


15104
15105
15106
# File 'lib/ovirtsdk4/types.rb', line 15104

def max_write_throughput=(value)
  @max_write_throughput = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


15113
15114
15115
# File 'lib/ovirtsdk4/types.rb', line 15113

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


15122
15123
15124
# File 'lib/ovirtsdk4/types.rb', line 15122

def name=(value)
  @name = value
end

#outbound_averageInteger

Returns the value of the outbound_average attribute.

Returns:

  • (Integer)


15131
15132
15133
# File 'lib/ovirtsdk4/types.rb', line 15131

def outbound_average
  @outbound_average
end

#outbound_average=(value) ⇒ Object

Sets the value of the outbound_average attribute.

Parameters:

  • value (Integer)


15140
15141
15142
# File 'lib/ovirtsdk4/types.rb', line 15140

def outbound_average=(value)
  @outbound_average = value
end

#outbound_average_linkshareInteger

Returns the value of the outbound_average_linkshare attribute.

Returns:

  • (Integer)


15149
15150
15151
# File 'lib/ovirtsdk4/types.rb', line 15149

def outbound_average_linkshare
  @outbound_average_linkshare
end

#outbound_average_linkshare=(value) ⇒ Object

Sets the value of the outbound_average_linkshare attribute.

Parameters:

  • value (Integer)


15158
15159
15160
# File 'lib/ovirtsdk4/types.rb', line 15158

def outbound_average_linkshare=(value)
  @outbound_average_linkshare = value
end

#outbound_average_realtimeInteger

Returns the value of the outbound_average_realtime attribute.

Returns:

  • (Integer)


15167
15168
15169
# File 'lib/ovirtsdk4/types.rb', line 15167

def outbound_average_realtime
  @outbound_average_realtime
end

#outbound_average_realtime=(value) ⇒ Object

Sets the value of the outbound_average_realtime attribute.

Parameters:

  • value (Integer)


15176
15177
15178
# File 'lib/ovirtsdk4/types.rb', line 15176

def outbound_average_realtime=(value)
  @outbound_average_realtime = value
end

#outbound_average_upperlimitInteger

Returns the value of the outbound_average_upperlimit attribute.

Returns:

  • (Integer)


15185
15186
15187
# File 'lib/ovirtsdk4/types.rb', line 15185

def outbound_average_upperlimit
  @outbound_average_upperlimit
end

#outbound_average_upperlimit=(value) ⇒ Object

Sets the value of the outbound_average_upperlimit attribute.

Parameters:

  • value (Integer)


15194
15195
15196
# File 'lib/ovirtsdk4/types.rb', line 15194

def outbound_average_upperlimit=(value)
  @outbound_average_upperlimit = value
end

#outbound_burstInteger

Returns the value of the outbound_burst attribute.

Returns:

  • (Integer)


15203
15204
15205
# File 'lib/ovirtsdk4/types.rb', line 15203

def outbound_burst
  @outbound_burst
end

#outbound_burst=(value) ⇒ Object

Sets the value of the outbound_burst attribute.

Parameters:

  • value (Integer)


15212
15213
15214
# File 'lib/ovirtsdk4/types.rb', line 15212

def outbound_burst=(value)
  @outbound_burst = value
end

#outbound_peakInteger

Returns the value of the outbound_peak attribute.

Returns:

  • (Integer)


15221
15222
15223
# File 'lib/ovirtsdk4/types.rb', line 15221

def outbound_peak
  @outbound_peak
end

#outbound_peak=(value) ⇒ Object

Sets the value of the outbound_peak attribute.

Parameters:

  • value (Integer)


15230
15231
15232
# File 'lib/ovirtsdk4/types.rb', line 15230

def outbound_peak=(value)
  @outbound_peak = value
end

#typeQosType

Returns the value of the type attribute.

Returns:



15239
15240
15241
# File 'lib/ovirtsdk4/types.rb', line 15239

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



15248
15249
15250
# File 'lib/ovirtsdk4/types.rb', line 15248

def type=(value)
  @type = value
end