class OvirtSDK4::DataCenter

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {DataCenter} class.

@param opts [Hash] A hash containing the attributes of the object. The keys of the hash

should be symbols corresponding to the names of the attributes. The values of the hash
should be the values of the attributes.

@option opts [Array<Cluster>, Array<Hash>] :clusters The values of attribute `clusters`.

@option opts [String] :comment The value of attribute `comment`.

@option opts [String] :description The value of attribute `description`.

@option opts [String] :id The value of attribute `id`.

@option opts [Array<IscsiBond>, Array<Hash>] :iscsi_bonds The values of attribute `iscsi_bonds`.

@option opts [Boolean] :local The value of attribute `local`.

@option opts [MacPool, Hash] :mac_pool The value of attribute `mac_pool`.

@option opts [String] :name The value of attribute `name`.

@option opts [Array<Network>, Array<Hash>] :networks The values of attribute `networks`.

@option opts [Array<Permission>, Array<Hash>] :permissions The values of attribute `permissions`.

@option opts [Array<Qos>, Array<Hash>] :qoss The values of attribute `qoss`.

@option opts [QuotaModeType] :quota_mode The value of attribute `quota_mode`.

@option opts [Array<Quota>, Array<Hash>] :quotas The values of attribute `quotas`.

@option opts [DataCenterStatus] :status The value of attribute `status`.

@option opts [Array<StorageDomain>, Array<Hash>] :storage_domains The values of attribute `storage_domains`.

@option opts [StorageFormat] :storage_format The value of attribute `storage_format`.

@option opts [Array<Version>, Array<Hash>] :supported_versions The values of attribute `supported_versions`.

@option opts [Version, Hash] :version The value of attribute `version`.

Calls superclass method OvirtSDK4::Identified.new
# File lib/ovirtsdk4/types.rb, line 30385
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.permissions = 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

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 30406
def ==(other)
  super &&
  @clusters == other.clusters &&
  @iscsi_bonds == other.iscsi_bonds &&
  @local == other.local &&
  @mac_pool == other.mac_pool &&
  @networks == other.networks &&
  @permissions == other.permissions &&
  @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() click to toggle source

Returns the value of the `clusters` attribute.

@return [Array<Cluster>]

# File lib/ovirtsdk4/types.rb, line 29944
def clusters
  @clusters
end
clusters=(list) click to toggle source

Sets the value of the `clusters` attribute.

@param list [Array<Cluster>]

# File lib/ovirtsdk4/types.rb, line 29953
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() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 29970
def comment
  @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 29979
def comment=(value)
  @comment = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 29988
def description
  @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 29997
def description=(value)
  @description = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 30427
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() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 30006
def id
  @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 30015
def id=(value)
  @id = value
end
iscsi_bonds() click to toggle source

Returns the value of the `iscsi_bonds` attribute.

@return [Array<IscsiBond>]

# File lib/ovirtsdk4/types.rb, line 30024
def iscsi_bonds
  @iscsi_bonds
end
iscsi_bonds=(list) click to toggle source

Sets the value of the `iscsi_bonds` attribute.

@param list [Array<IscsiBond>]

# File lib/ovirtsdk4/types.rb, line 30033
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() click to toggle source

Returns the value of the `local` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 30050
def local
  @local
end
local=(value) click to toggle source

Sets the value of the `local` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 30059
def local=(value)
  @local = value
end
mac_pool() click to toggle source

Returns the value of the `mac_pool` attribute.

@return [MacPool]

# File lib/ovirtsdk4/types.rb, line 30068
def mac_pool
  @mac_pool
end
mac_pool=(value) click to toggle source

Sets the value of the `mac_pool` attribute.

@param value [MacPool, Hash]

