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.
33205 33206 33207 33208 33209 33210 33211 33212 33213 33214 33215 33216 33217 33218 33219 33220 33221 |
# File 'lib/ovirtsdk4/types.rb', line 33205 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.
33226 33227 33228 33229 33230 33231 33232 33233 33234 33235 33236 33237 33238 33239 33240 33241 33242 |
# File 'lib/ovirtsdk4/types.rb', line 33226 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.
32764 32765 32766 |
# File 'lib/ovirtsdk4/types.rb', line 32764 def clusters @clusters end |
#clusters=(list) ⇒ Object
Sets the value of the clusters
attribute.
32773 32774 32775 32776 32777 32778 32779 32780 32781 32782 32783 |
# File 'lib/ovirtsdk4/types.rb', line 32773 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.
32790 32791 32792 |
# File 'lib/ovirtsdk4/types.rb', line 32790 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
32799 32800 32801 |
# File 'lib/ovirtsdk4/types.rb', line 32799 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
32808 32809 32810 |
# File 'lib/ovirtsdk4/types.rb', line 32808 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
32817 32818 32819 |
# File 'lib/ovirtsdk4/types.rb', line 32817 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
33247 33248 33249 33250 33251 33252 33253 33254 33255 33256 33257 33258 33259 33260 33261 33262 33263 |
# File 'lib/ovirtsdk4/types.rb', line 33247 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.
32826 32827 32828 |
# File 'lib/ovirtsdk4/types.rb', line 32826 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
32835 32836 32837 |
# File 'lib/ovirtsdk4/types.rb', line 32835 def id=(value) @id = value end |
#iscsi_bonds ⇒ Array<IscsiBond>
Returns the value of the iscsi_bonds
attribute.
32844 32845 32846 |
# File 'lib/ovirtsdk4/types.rb', line 32844 def iscsi_bonds @iscsi_bonds end |
#iscsi_bonds=(list) ⇒ Object
Sets the value of the iscsi_bonds
attribute.
32853 32854 32855 32856 32857 32858 32859 32860 32861 32862 32863 |
# File 'lib/ovirtsdk4/types.rb', line 32853 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.
32870 32871 32872 |
# File 'lib/ovirtsdk4/types.rb', line 32870 def local @local end |
#local=(value) ⇒ Object
Sets the value of the local
attribute.
32879 32880 32881 |
# File 'lib/ovirtsdk4/types.rb', line 32879 def local=(value) @local = value end |
#mac_pool ⇒ MacPool
Returns the value of the mac_pool
attribute.
32888 32889 32890 |
# File 'lib/ovirtsdk4/types.rb', line 32888 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.
32901 32902 32903 32904 32905 32906 |
# File 'lib/ovirtsdk4/types.rb', line 32901 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.
32913 32914 32915 |
# File 'lib/ovirtsdk4/types.rb', line 32913 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
32922 32923 32924 |
# File 'lib/ovirtsdk4/types.rb', line 32922 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks
attribute.
32931 32932 32933 |
# File 'lib/ovirtsdk4/types.rb', line 32931 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks
attribute.
32940 32941 32942 32943 32944 32945 32946 32947 32948 32949 32950 |
# File 'lib/ovirtsdk4/types.rb', line 32940 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.
32957 32958 32959 |
# File 'lib/ovirtsdk4/types.rb', line 32957 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
32966 32967 32968 32969 32970 32971 32972 32973 32974 32975 32976 |
# File 'lib/ovirtsdk4/types.rb', line 32966 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.
32983 32984 32985 |
# File 'lib/ovirtsdk4/types.rb', line 32983 def qoss @qoss end |
#qoss=(list) ⇒ Object
Sets the value of the qoss
attribute.
32992 32993 32994 32995 32996 32997 32998 32999 33000 33001 33002 |
# File 'lib/ovirtsdk4/types.rb', line 32992 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.
33009 33010 33011 |
# File 'lib/ovirtsdk4/types.rb', line 33009 def quota_mode @quota_mode end |
#quota_mode=(value) ⇒ Object
Sets the value of the quota_mode
attribute.
33018 33019 33020 |
# File 'lib/ovirtsdk4/types.rb', line 33018 def quota_mode=(value) @quota_mode = value end |
#quotas ⇒ Array<Quota>
Returns the value of the quotas
attribute.
33027 33028 33029 |
# File 'lib/ovirtsdk4/types.rb', line 33027 def quotas @quotas end |
#quotas=(list) ⇒ Object
Sets the value of the quotas
attribute.
33036 33037 33038 33039 33040 33041 33042 33043 33044 33045 33046 |
# File 'lib/ovirtsdk4/types.rb', line 33036 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.
33053 33054 33055 |
# File 'lib/ovirtsdk4/types.rb', line 33053 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
33062 33063 33064 |
# File 'lib/ovirtsdk4/types.rb', line 33062 def status=(value) @status = value end |
#storage_domains ⇒ Array<StorageDomain>
Returns the value of the storage_domains
attribute.
33071 33072 33073 |
# File 'lib/ovirtsdk4/types.rb', line 33071 def storage_domains @storage_domains end |
#storage_domains=(list) ⇒ Object
Sets the value of the storage_domains
attribute.
33080 33081 33082 33083 33084 33085 33086 33087 33088 33089 33090 |
# File 'lib/ovirtsdk4/types.rb', line 33080 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.
33097 33098 33099 |
# File 'lib/ovirtsdk4/types.rb', line 33097 def storage_format @storage_format end |
#storage_format=(value) ⇒ Object
Sets the value of the storage_format
attribute.
33106 33107 33108 |
# File 'lib/ovirtsdk4/types.rb', line 33106 def storage_format=(value) @storage_format = value end |
#supported_versions ⇒ Array<Version>
Returns the value of the supported_versions
attribute.
33115 33116 33117 |
# File 'lib/ovirtsdk4/types.rb', line 33115 def supported_versions @supported_versions end |
#supported_versions=(list) ⇒ Object
Sets the value of the supported_versions
attribute.
33124 33125 33126 33127 33128 33129 33130 33131 33132 33133 33134 |
# File 'lib/ovirtsdk4/types.rb', line 33124 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.
33141 33142 33143 |
# File 'lib/ovirtsdk4/types.rb', line 33141 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.
33154 33155 33156 33157 33158 33159 |
# File 'lib/ovirtsdk4/types.rb', line 33154 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |