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.



15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
# File 'lib/ovirtsdk4/types.rb', line 15156

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.



15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
# File 'lib/ovirtsdk4/types.rb', line 15181

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)


14706
14707
14708
# File 'lib/ovirtsdk4/types.rb', line 14706

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


14715
14716
14717
# File 'lib/ovirtsdk4/types.rb', line 14715

def comment=(value)
  @comment = value
end

#cpu_limitInteger

Returns the value of the cpu_limit attribute.

Returns:

  • (Integer)


14724
14725
14726
# File 'lib/ovirtsdk4/types.rb', line 14724

def cpu_limit
  @cpu_limit
end

#cpu_limit=(value) ⇒ Object

Sets the value of the cpu_limit attribute.

Parameters:

  • value (Integer)


14733
14734
14735
# File 'lib/ovirtsdk4/types.rb', line 14733

def cpu_limit=(value)
  @cpu_limit = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



14742
14743
14744
# File 'lib/ovirtsdk4/types.rb', line 14742

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:



14755
14756
14757
14758
14759
14760
# File 'lib/ovirtsdk4/types.rb', line 14755

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)


14767
14768
14769
# File 'lib/ovirtsdk4/types.rb', line 14767

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


14776
14777
14778
# File 'lib/ovirtsdk4/types.rb', line 14776

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
# File 'lib/ovirtsdk4/types.rb', line 15206

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)


14785
14786
14787
# File 'lib/ovirtsdk4/types.rb', line 14785

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


14794
14795
14796
# File 'lib/ovirtsdk4/types.rb', line 14794

def id=(value)
  @id = value
end

#inbound_averageInteger

Returns the value of the inbound_average attribute.

Returns:

  • (Integer)


14803
14804
14805
# File 'lib/ovirtsdk4/types.rb', line 14803

def inbound_average
  @inbound_average
end

#inbound_average=(value) ⇒ Object

Sets the value of the inbound_average attribute.

Parameters:

  • value (Integer)


14812
14813
14814
# File 'lib/ovirtsdk4/types.rb', line 14812

def inbound_average=(value)
  @inbound_average = value
end

#inbound_burstInteger

Returns the value of the inbound_burst attribute.

Returns:

  • (Integer)


14821
14822
14823
# File 'lib/ovirtsdk4/types.rb', line 14821

def inbound_burst
  @inbound_burst
end

#inbound_burst=(value) ⇒ Object

Sets the value of the inbound_burst attribute.

Parameters:

  • value (Integer)


14830
14831
14832
# File 'lib/ovirtsdk4/types.rb', line 14830

def inbound_burst=(value)
  @inbound_burst = value
end

#inbound_peakInteger

Returns the value of the inbound_peak attribute.

Returns:

  • (Integer)


14839
14840
14841
# File 'lib/ovirtsdk4/types.rb', line 14839

def inbound_peak
  @inbound_peak
end

#inbound_peak=(value) ⇒ Object

Sets the value of the inbound_peak attribute.

Parameters:

  • value (Integer)


14848
14849
14850
# File 'lib/ovirtsdk4/types.rb', line 14848

def inbound_peak=(value)
  @inbound_peak = value
end

#max_iopsInteger

Returns the value of the max_iops attribute.

Returns:

  • (Integer)


14857
14858
14859
# File 'lib/ovirtsdk4/types.rb', line 14857

def max_iops
  @max_iops
end

#max_iops=(value) ⇒ Object

Sets the value of the max_iops attribute.

Parameters:

  • value (Integer)


14866
14867
14868
# File 'lib/ovirtsdk4/types.rb', line 14866

def max_iops=(value)
  @max_iops = value
end

#max_read_iopsInteger

Returns the value of the max_read_iops attribute.

Returns:

  • (Integer)


14875
14876
14877
# File 'lib/ovirtsdk4/types.rb', line 14875

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)


14884
14885
14886
# File 'lib/ovirtsdk4/types.rb', line 14884

def max_read_iops=(value)
  @max_read_iops = value
end

#max_read_throughputInteger

Returns the value of the max_read_throughput attribute.

Returns:

  • (Integer)


14893
14894
14895
# File 'lib/ovirtsdk4/types.rb', line 14893

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)


14902
14903
14904
# File 'lib/ovirtsdk4/types.rb', line 14902

def max_read_throughput=(value)
  @max_read_throughput = value
end

#max_throughputInteger

