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
trueifselfandotherhave the same attributes and values. -
#cluster_hard_limit_pct ⇒ Integer
Returns the value of the
cluster_hard_limit_pctattribute. -
#cluster_hard_limit_pct=(value) ⇒ Object
Sets the value of the
cluster_hard_limit_pctattribute. -
#cluster_soft_limit_pct ⇒ Integer
Returns the value of the
cluster_soft_limit_pctattribute. -
#cluster_soft_limit_pct=(value) ⇒ Object
Sets the value of the
cluster_soft_limit_pctattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_centerattribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_centerattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#disks ⇒ Array<Disk>
Returns the value of the
disksattribute. -
#disks=(list) ⇒ Object
Sets the value of the
disksattribute. -
#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 = {}) ⇒ Quota
constructor
Creates a new instance of the Quota class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissionsattribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissionsattribute. -
#quota_cluster_limits ⇒ Array<QuotaClusterLimit>
Returns the value of the
quota_cluster_limitsattribute. -
#quota_cluster_limits=(list) ⇒ Object
Sets the value of the
quota_cluster_limitsattribute. -
#quota_storage_limits ⇒ Array<QuotaStorageLimit>
Returns the value of the
quota_storage_limitsattribute. -
#quota_storage_limits=(list) ⇒ Object
Sets the value of the
quota_storage_limitsattribute. -
#storage_hard_limit_pct ⇒ Integer
Returns the value of the
storage_hard_limit_pctattribute. -
#storage_hard_limit_pct=(value) ⇒ Object
Sets the value of the
storage_hard_limit_pctattribute. -
#storage_soft_limit_pct ⇒ Integer
Returns the value of the
storage_soft_limit_pctattribute. -
#storage_soft_limit_pct=(value) ⇒ Object
Sets the value of the
storage_soft_limit_pctattribute. -
#users ⇒ Array<User>
Returns the value of the
usersattribute. -
#users=(list) ⇒ Object
Sets the value of the
usersattribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vmsattribute. -
#vms=(list) ⇒ Object
Sets the value of the
vmsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Quota
Creates a new instance of the OvirtSDK4::Quota class.
16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 |
# File 'lib/ovirtsdk4/types.rb', line 16743 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.
16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 |
# File 'lib/ovirtsdk4/types.rb', line 16761 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 && == 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.
16385 16386 16387 |
# File 'lib/ovirtsdk4/types.rb', line 16385 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.
16394 16395 16396 |
# File 'lib/ovirtsdk4/types.rb', line 16394 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.
16403 16404 16405 |
# File 'lib/ovirtsdk4/types.rb', line 16403 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.
16412 16413 16414 |
# File 'lib/ovirtsdk4/types.rb', line 16412 def cluster_soft_limit_pct=(value) @cluster_soft_limit_pct = value end |
#comment ⇒ String
Returns the value of the comment attribute.
16421 16422 16423 |
# File 'lib/ovirtsdk4/types.rb', line 16421 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
16430 16431 16432 |
# File 'lib/ovirtsdk4/types.rb', line 16430 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center attribute.
16439 16440 16441 |
# File 'lib/ovirtsdk4/types.rb', line 16439 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.
16452 16453 16454 16455 16456 16457 |
# File 'lib/ovirtsdk4/types.rb', line 16452 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.
16464 16465 16466 |
# File 'lib/ovirtsdk4/types.rb', line 16464 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
16473 16474 16475 |
# File 'lib/ovirtsdk4/types.rb', line 16473 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks attribute.
16482 16483 16484 |
# File 'lib/ovirtsdk4/types.rb', line 16482 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks attribute.
16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 |
# File 'lib/ovirtsdk4/types.rb', line 16491 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.
16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 |
# File 'lib/ovirtsdk4/types.rb', line 16779 def hash super + @cluster_hard_limit_pct.hash + @cluster_soft_limit_pct.hash + @data_center.hash + @disks.hash + .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.
16508 16509 16510 |
# File 'lib/ovirtsdk4/types.rb', line 16508 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
16517 16518 16519 |
# File 'lib/ovirtsdk4/types.rb', line 16517 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
16526 16527 16528 |
# File 'lib/ovirtsdk4/types.rb', line 16526 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
16535 16536 16537 |
# File 'lib/ovirtsdk4/types.rb', line 16535 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions attribute.
16544 16545 16546 |
# File 'lib/ovirtsdk4/types.rb', line 16544 def end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 |
# File 'lib/ovirtsdk4/types.rb', line 16553 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 = list end |
#quota_cluster_limits ⇒ Array<QuotaClusterLimit>
Returns the value of the quota_cluster_limits attribute.
16570 16571 16572 |
# File 'lib/ovirtsdk4/types.rb', line 16570 def quota_cluster_limits @quota_cluster_limits end |
#quota_cluster_limits=(list) ⇒ Object
Sets the value of the quota_cluster_limits attribute.
16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 |
# File 'lib/ovirtsdk4/types.rb', line 16579 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.
16596 16597 16598 |
# File 'lib/ovirtsdk4/types.rb', line 16596 def quota_storage_limits @quota_storage_limits end |
#quota_storage_limits=(list) ⇒ Object
Sets the value of the quota_storage_limits attribute.
16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 |
# File 'lib/ovirtsdk4/types.rb', line 16605 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.
16622 16623 16624 |
# File 'lib/ovirtsdk4/types.rb', line 16622 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.
16631 16632 16633 |
# File 'lib/ovirtsdk4/types.rb', line 16631 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.
16640 16641 16642 |
# File 'lib/ovirtsdk4/types.rb', line 16640 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.
16649 16650 16651 |
# File 'lib/ovirtsdk4/types.rb', line 16649 def storage_soft_limit_pct=(value) @storage_soft_limit_pct = value end |
#users ⇒ Array<User>
Returns the value of the users attribute.
16658 16659 16660 |
# File 'lib/ovirtsdk4/types.rb', line 16658 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users attribute.
16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 |
# File 'lib/ovirtsdk4/types.rb', line 16667 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.
16684 16685 16686 |
# File 'lib/ovirtsdk4/types.rb', line 16684 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms attribute.
16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 |
# File 'lib/ovirtsdk4/types.rb', line 16693 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 |