Class: Vcloud::Walker::Resource::Vdc

Inherits:
Entity
  • Object
show all
Defined in:
lib/vcloud/walker/resource/vdc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#to_summary

Constructor Details

#initialize(fog_vdc) ⇒ Vdc

Returns a new instance of Vdc.



18
19
20
21
22
23
24
25
# File 'lib/vcloud/walker/resource/vdc.rb', line 18

def initialize(fog_vdc)
  @id               = fog_vdc.id
  @name             = fog_vdc.name
  @description      = fog_vdc.description
  @vapps            = Resource::VApps.new(fog_vdc.vapps.map(&:id))
  @quotas           = {network: fog_vdc.network_quota, nic: fog_vdc.nic_quota, vm: fog_vdc.vm_quota}
  @compute_capacity = fog_vdc.compute_capacity
end

Instance Attribute Details

#compute_capacityObject (readonly)

Returns the value of attribute compute_capacity.



16
17
18
# File 'lib/vcloud/walker/resource/vdc.rb', line 16

def compute_capacity
  @compute_capacity
end

#descriptionObject (readonly)

Returns the value of attribute description.



16
17
18
# File 'lib/vcloud/walker/resource/vdc.rb', line 16

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



16
17
18
# File 'lib/vcloud/walker/resource/vdc.rb', line 16

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



16
17
18
# File 'lib/vcloud/walker/resource/vdc.rb', line 16

def name
  @name
end

#quotasObject (readonly)

Returns the value of attribute quotas.



16
17
18
# File 'lib/vcloud/walker/resource/vdc.rb', line 16

def quotas
  @quotas
end

#vappsObject (readonly)

Returns the value of attribute vapps.



16
17
18
# File 'lib/vcloud/walker/resource/vdc.rb', line 16

def vapps
  @vapps
end