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
trueifselfandotherhave the same attributes and values. -
#clusters ⇒ Array<Cluster>
Returns the value of the
clustersattribute. -
#clusters=(list) ⇒ Object
Sets the value of the
clustersattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#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 = {}) ⇒ DataCenter
constructor
Creates a new instance of the DataCenter class.
-
#iscsi_bonds ⇒ Array<IscsiBond>
Returns the value of the
iscsi_bondsattribute. -
#iscsi_bonds=(list) ⇒ Object
Sets the value of the
iscsi_bondsattribute. -
#local ⇒ Boolean
Returns the value of the
localattribute. -
#local=(value) ⇒ Object
Sets the value of the
localattribute. -
#mac_pool ⇒ MacPool
Returns the value of the
mac_poolattribute. -
#mac_pool=(value) ⇒ Object
Sets the value of the
mac_poolattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#networks ⇒ Array<Network>
Returns the value of the
networksattribute. -
#networks=(list) ⇒ Object
Sets the value of the
networksattribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissionsattribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissionsattribute. -
#qoss ⇒ Array<Qos>
Returns the value of the
qossattribute. -
#qoss=(list) ⇒ Object
Sets the value of the
qossattribute. -
#quota_mode ⇒ QuotaModeType
Returns the value of the
quota_modeattribute. -
#quota_mode=(value) ⇒ Object
Sets the value of the
quota_modeattribute. -
#quotas ⇒ Array<Quota>
Returns the value of the
quotasattribute. -
#quotas=(list) ⇒ Object
Sets the value of the
quotasattribute. -
#status ⇒ DataCenterStatus
Returns the value of the
statusattribute. -
#status=(value) ⇒ Object
Sets the value of the
statusattribute. -
#storage_domains ⇒ Array<StorageDomain>
Returns the value of the
storage_domainsattribute. -
#storage_domains=(list) ⇒ Object
Sets the value of the
storage_domainsattribute. -
#storage_format ⇒ StorageFormat
Returns the value of the
storage_formatattribute. -
#storage_format=(value) ⇒ Object
Sets the value of the
storage_formatattribute. -
#supported_versions ⇒ Array<Version>
Returns the value of the
supported_versionsattribute. -
#supported_versions=(list) ⇒ Object
Sets the value of the
supported_versionsattribute. -
#version ⇒ Version
Returns the value of the
versionattribute. -
#version=(value) ⇒ Object
Sets the value of the
versionattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ DataCenter
Creates a new instance of the OvirtSDK4::DataCenter class.
33136 33137 33138 33139 33140 33141 33142 33143 33144 33145 33146 33147 33148 33149 33150 33151 33152 |
# File 'lib/ovirtsdk4/types.rb', line 33136 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.
33157 33158 33159 33160 33161 33162 33163 33164 33165 33166 33167 33168 33169 33170 33171 33172 33173 |
# File 'lib/ovirtsdk4/types.rb', line 33157 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.
32695 32696 32697 |
# File 'lib/ovirtsdk4/types.rb', line 32695 def clusters @clusters end |
#clusters=(list) ⇒ Object
Sets the value of the clusters attribute.
32704 32705 32706 32707 32708 32709 32710 32711 32712 32713 32714 |
# File 'lib/ovirtsdk4/types.rb', line 32704 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.
32721 32722 32723 |
# File 'lib/ovirtsdk4/types.rb', line 32721 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
32730 32731 32732 |
# File 'lib/ovirtsdk4/types.rb', line 32730 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
32739 32740 32741 |
# File 'lib/ovirtsdk4/types.rb', line 32739 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
32748 32749 32750 |
# File 'lib/ovirtsdk4/types.rb', line 32748 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
33178 33179 33180 33181 33182 33183 33184 33185 33186 33187 33188 33189 33190 33191 33192 33193 33194 |
# File 'lib/ovirtsdk4/types.rb', line 33178 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.
32757 32758 32759 |
# File 'lib/ovirtsdk4/types.rb', line 32757 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
32766 32767 32768 |
# File 'lib/ovirtsdk4/types.rb', line 32766 def id=(value) @id = value end |
#iscsi_bonds ⇒ Array<IscsiBond>
Returns the value of the iscsi_bonds attribute.
32775 32776 32777 |
# File 'lib/ovirtsdk4/types.rb', line 32775 def iscsi_bonds @iscsi_bonds end |
#iscsi_bonds=(list) ⇒ Object
Sets the value of the iscsi_bonds attribute.
32784 32785 32786 32787 32788 32789 32790 32791 32792 32793 32794 |
# File 'lib/ovirtsdk4/types.rb', line 32784 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.
32801 32802 32803 |
# File 'lib/ovirtsdk4/types.rb', line 32801 def local @local end |
#local=(value) ⇒ Object
Sets the value of the local attribute.
32810 32811 32812 |
# File 'lib/ovirtsdk4/types.rb', line 32810 def local=(value) @local = value end |
#mac_pool ⇒ MacPool
Returns the value of the mac_pool attribute.
32819 32820 32821 |
# File 'lib/ovirtsdk4/types.rb', line 32819 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.
32832 32833 32834 32835 32836 32837 |
# File 'lib/ovirtsdk4/types.rb', line 32832 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.
32844 32845 32846 |
# File 'lib/ovirtsdk4/types.rb', line 32844 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
32853 32854 32855 |
# File 'lib/ovirtsdk4/types.rb', line 32853 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks attribute.
32862 32863 32864 |
# File 'lib/ovirtsdk4/types.rb', line 32862 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks attribute.
32871 32872 32873 32874 32875 32876 32877 32878 32879 32880 32881 |
# File 'lib/ovirtsdk4/types.rb', line 32871 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.
32888 32889 32890 |
# File 'lib/ovirtsdk4/types.rb', line 32888 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
32897 32898 32899 32900 32901 32902 32903 32904 32905 32906 32907 |
# File 'lib/ovirtsdk4/types.rb', line 32897 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.
32914 32915 32916 |
# File 'lib/ovirtsdk4/types.rb', line 32914 def qoss @qoss end |
#qoss=(list) ⇒ Object
Sets the value of the qoss attribute.
32923 32924 32925 32926 32927 32928 32929 32930 32931 32932 32933 |
# File 'lib/ovirtsdk4/types.rb', line 32923 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.
32940 32941 32942 |
# File 'lib/ovirtsdk4/types.rb', line 32940 def quota_mode @quota_mode end |
#quota_mode=(value) ⇒ Object
Sets the value of the quota_mode attribute.
32949 32950 32951 |
# File 'lib/ovirtsdk4/types.rb', line 32949 def quota_mode=(value) @quota_mode = value end |
#quotas ⇒ Array<Quota>
Returns the value of the quotas attribute.
32958 32959 32960 |
# File 'lib/ovirtsdk4/types.rb', line 32958 def quotas @quotas end |
#quotas=(list) ⇒ Object
Sets the value of the quotas attribute.
32967 32968 32969 32970 32971 32972 32973 32974 32975 32976 32977 |
# File 'lib/ovirtsdk4/types.rb', line 32967 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.
32984 32985 32986 |
# File 'lib/ovirtsdk4/types.rb', line 32984 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
32993 32994 32995 |
# File 'lib/ovirtsdk4/types.rb', line 32993 def status=(value) @status = value end |
#storage_domains ⇒ Array<StorageDomain>
Returns the value of the storage_domains attribute.
33002 33003 33004 |
# File 'lib/ovirtsdk4/types.rb', line 33002 def storage_domains @storage_domains end |
#storage_domains=(list) ⇒ Object
Sets the value of the storage_domains attribute.
33011 33012 33013 33014 33015 33016 33017 33018 33019 33020 33021 |
# File 'lib/ovirtsdk4/types.rb', line 33011 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.
33028 33029 33030 |
# File 'lib/ovirtsdk4/types.rb', line 33028 def storage_format @storage_format end |
#storage_format=(value) ⇒ Object
Sets the value of the storage_format attribute.
33037 33038 33039 |
# File 'lib/ovirtsdk4/types.rb', line 33037 def storage_format=(value) @storage_format = value end |
#supported_versions ⇒ Array<Version>
Returns the value of the supported_versions attribute.
33046 33047 33048 |
# File 'lib/ovirtsdk4/types.rb', line 33046 def supported_versions @supported_versions end |
#supported_versions=(list) ⇒ Object
Sets the value of the supported_versions attribute.
33055 33056 33057 33058 33059 33060 33061 33062 33063 33064 33065 |
# File 'lib/ovirtsdk4/types.rb', line 33055 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.
33072 33073 33074 |
# File 'lib/ovirtsdk4/types.rb', line 33072 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.
33085 33086 33087 33088 33089 33090 |
# File 'lib/ovirtsdk4/types.rb', line 33085 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |