Class: OvirtSDK4::Quota
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Quota
- 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. -
#cluster_hard_limit_pct ⇒ Integer
Returns the value of the
cluster_hard_limit_pct
attribute. -
#cluster_hard_limit_pct=(value) ⇒ Object
Sets the value of the
cluster_hard_limit_pct
attribute. -
#cluster_soft_limit_pct ⇒ Integer
Returns the value of the
cluster_soft_limit_pct
attribute. -
#cluster_soft_limit_pct=(value) ⇒ Object
Sets the value of the
cluster_soft_limit_pct
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_center
attribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_center
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#disks ⇒ Array<Disk>
Returns the value of the
disks
attribute. -
#disks=(list) ⇒ Object
Sets the value of the
disks
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 = {}) ⇒ Quota
constructor
Creates a new instance of the Quota class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissions
attribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissions
attribute. -
#quota_cluster_limits ⇒ Array<QuotaClusterLimit>
Returns the value of the
quota_cluster_limits
attribute. -
#quota_cluster_limits=(list) ⇒ Object
Sets the value of the
quota_cluster_limits
attribute. -
#quota_storage_limits ⇒ Array<QuotaStorageLimit>
Returns the value of the
quota_storage_limits
attribute. -
#quota_storage_limits=(list) ⇒ Object
Sets the value of the
quota_storage_limits
attribute. -
#storage_hard_limit_pct ⇒ Integer
Returns the value of the
storage_hard_limit_pct
attribute. -
#storage_hard_limit_pct=(value) ⇒ Object
Sets the value of the
storage_hard_limit_pct
attribute. -
#storage_soft_limit_pct ⇒ Integer
Returns the value of the
storage_soft_limit_pct
attribute. -
#storage_soft_limit_pct=(value) ⇒ Object
Sets the value of the
storage_soft_limit_pct
attribute. -
#users ⇒ Array<User>
Returns the value of the
users
attribute. -
#users=(list) ⇒ Object
Sets the value of the
users
attribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vms
attribute. -
#vms=(list) ⇒ Object
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Quota
Creates a new instance of the OvirtSDK4::Quota class.
15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 |
# File 'lib/ovirtsdk4/types.rb', line 15641 def initialize(opts = {}) super(opts) self.cluster_hard_limit_pct = opts[:cluster_hard_limit_pct] self.cluster_soft_limit_pct = opts[:cluster_soft_limit_pct] self.data_center = opts[:data_center] self.disks = opts[:disks] self. = opts[:permissions] self.quota_cluster_limits = opts[:quota_cluster_limits] self.quota_storage_limits = opts[:quota_storage_limits] self.storage_hard_limit_pct = opts[:storage_hard_limit_pct] self.storage_soft_limit_pct = opts[:storage_soft_limit_pct] self.users = opts[:users] self.vms = opts[:vms] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 |
# File 'lib/ovirtsdk4/types.rb', line 15659 def ==(other) super && @cluster_hard_limit_pct == other.cluster_hard_limit_pct && @cluster_soft_limit_pct == other.cluster_soft_limit_pct && @data_center == other.data_center && @disks == other.disks && @permissions == other. && @quota_cluster_limits == other.quota_cluster_limits && @quota_storage_limits == other.quota_storage_limits && @storage_hard_limit_pct == other.storage_hard_limit_pct && @storage_soft_limit_pct == other.storage_soft_limit_pct && @users == other.users && @vms == other.vms end |
#cluster_hard_limit_pct ⇒ Integer
Returns the value of the cluster_hard_limit_pct
attribute.
15283 15284 15285 |
# File 'lib/ovirtsdk4/types.rb', line 15283 def cluster_hard_limit_pct @cluster_hard_limit_pct end |
#cluster_hard_limit_pct=(value) ⇒ Object
Sets the value of the cluster_hard_limit_pct
attribute.
15292 15293 15294 |
# File 'lib/ovirtsdk4/types.rb', line 15292 def cluster_hard_limit_pct=(value) @cluster_hard_limit_pct = value end |
#cluster_soft_limit_pct ⇒ Integer
Returns the value of the cluster_soft_limit_pct
attribute.
15301 15302 15303 |
# File 'lib/ovirtsdk4/types.rb', line 15301 def cluster_soft_limit_pct @cluster_soft_limit_pct end |
#cluster_soft_limit_pct=(value) ⇒ Object
Sets the value of the cluster_soft_limit_pct
attribute.
15310 15311 15312 |
# File 'lib/ovirtsdk4/types.rb', line 15310 def cluster_soft_limit_pct=(value) @cluster_soft_limit_pct = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
15319 15320 15321 |
# File 'lib/ovirtsdk4/types.rb', line 15319 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
15328 15329 15330 |
# File 'lib/ovirtsdk4/types.rb', line 15328 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
15337 15338 15339 |
# File 'lib/ovirtsdk4/types.rb', line 15337 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.
15350 15351 15352 15353 15354 15355 |
# File 'lib/ovirtsdk4/types.rb', line 15350 def data_center=(value) if value.is_a?(Hash) value = DataCenter.new(value) end @data_center = value end |
#description ⇒ String
Returns the value of the description
attribute.
15362 15363 15364 |
# File 'lib/ovirtsdk4/types.rb', line 15362 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
15371 15372 15373 |
# File 'lib/ovirtsdk4/types.rb', line 15371 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
15380 15381 15382 |
# File 'lib/ovirtsdk4/types.rb', line 15380 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 |
# File 'lib/ovirtsdk4/types.rb', line 15389 def disks=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Disk.new(value) end end end @disks = list end |
#hash ⇒ Object
Generates a hash value for this object.
15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 |
# File 'lib/ovirtsdk4/types.rb', line 15677 def hash super + @cluster_hard_limit_pct.hash + @cluster_soft_limit_pct.hash + @data_center.hash + @disks.hash + @permissions.hash + @quota_cluster_limits.hash + @quota_storage_limits.hash + @storage_hard_limit_pct.hash + @storage_soft_limit_pct.hash + @users.hash + @vms.hash end |
#id ⇒ String
Returns the value of the id
attribute.
15406 15407 15408 |
# File 'lib/ovirtsdk4/types.rb', line 15406 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
15415 15416 15417 |
# File 'lib/ovirtsdk4/types.rb', line 15415 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
15424 15425 15426 |
# File 'lib/ovirtsdk4/types.rb', line 15424 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
15433 15434 15435 |
# File 'lib/ovirtsdk4/types.rb', line 15433 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
15442 15443 15444 |
# File 'lib/ovirtsdk4/types.rb', line 15442 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 |
# File 'lib/ovirtsdk4/types.rb', line 15451 def (list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Permission.new(value) end end end @permissions = list end |
#quota_cluster_limits ⇒ Array<QuotaClusterLimit>
Returns the value of the quota_cluster_limits
attribute.
15468 15469 15470 |
# File 'lib/ovirtsdk4/types.rb', line 15468 def quota_cluster_limits @quota_cluster_limits end |
#quota_cluster_limits=(list) ⇒ Object
Sets the value of the quota_cluster_limits
attribute.
15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 |
# File 'lib/ovirtsdk4/types.rb', line 15477 def quota_cluster_limits=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = QuotaClusterLimit.new(value) end end end @quota_cluster_limits = list end |
#quota_storage_limits ⇒ Array<QuotaStorageLimit>
Returns the value of the quota_storage_limits
attribute.
15494 15495 15496 |
# File 'lib/ovirtsdk4/types.rb', line 15494 def quota_storage_limits @quota_storage_limits end |
#quota_storage_limits=(list) ⇒ Object
Sets the value of the quota_storage_limits
attribute.
15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 |
# File 'lib/ovirtsdk4/types.rb', line 15503 def quota_storage_limits=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = QuotaStorageLimit.new(value) end end end @quota_storage_limits = list end |
#storage_hard_limit_pct ⇒ Integer
Returns the value of the storage_hard_limit_pct
attribute.
15520 15521 15522 |
# File 'lib/ovirtsdk4/types.rb', line 15520 def storage_hard_limit_pct @storage_hard_limit_pct end |
#storage_hard_limit_pct=(value) ⇒ Object
Sets the value of the storage_hard_limit_pct
attribute.
15529 15530 15531 |
# File 'lib/ovirtsdk4/types.rb', line 15529 def storage_hard_limit_pct=(value) @storage_hard_limit_pct = value end |
#storage_soft_limit_pct ⇒ Integer
Returns the value of the storage_soft_limit_pct
attribute.
15538 15539 15540 |
# File 'lib/ovirtsdk4/types.rb', line 15538 def storage_soft_limit_pct @storage_soft_limit_pct end |
#storage_soft_limit_pct=(value) ⇒ Object
Sets the value of the storage_soft_limit_pct
attribute.
15547 15548 15549 |
# File 'lib/ovirtsdk4/types.rb', line 15547 def storage_soft_limit_pct=(value) @storage_soft_limit_pct = value end |
#users ⇒ Array<User>
Returns the value of the users
attribute.
15556 15557 15558 |
# File 'lib/ovirtsdk4/types.rb', line 15556 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users
attribute.
15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 |
# File 'lib/ovirtsdk4/types.rb', line 15565 def users=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = User.new(value) end end end @users = list end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
15582 15583 15584 |
# File 'lib/ovirtsdk4/types.rb', line 15582 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 |
# File 'lib/ovirtsdk4/types.rb', line 15591 def vms=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Vm.new(value) end end end @vms = list end |