Class: Vcloud::Walker::Resource::Vdc
- Defined in:
- lib/vcloud/walker/resource/vdc.rb
Instance Attribute Summary collapse
-
#compute_capacity ⇒ Object
readonly
Returns the value of attribute compute_capacity.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#quotas ⇒ Object
readonly
Returns the value of attribute quotas.
-
#vapps ⇒ Object
readonly
Returns the value of attribute vapps.
Instance Method Summary collapse
-
#initialize(fog_vdc) ⇒ Vdc
constructor
A new instance of Vdc.
Methods inherited from Entity
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_capacity ⇒ Object (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 |
#description ⇒ Object (readonly)
Returns the value of attribute description.
16 17 18 |
# File 'lib/vcloud/walker/resource/vdc.rb', line 16 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
16 17 18 |
# File 'lib/vcloud/walker/resource/vdc.rb', line 16 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/vcloud/walker/resource/vdc.rb', line 16 def name @name end |
#quotas ⇒ Object (readonly)
Returns the value of attribute quotas.
16 17 18 |
# File 'lib/vcloud/walker/resource/vdc.rb', line 16 def quotas @quotas end |
#vapps ⇒ Object (readonly)
Returns the value of attribute vapps.
16 17 18 |
# File 'lib/vcloud/walker/resource/vdc.rb', line 16 def vapps @vapps end |