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.
35782 35783 35784 35785 35786 35787 35788 35789 35790 35791 35792 35793 35794 35795 35796 35797 35798 |
# File 'lib/ovirtsdk4/types.rb', line 35782 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.
35803 35804 35805 35806 35807 35808 35809 35810 35811 35812 35813 35814 35815 35816 35817 35818 35819 |
# File 'lib/ovirtsdk4/types.rb', line 35803 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.
35341 35342 35343 |
# File 'lib/ovirtsdk4/types.rb', line 35341 def clusters @clusters end |
#clusters=(list) ⇒ Object
Sets the value of the clusters
attribute.
35350 35351 35352 35353 35354 35355 35356 35357 35358 35359 35360 |
# File 'lib/ovirtsdk4/types.rb', line 35350 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.
35367 35368 35369 |
# File 'lib/ovirtsdk4/types.rb', line 35367 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
35376 35377 35378 |
# File 'lib/ovirtsdk4/types.rb', line 35376 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
35385 35386 35387 |
# File 'lib/ovirtsdk4/types.rb', line 35385 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
35394 35395 35396 |
# File 'lib/ovirtsdk4/types.rb', line 35394 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
35824 35825 35826 35827 35828 35829 35830 35831 35832 35833 35834 35835 35836 35837 35838 35839 35840 |
# File 'lib/ovirtsdk4/types.rb', line 35824 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.
35403 35404 35405 |
# File 'lib/ovirtsdk4/types.rb', line 35403 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
35412 35413 35414 |
# File 'lib/ovirtsdk4/types.rb', line 35412 def id=(value) @id = value end |
#iscsi_bonds ⇒ Array<IscsiBond>
Returns the value of the iscsi_bonds
attribute.
35421 35422 35423 |
# File 'lib/ovirtsdk4/types.rb', line 35421 def iscsi_bonds @iscsi_bonds end |
#iscsi_bonds=(list) ⇒ Object
Sets the value of the iscsi_bonds
attribute.
35430 35431 35432 35433 35434 35435 35436 35437 35438 35439 35440 |
# File 'lib/ovirtsdk4/types.rb', line 35430 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.
35447 35448 35449 |
# File 'lib/ovirtsdk4/types.rb', line 35447 def local @local end |
#local=(value) ⇒ Object
Sets the value of the local
attribute.
35456 35457 35458 |
# File 'lib/ovirtsdk4/types.rb', line 35456 def local=(value) @local = value end |
#mac_pool ⇒ MacPool
Returns the value of the mac_pool
attribute.
35465 35466 35467 |
# File 'lib/ovirtsdk4/types.rb', line 35465 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.
35478 35479 35480 35481 35482 35483 |
# File 'lib/ovirtsdk4/types.rb', line 35478 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.
35490 35491 35492 |
# File 'lib/ovirtsdk4/types.rb', line 35490 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
35499 35500 35501 |
# File 'lib/ovirtsdk4/types.rb', line 35499 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks
attribute.
35508 35509 35510 |
# File 'lib/ovirtsdk4/types.rb', line 35508 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks
attribute.
35517 35518 35519 35520 35521 35522 35523 35524 35525 35526 35527 |
# File 'lib/ovirtsdk4/types.rb', line 35517 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.
35534 35535 35536 |
# File 'lib/ovirtsdk4/types.rb', line 35534 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
35543 35544 35545 35546 35547 35548 35549 35550 35551 35552 35553 |
# File 'lib/ovirtsdk4/types.rb', line 35543 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.
35560 35561 35562 |
# File 'lib/ovirtsdk4/types.rb', line 35560 def qoss @qoss end |
#qoss=(list) ⇒ Object
Sets the value of the qoss
attribute.
35569 35570 35571 35572 35573 35574 35575 35576 35577 35578 35579 |
# File 'lib/ovirtsdk4/types.rb', line 35569 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.
35586 35587 35588 |
# File 'lib/ovirtsdk4/types.rb', line 35586 def quota_mode @quota_mode end |
#quota_mode=(value) ⇒ Object
Sets the value of the quota_mode
attribute.
35595 35596 35597 |
# File 'lib/ovirtsdk4/types.rb', line 35595 def quota_mode=(value) @quota_mode = value end |
#quotas ⇒ Array<Quota>
Returns the value of the quotas
attribute.
35604 35605 35606 |
# File 'lib/ovirtsdk4/types.rb', line 35604 def quotas @quotas end |
#quotas=(list) ⇒ Object
Sets the value of the quotas
attribute.
35613 35614 35615 35616 35617 35618 35619 35620 35621 35622 35623 |
# File 'lib/ovirtsdk4/types.rb', line 35613 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.
35630 35631 35632 |
# File 'lib/ovirtsdk4/types.rb', line 35630 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
35639 35640 35641 |
# File 'lib/ovirtsdk4/types.rb', line 35639 def status=(value) @status = value end |
#storage_domains ⇒ Array<StorageDomain>
Returns the value of the storage_domains
attribute.
35648 35649 35650 |
# File 'lib/ovirtsdk4/types.rb', line 35648 def storage_domains @storage_domains end |
#storage_domains=(list) ⇒ Object
Sets the value of the storage_domains
attribute.
35657 35658 35659 35660 35661 35662 35663 35664 35665 35666 35667 |
# File 'lib/ovirtsdk4/types.rb', line 35657 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.
35674 35675 35676 |
# File 'lib/ovirtsdk4/types.rb', line 35674 def storage_format @storage_format end |
#storage_format=(value) ⇒ Object
Sets the value of the storage_format
attribute.
35683 35684 35685 |
# File 'lib/ovirtsdk4/types.rb', line 35683 def storage_format=(value) @storage_format = value end |
#supported_versions ⇒ Array<Version>
Returns the value of the supported_versions
attribute.
35692 35693 35694 |
# File 'lib/ovirtsdk4/types.rb', line 35692 def supported_versions @supported_versions end |
#supported_versions=(list) ⇒ Object
Sets the value of the supported_versions
attribute.
35701 35702 35703 35704 35705 35706 35707 35708 35709 35710 35711 |
# File 'lib/ovirtsdk4/types.rb', line 35701 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.
35718 35719 35720 |
# File 'lib/ovirtsdk4/types.rb', line 35718 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.
35731 35732 35733 35734 35735 35736 |
# File 'lib/ovirtsdk4/types.rb', line 35731 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |