Class: Fog::Vcloud::Terremark::Ecloud::Vdc

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/vcloud/terremark/ecloud/models/vdc.rb

Instance Attribute Summary

Attributes inherited from Model

#loaded

Attributes inherited from Model

#connection

Instance Method Summary collapse

Methods inherited from Model

#load_unless_loaded!, #reload

Methods inherited from Model

#collection, #initialize, #inspect, #reload, #to_json, #wait_for

Methods included from Attributes::ClassMethods

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

Methods included from Attributes::InstanceMethods

#_dump, #attributes, #identity, #identity=, #merge_attributes, #new_record?, #requires

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#catalogObject



52
53
54
55
56
# File 'lib/fog/vcloud/terremark/ecloud/models/vdc.rb', line 52

def catalog
  @catalog ||= Fog::Vcloud::Terremark::Ecloud::Catalog.
    new( :connection => connection,
         :href => href + "/catalog" )
end

#internet_servicesObject



28
29
30
31
32
# File 'lib/fog/vcloud/terremark/ecloud/models/vdc.rb', line 28

def internet_services
  @internet_services ||= Fog::Vcloud::Terremark::Ecloud::InternetServices.
    new( :connection => connection,
         :href => href.to_s.gsub('vdc','extensions/vdc') + "/internetServices" )
end

#networksObject



34
35
36
37
38
# File 'lib/fog/vcloud/terremark/ecloud/models/vdc.rb', line 34

def networks
  @networks ||= Fog::Vcloud::Terremark::Ecloud::Networks.
    new( :connection => connection,
         :href => href )
end

#public_ipsObject



22
23
24
25
26
# File 'lib/fog/vcloud/terremark/ecloud/models/vdc.rb', line 22

def public_ips
  load_unless_loaded!
  @public_ips ||= Fog::Vcloud::Terremark::Ecloud::PublicIps.new( :connection => connection,
                                                                 :href => other_links.detect { |link| link[:type] == "application/vnd.tmrk.ecloud.publicIpsList+xml" }[:href] )
end

#serversObject



40
41
42
43
44
# File 'lib/fog/vcloud/terremark/ecloud/models/vdc.rb', line 40

def servers
  @servers ||= Fog::Vcloud::Terremark::Ecloud::Servers.
    new( :connection => connection,
         :href => href )
end

#tasksObject



46
47
48
49
50
# File 'lib/fog/vcloud/terremark/ecloud/models/vdc.rb', line 46

def tasks
  @tasks ||= Fog::Vcloud::Terremark::Ecloud::Tasks.
    new( :connection => connection,
         :href => href + "/tasksList" )
end