Class: OvirtSDK4::DataCenter
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::DataCenter
- 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. -
#clusters ⇒ Array<Cluster>
Returns the value of the
clusters
attribute. -
#clusters=(list) ⇒ Object
Sets the value of the
clusters
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. -
#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 = {}) ⇒ DataCenter
constructor
Creates a new instance of the DataCenter class.
-
#iscsi_bonds ⇒ Array<IscsiBond>
Returns the value of the
iscsi_bonds
attribute. -
#iscsi_bonds=(list) ⇒ Object
Sets the value of the
iscsi_bonds
attribute. -
#local ⇒ Boolean
Returns the value of the
local
attribute. -
#local=(value) ⇒ Object
Sets the value of the
local
attribute. -
#mac_pool ⇒ MacPool
Returns the value of the
mac_pool
attribute. -
#mac_pool=(value) ⇒ Object
Sets the value of the
mac_pool
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#networks ⇒ Array<Network>
Returns the value of the
networks
attribute. -
#networks=(list) ⇒ Object
Sets the value of the
networks
attribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissions
attribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissions
attribute. -
#qoss ⇒ Array<Qos>
Returns the value of the
qoss
attribute. -
#qoss=(list) ⇒ Object
Sets the value of the
qoss
attribute. -
#quota_mode ⇒ QuotaModeType
Returns the value of the
quota_mode
attribute. -
#quota_mode=(value) ⇒ Object
Sets the value of the
quota_mode
attribute. -
#quotas ⇒ Array<Quota>
Returns the value of the
quotas
attribute. -
#quotas=(list) ⇒ Object
Sets the value of the
quotas
attribute. -
#status ⇒ DataCenterStatus
Returns the value of the
status
attribute. -
#status=(value) ⇒ Object
Sets the value of the
status
attribute. -
#storage_domains ⇒ Array<StorageDomain>
Returns the value of the
storage_domains
attribute. -
#storage_domains=(list) ⇒ Object
Sets the value of the
storage_domains
attribute. -
#storage_format ⇒ StorageFormat
Returns the value of the
storage_format
attribute. -
#storage_format=(value) ⇒ Object
Sets the value of the
storage_format
attribute. -
#supported_versions ⇒ Array<Version>
Returns the value of the
supported_versions
attribute. -
#supported_versions=(list) ⇒ Object
Sets the value of the
supported_versions
attribute. -
#version ⇒ Version
Returns the value of the
version
attribute. -
#version=(value) ⇒ Object
Sets the value of the
version
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ DataCenter
Creates a new instance of the OvirtSDK4::DataCenter class.
33738 33739 33740 33741 33742 33743 33744 33745 33746 33747 33748 33749 33750 33751 33752 33753 33754 |
# File 'lib/ovirtsdk4/types.rb', line 33738 def initialize(opts = {}) super(opts) self.clusters = opts[:clusters] self.iscsi_bonds = opts[:iscsi_bonds] self.local = opts[:local] self.mac_pool = opts[:mac_pool] self.networks = opts[:networks] self. = opts[:permissions] self.qoss = opts[:qoss] self.quota_mode = opts[:quota_mode] self.quotas = opts[:quotas] self.status = opts[:status] self.storage_domains = opts[:storage_domains] self.storage_format = opts[:storage_format] self.supported_versions = opts[:supported_versions] self.version = opts[:version] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
33759 33760 33761 33762 33763 33764 33765 33766 33767 33768 33769 33770 33771 33772 33773 33774 33775 |
# File 'lib/ovirtsdk4/types.rb', line 33759 def ==(other) super && @clusters == other.clusters && @iscsi_bonds == other.iscsi_bonds && @local == other.local && @mac_pool == other.mac_pool && @networks == other.networks && @permissions == other. && @qoss == other.qoss && @quota_mode == other.quota_mode && @quotas == other.quotas && @status == other.status && @storage_domains == other.storage_domains && @storage_format == other.storage_format && @supported_versions == other.supported_versions && @version == other.version end |
#clusters ⇒ Array<Cluster>
Returns the value of the clusters
attribute.
33297 33298 33299 |
# File 'lib/ovirtsdk4/types.rb', line 33297 def clusters @clusters end |
#clusters=(list) ⇒ Object
Sets the value of the clusters
attribute.
33306 33307 33308 33309 33310 33311 33312 33313 33314 33315 33316 |
# File 'lib/ovirtsdk4/types.rb', line 33306 def clusters=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Cluster.new(value) end end end @clusters = list end |
#comment ⇒ String
Returns the value of the comment
attribute.
33323 33324 33325 |
# File 'lib/ovirtsdk4/types.rb', line 33323 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
33332 33333 33334 |
# File 'lib/ovirtsdk4/types.rb', line 33332 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
33341 33342 33343 |
# File 'lib/ovirtsdk4/types.rb', line 33341 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
33350 33351 33352 |
# File 'lib/ovirtsdk4/types.rb', line 33350 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
33780 33781 33782 33783 33784 33785 33786 33787 33788 33789 33790 33791 33792 33793 33794 33795 33796 |
# File 'lib/ovirtsdk4/types.rb', line 33780 def hash super + @clusters.hash + @iscsi_bonds.hash + @local.hash + @mac_pool.hash + @networks.hash + @permissions.hash + @qoss.hash + @quota_mode.hash + @quotas.hash + @status.hash + @storage_domains.hash + @storage_format.hash + @supported_versions.hash + @version.hash end |
#id ⇒ String
Returns the value of the id
attribute.
33359 33360 33361 |
# File 'lib/ovirtsdk4/types.rb', line 33359 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
33368 33369 33370 |
# File 'lib/ovirtsdk4/types.rb', line 33368 def id=(value) @id = value end |
#iscsi_bonds ⇒ Array<IscsiBond>
Returns the value of the iscsi_bonds
attribute.
33377 33378 33379 |
# File 'lib/ovirtsdk4/types.rb', line 33377 def iscsi_bonds @iscsi_bonds end |
#iscsi_bonds=(list) ⇒ Object
Sets the value of the iscsi_bonds
attribute.
33386 33387 33388 33389 33390 33391 33392 33393 33394 33395 33396 |
# File 'lib/ovirtsdk4/types.rb', line 33386 def iscsi_bonds=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = IscsiBond.new(value) end end end @iscsi_bonds = list end |
#local ⇒ Boolean
Returns the value of the local
attribute.
33403 33404 33405 |
# File 'lib/ovirtsdk4/types.rb', line 33403 def local @local end |
#local=(value) ⇒ Object
Sets the value of the local
attribute.
33412 33413 33414 |
# File 'lib/ovirtsdk4/types.rb', line 33412 def local=(value) @local = value end |
#mac_pool ⇒ MacPool
Returns the value of the mac_pool
attribute.
33421 33422 33423 |
# File 'lib/ovirtsdk4/types.rb', line 33421 def mac_pool @mac_pool end |
#mac_pool=(value) ⇒ Object
Sets the value of the mac_pool
attribute.
The value
parameter can be an instance of MacPool 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.
33434 33435 33436 33437 33438 33439 |
# File 'lib/ovirtsdk4/types.rb', line 33434 def mac_pool=(value) if value.is_a?(Hash) value = MacPool.new(value) end @mac_pool = value end |
#name ⇒ String
Returns the value of the name
attribute.
33446 33447 33448 |
# File 'lib/ovirtsdk4/types.rb', line 33446 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
33455 33456 33457 |
# File 'lib/ovirtsdk4/types.rb', line 33455 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks
attribute.
33464 33465 33466 |
# File 'lib/ovirtsdk4/types.rb', line 33464 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks
attribute.
33473 33474 33475 33476 33477 33478 33479 33480 33481 33482 33483 |
# File 'lib/ovirtsdk4/types.rb', line 33473 def networks=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Network.new(value) end end end @networks = list end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
33490 33491 33492 |
# File 'lib/ovirtsdk4/types.rb', line 33490 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
33499 33500 33501 33502 33503 33504 33505 33506 33507 33508 33509 |
# File 'lib/ovirtsdk4/types.rb', line 33499 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 |
#qoss ⇒ Array<Qos>
Returns the value of the qoss
attribute.
33516 33517 33518 |
# File 'lib/ovirtsdk4/types.rb', line 33516 def qoss @qoss end |
#qoss=(list) ⇒ Object
Sets the value of the qoss
attribute.
33525 33526 33527 33528 33529 33530 33531 33532 33533 33534 33535 |
# File 'lib/ovirtsdk4/types.rb', line 33525 def qoss=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Qos.new(value) end end end @qoss = list end |
#quota_mode ⇒ QuotaModeType
Returns the value of the quota_mode
attribute.
33542 33543 33544 |
# File 'lib/ovirtsdk4/types.rb', line 33542 def quota_mode @quota_mode end |
#quota_mode=(value) ⇒ Object
Sets the value of the quota_mode
attribute.
33551 33552 33553 |
# File 'lib/ovirtsdk4/types.rb', line 33551 def quota_mode=(value) @quota_mode = value end |
#quotas ⇒ Array<Quota>
Returns the value of the quotas
attribute.
33560 33561 33562 |
# File 'lib/ovirtsdk4/types.rb', line 33560 def quotas @quotas end |
#quotas=(list) ⇒ Object
Sets the value of the quotas
attribute.
33569 33570 33571 33572 33573 33574 33575 33576 33577 33578 33579 |
# File 'lib/ovirtsdk4/types.rb', line 33569 def quotas=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Quota.new(value) end end end @quotas = list end |
#status ⇒ DataCenterStatus
Returns the value of the status
attribute.
33586 33587 33588 |
# File 'lib/ovirtsdk4/types.rb', line 33586 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
33595 33596 33597 |
# File 'lib/ovirtsdk4/types.rb', line 33595 def status=(value) @status = value end |
#storage_domains ⇒ Array<StorageDomain>
Returns the value of the storage_domains
attribute.
33604 33605 33606 |
# File 'lib/ovirtsdk4/types.rb', line 33604 def storage_domains @storage_domains end |
#storage_domains=(list) ⇒ Object
Sets the value of the storage_domains
attribute.
33613 33614 33615 33616 33617 33618 33619 33620 33621 33622 33623 |
# File 'lib/ovirtsdk4/types.rb', line 33613 def storage_domains=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = StorageDomain.new(value) end end end @storage_domains = list end |
#storage_format ⇒ StorageFormat
Returns the value of the storage_format
attribute.
33630 33631 33632 |
# File 'lib/ovirtsdk4/types.rb', line 33630 def storage_format @storage_format end |
#storage_format=(value) ⇒ Object
Sets the value of the storage_format
attribute.
33639 33640 33641 |
# File 'lib/ovirtsdk4/types.rb', line 33639 def storage_format=(value) @storage_format = value end |
#supported_versions ⇒ Array<Version>
Returns the value of the supported_versions
attribute.
33648 33649 33650 |
# File 'lib/ovirtsdk4/types.rb', line 33648 def supported_versions @supported_versions end |
#supported_versions=(list) ⇒ Object
Sets the value of the supported_versions
attribute.
33657 33658 33659 33660 33661 33662 33663 33664 33665 33666 33667 |
# File 'lib/ovirtsdk4/types.rb', line 33657 def supported_versions=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Version.new(value) end end end @supported_versions = list end |
#version ⇒ Version
Returns the value of the version
attribute.
33674 33675 33676 |
# File 'lib/ovirtsdk4/types.rb', line 33674 def version @version end |
#version=(value) ⇒ Object
Sets the value of the version
attribute.
The value
parameter can be an instance of Version 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.
33687 33688 33689 33690 33691 33692 |
# File 'lib/ovirtsdk4/types.rb', line 33687 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |