Module: Fog::Terremark

Defined in:
lib/fog/terremark.rb,
lib/fog/terremark/requests/reset.rb,
lib/fog/terremark/requests/get_vdc.rb,
lib/fog/terremark/requests/get_task.rb,
lib/fog/terremark/requests/get_vapp.rb,
lib/fog/terremark/requests/power_on.rb,
lib/fog/terremark/requests/shutdown.rb,
lib/fog/terremark/requests/power_off.rb,
lib/fog/terremark/requests/delete_vapp.rb,
lib/fog/terremark/requests/deploy_vapp.rb,
lib/fog/terremark/requests/get_catalog.rb,
lib/fog/terremark/requests/get_public_ips.rb,
lib/fog/terremark/requests/get_tasks_list.rb,
lib/fog/terremark/requests/add_node_service.rb,
lib/fog/terremark/requests/get_catalog_item.rb,
lib/fog/terremark/requests/get_organization.rb,
lib/fog/terremark/requests/get_organizations.rb,
lib/fog/terremark/requests/get_vapp_template.rb,
lib/fog/terremark/requests/delete_node_service.rb,
lib/fog/terremark/requests/add_internet_service.rb,
lib/fog/terremark/requests/create_internet_service.rb,
lib/fog/terremark/requests/delete_internet_service.rb,
lib/fog/terremark/requests/instantiate_vapp_template.rb

Defined Under Namespace

Classes: Mock, Real

Class Method Summary collapse

Class Method Details

.new(options = {}) ⇒ Object


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/fog/terremark.rb', line 4

def self.new(options={})

  require 'fog/terremark/requests/add_internet_service'
  require 'fog/terremark/requests/add_node_service'
  require 'fog/terremark/requests/create_internet_service'
  require 'fog/terremark/requests/delete_internet_service'
  require 'fog/terremark/requests/delete_node_service'
  require 'fog/terremark/requests/delete_vapp'
  require 'fog/terremark/requests/deploy_vapp'
  require 'fog/terremark/requests/get_catalog'
  require 'fog/terremark/requests/get_catalog_item'
  require 'fog/terremark/requests/get_organization'
  require 'fog/terremark/requests/get_organizations'
  require 'fog/terremark/requests/get_public_ips'
  require 'fog/terremark/requests/get_task'
  require 'fog/terremark/requests/get_tasks_list'
  require 'fog/terremark/requests/get_vapp'
  require 'fog/terremark/requests/get_vapp_template'
  require 'fog/terremark/requests/get_vdc'
  require 'fog/terremark/requests/instantiate_vapp_template'
  require 'fog/terremark/requests/reset'
  require 'fog/terremark/requests/power_off'
  require 'fog/terremark/requests/power_on'
  require 'fog/terremark/requests/shutdown'

  unless options[:terremark_password]
    raise ArgumentError.new('terremark_password is required to access terremark')
  end
  unless options[:terremark_username]
    raise ArgumentError.new('terremark_username is required to access terremark')
  end
  if Fog.mocking?
    Fog::Terremark::Mock.new(options)
  else
    Fog::Terremark::Real.new(options)
  end
end