Class: OvirtSDK4::DataCenter

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (DataCenter) initialize(opts = {})

Creates a new instance of the OvirtSDK4::DataCenter class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :clusters (Array<Cluster>, Array<Hash>)

    The values of attribute clusters.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :iscsi_bonds (Array<IscsiBond>, Array<Hash>)

    The values of attribute iscsi_bonds.

  • :local (Boolean)

    The value of attribute local.

  • :mac_pool (MacPool, Hash)

    The value of attribute mac_pool.

  • :name (String)

    The value of attribute name.

  • :networks (Array<Network>, Array<Hash>)

    The values of attribute networks.

  • :permissions (Array<Permission>, Array<Hash>)

    The values of attribute permissions.

  • :qoss (Array<Qos>, Array<Hash>)

    The values of attribute qoss.

  • :quota_mode (QuotaModeType)

    The value of attribute quota_mode.

  • :quotas (Array<Quota>, Array<Hash>)

    The values of attribute quotas.

  • :status (DataCenterStatus)

    The value of attribute status.

  • :storage_domains (Array<StorageDomain>, Array<Hash>)

    The values of attribute storage_domains.

  • :storage_format (StorageFormat)

    The value of attribute storage_format.

  • :supported_versions (Array<Version>, Array<Hash>)

    The values of attribute supported_versions.

  • :version (Version, Hash)

    The value of attribute version.



25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
# File 'lib/ovirtsdk4/types.rb', line 25506

def initialize(opts = {})
  super(opts)
  self.clusters = opts[:clusters]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.id = opts[:id]
  self.iscsi_bonds = opts[:iscsi_bonds]
  self.local = opts[:local]
  self.mac_pool = opts[:mac_pool]
  self.name = opts[:name]
  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

Instance Method Details

- (Array<Cluster>) clusters

Returns the value of the clusters attribute.

Returns:



25073
25074
25075
# File 'lib/ovirtsdk4/types.rb', line 25073

def clusters
  return @clusters
end

- (Object) clusters=(list)

Sets the value of the clusters attribute.

Parameters:



25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
# File 'lib/ovirtsdk4/types.rb', line 25081

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

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


25098
25099
25100
# File 'lib/ovirtsdk4/types.rb', line 25098

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


25107
25108
25109
# File 'lib/ovirtsdk4/types.rb', line 25107

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


25116
25117
25118
# File 'lib/ovirtsdk4/types.rb', line 25116

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


25125
25126
25127
# File 'lib/ovirtsdk4/types.rb', line 25125

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


25134
25135
25136
# File 'lib/ovirtsdk4/types.rb', line 25134

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


25143
25144
25145
# File 'lib/ovirtsdk4/types.rb', line 25143

def id=(value)
  @id = value
end

- (Array<IscsiBond>) iscsi_bonds

Returns the value of the iscsi_bonds attribute.

Returns:



25152
25153
25154
# File 'lib/ovirtsdk4/types.rb', line 25152

def iscsi_bonds
  return @iscsi_bonds
end

- (Object) iscsi_bonds=(list)

Sets the value of the iscsi_bonds attribute.

Parameters:



25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
# File 'lib/ovirtsdk4/types.rb', line 25160

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

- (Boolean) local

Returns the value of the local attribute.

Returns:

  • (Boolean)


25177
25178
25179
# File 'lib/ovirtsdk4/types.rb', line 25177

def local
  return @local
end

- (Object) local=(value)

Sets the value of the local attribute.

Parameters:

  • value (Boolean)


25186
25187
25188
# File 'lib/ovirtsdk4/types.rb', line 25186

def local=(value)
  @local = value
end

- (MacPool) mac_pool

Returns the value of the mac_pool attribute.

Returns:



25195
25196
25197
# File 'lib/ovirtsdk4/types.rb', line 25195

def mac_pool
  return @mac_pool
end

- (Object) mac_pool=(value)

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.

Parameters:



25208
25209
25210
25211
25212
25213
# File 'lib/ovirtsdk4/types.rb', line 25208

def mac_pool=(value)
  if value.is_a?(Hash)
    value = MacPool.new(value)
  end
  @mac_pool = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


