Class: Vcloud::Walker::Resource::VApp

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#to_summary

Constructor Details

#initialize(fog_vapp) ⇒ VApp

Returns a new instance of VApp.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/vcloud/walker/resource/vapp.rb', line 7

def initialize fog_vapp
  @name = fog_vapp[:name]
  @status = fog_vapp[:status]
  @description = fog_vapp[:Description]
  @deployed = fog_vapp[:deployed]
  @id = extract_id(fog_vapp[:href])
  @network_config  = extract_network_config(fog_vapp[:NetworkConfigSection][:NetworkConfig])
  @network_section = fog_vapp[:'ovf:NetworkSection'][:'ovf:Network']
  @vms             = Resource::Vms.new(fog_vapp[:Children][:Vm])
  @metadata = Vcloud::Core::Vapp.(id)
end

Instance Attribute Details

#deployedObject (readonly)

Returns the value of attribute deployed.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def deployed
  @deployed
end

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def 
  @metadata
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def name
  @name
end

#network_configObject (readonly)

Returns the value of attribute network_config.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def network_config
  @network_config
end

#network_sectionObject (readonly)

Returns the value of attribute network_section.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def network_section
  @network_section
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def status
  @status
end

#vmsObject (readonly)

Returns the value of attribute vms.



5
6
7
# File 'lib/vcloud/walker/resource/vapp.rb', line 5

def vms
  @vms
end