Class: Fog::Vcloud::Compute::Vapp

Inherits:
Model show all
Includes:
Helpers::Status
Defined in:
lib/fog/vcloud/models/compute/vapp.rb

Instance Attribute Summary

Attributes inherited from Model

#loaded

Attributes inherited from Model

#collection, #service

Instance Method Summary collapse

Methods included from Helpers::Status

#friendly_status, #off?, #on?

Methods inherited from Model

has_up, #link_up, #load_unless_loaded!, #reload

Methods inherited from Model

#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for

Methods included from Attributes::ClassMethods

#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes

Methods included from Core::DeprecatedConnectionAccessors

#connection, #connection=, #prepare_service_value

Methods included from Attributes::InstanceMethods

#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#networksObject



34
35
36
37
38
39
# File 'lib/fog/vcloud/models/compute/vapp.rb', line 34

def networks
  @networks ||= Fog::Vcloud::Compute::Networks.
    new( :service => service,
         :href => href
    )
end

#ready?Boolean

Returns:

  • (Boolean)


41
42
43
44
# File 'lib/fog/vcloud/models/compute/vapp.rb', line 41

def ready?
  reload_status # always ensure we have the correct status
  status != '0'
end

#serversObject



26
27
28
29
30
31
32
# File 'lib/fog/vcloud/models/compute/vapp.rb', line 26

def servers
  @servers ||= Fog::Vcloud::Compute::Servers.
    new( :service => service,
         :href => href,
         :vapp => self
    )
end