The `value` parameter can be an instance of {OvirtSDK4::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.

# File lib/ovirtsdk4/types.rb, line 30081
def mac_pool=(value)
  if value.is_a?(Hash)
    value = MacPool.new(value)
  end
  @mac_pool = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 30093
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 30102
def name=(value)
  @name = value
end
networks() click to toggle source

Returns the value of the `networks` attribute.

@return [Array<Network>]

# File lib/ovirtsdk4/types.rb, line 30111
def networks
  @networks
end
networks=(list) click to toggle source

Sets the value of the `networks` attribute.

@param list [Array<Network>]

# File lib/ovirtsdk4/types.rb, line 30120
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() click to toggle source

Returns the value of the `permissions` attribute.

@return [Array<Permission>]

# File lib/ovirtsdk4/types.rb, line 30137
def permissions
  @permissions
end
permissions=(list) click to toggle source

Sets the value of the `permissions` attribute.

@param list [Array<Permission>]

# File lib/ovirtsdk4/types.rb, line 30146
def permissions=(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() click to toggle source

Returns the value of the `qoss` attribute.

@return [Array<Qos>]

# File lib/ovirtsdk4/types.rb, line 30163
def qoss
  @qoss
end
qoss=(list) click to toggle source

Sets the value of the `qoss` attribute.

@param list [Array<Qos>]

# File lib/ovirtsdk4/types.rb, line 30172
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() click to toggle source

Returns the value of the `quota_mode` attribute.

@return [QuotaModeType]

# File lib/ovirtsdk4/types.rb, line 30189
def quota_mode
  @quota_mode
end
quota_mode=(value) click to toggle source

Sets the value of the `quota_mode` attribute.

@param value [QuotaModeType]

# File lib/ovirtsdk4/types.rb, line 30198
def quota_mode=(value)
  @quota_mode = value
end
quotas() click to toggle source

Returns the value of the `quotas` attribute.

@return [Array<Quota>]

# File lib/ovirtsdk4/types.rb, line 30207
def quotas
  @quotas
end
quotas=(list) click to toggle source

Sets the value of the `quotas` attribute.

@param list [Array<Quota>]

# File lib/ovirtsdk4/types.rb, line 30216
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() click to toggle source

Returns the value of the `status` attribute.

@return [DataCenterStatus]

# File lib/ovirtsdk4/types.rb, line 30233
def status
  @status
end
status=(value) click to toggle source

Sets the value of the `status` attribute.

@param value [DataCenterStatus]

# File lib/ovirtsdk4/types.rb, line 30242
def status=(value)
  @status = value
end
storage_domains() click to toggle source

Returns the value of the `storage_domains` attribute.

@return [Array<StorageDomain>]

# File lib/ovirtsdk4/types.rb, line 30251
def storage_domains
  @storage_domains
end
storage_domains=(list) click to toggle source

Sets the value of the `storage_domains` attribute.

@param list [Array<StorageDomain>]

# File lib/ovirtsdk4/types.rb, line 30260
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() click to toggle source

Returns the value of the `storage_format` attribute.

@return [StorageFormat]

# File lib/ovirtsdk4/types.rb, line 30277
def storage_format
  @storage_format
end
storage_format=(value) click to toggle source

Sets the value of the `storage_format` attribute.

@param value [StorageFormat]

# File lib/ovirtsdk4/types.rb, line 30286
def storage_format=(value)
  @storage_format = value
end
supported_versions() click to toggle source

Returns the value of the `supported_versions` attribute.

@return [Array<Version>]

# File lib/ovirtsdk4/types.rb, line 30295
def supported_versions
  @supported_versions
end
supported_versions=(list) click to toggle source

Sets the value of the `supported_versions` attribute.

@param list [Array<Version>]

# File lib/ovirtsdk4/types.rb, line 30304
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() click to toggle source

Returns the value of the `version` attribute.

@return [Version]

# File lib/ovirtsdk4/types.rb, line 30321
def version
  @version
end
version=(value) click to toggle source

Sets the value of the `version` attribute.

@param value [Version, Hash]

The `value` parameter can be an instance of {OvirtSDK4::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.

# File lib/ovirtsdk4/types.rb, line 30334
def version=(value)
  if value.is_a?(Hash)
    value = Version.new(value)
  end
  @version = value
end