Returns the value of the max_throughput attribute.

Returns:

  • (Integer)


14911
14912
14913
# File 'lib/ovirtsdk4/types.rb', line 14911

def max_throughput
  @max_throughput
end

#max_throughput=(value) ⇒ Object

Sets the value of the max_throughput attribute.

Parameters:

  • value (Integer)


14920
14921
14922
# File 'lib/ovirtsdk4/types.rb', line 14920

def max_throughput=(value)
  @max_throughput = value
end

#max_write_iopsInteger

Returns the value of the max_write_iops attribute.

Returns:

  • (Integer)


14929
14930
14931
# File 'lib/ovirtsdk4/types.rb', line 14929

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)


14938
14939
14940
# File 'lib/ovirtsdk4/types.rb', line 14938

def max_write_iops=(value)
  @max_write_iops = value
end

#max_write_throughputInteger

Returns the value of the max_write_throughput attribute.

Returns:

  • (Integer)


14947
14948
14949
# File 'lib/ovirtsdk4/types.rb', line 14947

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)


14956
14957
14958
# File 'lib/ovirtsdk4/types.rb', line 14956

def max_write_throughput=(value)
  @max_write_throughput = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


14965
14966
14967
# File 'lib/ovirtsdk4/types.rb', line 14965

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


14974
14975
14976
# File 'lib/ovirtsdk4/types.rb', line 14974

def name=(value)
  @name = value
end

#outbound_averageInteger

Returns the value of the outbound_average attribute.

Returns:

  • (Integer)


14983
14984
14985
# File 'lib/ovirtsdk4/types.rb', line 14983

def outbound_average
  @outbound_average
end

#outbound_average=(value) ⇒ Object

Sets the value of the outbound_average attribute.

Parameters:

  • value (Integer)


14992
14993
14994
# File 'lib/ovirtsdk4/types.rb', line 14992

def outbound_average=(value)
  @outbound_average = value
end

#outbound_average_linkshareInteger

Returns the value of the outbound_average_linkshare attribute.

Returns:

  • (Integer)


15001
15002
15003
# File 'lib/ovirtsdk4/types.rb', line 15001

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)


15010
15011
15012
# File 'lib/ovirtsdk4/types.rb', line 15010

def outbound_average_linkshare=(value)
  @outbound_average_linkshare = value
end

#outbound_average_realtimeInteger

Returns the value of the outbound_average_realtime attribute.

Returns:

  • (Integer)


15019
15020
15021
# File 'lib/ovirtsdk4/types.rb', line 15019

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)


15028
15029
15030
# File 'lib/ovirtsdk4/types.rb', line 15028

def outbound_average_realtime=(value)
  @outbound_average_realtime = value
end

#outbound_average_upperlimitInteger

Returns the value of the outbound_average_upperlimit attribute.

Returns:

  • (Integer)


15037
15038
15039
# File 'lib/ovirtsdk4/types.rb', line 15037

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)


15046
15047
15048
# File 'lib/ovirtsdk4/types.rb', line 15046

def outbound_average_upperlimit=(value)
  @outbound_average_upperlimit = value
end

#outbound_burstInteger

Returns the value of the outbound_burst attribute.

Returns:

  • (Integer)


15055
15056
15057
# File 'lib/ovirtsdk4/types.rb', line 15055

def outbound_burst
  @outbound_burst
end

#outbound_burst=(value) ⇒ Object

Sets the value of the outbound_burst attribute.

Parameters:

  • value (Integer)


15064
15065
15066
# File 'lib/ovirtsdk4/types.rb', line 15064

def outbound_burst=(value)
  @outbound_burst = value
end

#outbound_peakInteger

Returns the value of the outbound_peak attribute.

Returns:

  • (Integer)


15073
15074
15075
# File 'lib/ovirtsdk4/types.rb', line 15073

def outbound_peak
  @outbound_peak
end

#outbound_peak=(value) ⇒ Object

Sets the value of the outbound_peak attribute.

Parameters:

  • value (Integer)


15082
15083
15084
# File 'lib/ovirtsdk4/types.rb', line 15082

def outbound_peak=(value)
  @outbound_peak = value
end

#typeQosType

Returns the value of the type attribute.

Returns:



15091
15092
15093
# File 'lib/ovirtsdk4/types.rb', line 15091

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



15100
15101
15102
# File 'lib/ovirtsdk4/types.rb', line 15100

def type=(value)
  @type = value
end