25220
25221
25222
# File 'lib/ovirtsdk4/types.rb', line 25220

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


25229
25230
25231
# File 'lib/ovirtsdk4/types.rb', line 25229

def name=(value)
  @name = value
end

- (Array<Network>) networks

Returns the value of the networks attribute.

Returns:



25238
25239
25240
# File 'lib/ovirtsdk4/types.rb', line 25238

def networks
  return @networks
end

- (Object) networks=(list)

Sets the value of the networks attribute.

Parameters:



25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
# File 'lib/ovirtsdk4/types.rb', line 25246

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

- (Array<Permission>) permissions

Returns the value of the permissions attribute.

Returns:



25263
25264
25265
# File 'lib/ovirtsdk4/types.rb', line 25263

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
# File 'lib/ovirtsdk4/types.rb', line 25271

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

- (Array<Qos>) qoss

Returns the value of the qoss attribute.

Returns:



25288
25289
25290
# File 'lib/ovirtsdk4/types.rb', line 25288

def qoss
  return @qoss
end

- (Object) qoss=(list)

Sets the value of the qoss attribute.

Parameters:

  • list (Array<Qos>)


25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
# File 'lib/ovirtsdk4/types.rb', line 25296

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

- (QuotaModeType) quota_mode

Returns the value of the quota_mode attribute.

Returns:



25313
25314
25315
# File 'lib/ovirtsdk4/types.rb', line 25313

def quota_mode
  return @quota_mode
end

- (Object) quota_mode=(value)

Sets the value of the quota_mode attribute.

Parameters:



25322
25323
25324
# File 'lib/ovirtsdk4/types.rb', line 25322

def quota_mode=(value)
  @quota_mode = value
end

- (Array<Quota>) quotas

Returns the value of the quotas attribute.

Returns:



25331
25332
25333
# File 'lib/ovirtsdk4/types.rb', line 25331

def quotas
  return @quotas
end

- (Object) quotas=(list)

Sets the value of the quotas attribute.

Parameters:



25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
# File 'lib/ovirtsdk4/types.rb', line 25339

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

- (DataCenterStatus) status

Returns the value of the status attribute.

Returns:



25356
25357
25358
# File 'lib/ovirtsdk4/types.rb', line 25356

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



25365
25366
25367
# File 'lib/ovirtsdk4/types.rb', line 25365

def status=(value)
  @status = value
end

- (Array<StorageDomain>) storage_domains

Returns the value of the storage_domains attribute.

Returns:



25374
25375
25376
# File 'lib/ovirtsdk4/types.rb', line 25374

def storage_domains
  return @storage_domains
end

- (Object) storage_domains=(list)

Sets the value of the storage_domains attribute.

Parameters:



25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
# File 'lib/ovirtsdk4/types.rb', line 25382

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

- (StorageFormat) storage_format

Returns the value of the storage_format attribute.

Returns:



25399
25400
25401
# File 'lib/ovirtsdk4/types.rb', line 25399

def storage_format
  return @storage_format
end

- (Object) storage_format=(value)

Sets the value of the storage_format attribute.

Parameters:



25408
25409
25410
# File 'lib/ovirtsdk4/types.rb', line 25408

def storage_format=(value)
  @storage_format = value
end

- (Array<Version>) supported_versions

Returns the value of the supported_versions attribute.

Returns:



25417
25418
25419
# File 'lib/ovirtsdk4/types.rb', line 25417

def supported_versions
  return @supported_versions
end

- (Object) supported_versions=(list)

Sets the value of the supported_versions attribute.

Parameters:



25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
# File 'lib/ovirtsdk4/types.rb', line 25425

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.

Returns:



25442
25443
25444
# File 'lib/ovirtsdk4/types.rb', line 25442

def version
  return @version
end

- (Object) version=(value)

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.

Parameters:



25455
25456
25457
25458
25459
25460
# File 'lib/ovirtsdk4/types.rb', line 25455

def version=(value)
  if value.is_a?(Hash)
    value = Version.new(value)
  end
  @version = value
end