Class: Fog::Terremark::Mock

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.


56
57
58
59
# File 'lib/fog/terremark.rb', line 56

def initialize(options={})
  @terremark_username = options[:terremark_username]
  @data = self.class.data[@terremark_username]
end

Class Method Details

.dataObject


44
45
46
47
48
# File 'lib/fog/terremark.rb', line 44

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {}
  end
end

.reset_data(keys = data.keys) ⇒ Object


50
51
52
53
54
# File 'lib/fog/terremark.rb', line 50

def self.reset_data(keys=data.keys)
  for key in [*keys]
    data.delete(key)
  end
end

Instance Method Details

#add_internet_service(ip_id) ⇒ Object

Raises:


57
58
59
# File 'lib/fog/terremark/requests/add_internet_service.rb', line 57

def add_internet_service(ip_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#add_node_service(ip) ⇒ Object

Raises:


57
58
59
# File 'lib/fog/terremark/requests/add_node_service.rb', line 57

def add_node_service(ip)
  raise MockNotImplemented.new("Contributions welcome!")
end

#create_internet_service(vdc_id) ⇒ Object

Raises:


57
58
59
# File 'lib/fog/terremark/requests/create_internet_service.rb', line 57

def create_internet_service(vdc_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#delete_internet_service(internet_service_id) ⇒ Object

Raises:


34
35
36
# File 'lib/fog/terremark/requests/delete_internet_service.rb', line 34

def delete_internet_service(internet_service_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#delete_node_service(node_id) ⇒ Object

Raises:


34
35
36
# File 'lib/fog/terremark/requests/delete_node_service.rb', line 34

def delete_node_service(node_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#delete_vapp(vapp_id) ⇒ Object

Raises:


34
35
36
# File 'lib/fog/terremark/requests/delete_vapp.rb', line 34

def delete_vapp(vapp_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#deploy_vapp(vapp_id) ⇒ Object

Raises:


37
38
39
# File 'lib/fog/terremark/requests/deploy_vapp.rb', line 37

def deploy_vapp(vapp_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_catalog(vdc_id) ⇒ Object

Raises:


34
35
36
# File 'lib/fog/terremark/requests/get_catalog.rb', line 34

def get_catalog(vdc_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_catalog_item(catalog_item_id) ⇒ Object

Raises:


37
38
39
# File 'lib/fog/terremark/requests/get_catalog_item.rb', line 37

def get_catalog_item(catalog_item_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_organization(organization_id) ⇒ Object

Raises:


36
37
38
# File 'lib/fog/terremark/requests/get_organization.rb', line 36

def get_organization(organization_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_organizationsObject

Raises:


31
32
33
# File 'lib/fog/terremark/requests/get_organizations.rb', line 31

def get_organizations
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_public_ips(vdc_id) ⇒ Object

Raises:


31
32
33
# File 'lib/fog/terremark/requests/get_public_ips.rb', line 31

def get_public_ips(vdc_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_task(task_id) ⇒ Object

Raises:


41
42
43
# File 'lib/fog/terremark/requests/get_task.rb', line 41

def get_task(task_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_tasks_list(tasks_list_id) ⇒ Object

Raises:


34
35
36
# File 'lib/fog/terremark/requests/get_tasks_list.rb', line 34

def get_tasks_list(tasks_list_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_vapp(vapp_id) ⇒ Object

Raises:


44
45
46
# File 'lib/fog/terremark/requests/get_vapp.rb', line 44

def get_vapp(vapp_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_vapp_template(vapp_template_id) ⇒ Object

Raises:


37
38
39
# File 'lib/fog/terremark/requests/get_vapp_template.rb', line 37

def get_vapp_template(vapp_template_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#get_vdc(vdc_id) ⇒ Object

Raises:


37
38
39
# File 'lib/fog/terremark/requests/get_vdc.rb', line 37

def get_vdc(vdc_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#instatiate_vapp_template(vapp_template_id) ⇒ Object

Raises:


108
109
110
# File 'lib/fog/terremark/requests/instantiate_vapp_template.rb', line 108

def instatiate_vapp_template(vapp_template_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#power_off(vapp_id) ⇒ Object

Raises:


37
38
39
# File 'lib/fog/terremark/requests/power_off.rb', line 37

def power_off(vapp_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#power_on(vapp_id) ⇒ Object

Raises:


37
38
39
# File 'lib/fog/terremark/requests/power_on.rb', line 37

def power_on(vapp_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#reset(vapp_id) ⇒ Object

Raises:


37
38
39
# File 'lib/fog/terremark/requests/reset.rb', line 37

def reset(vapp_id)
  raise MockNotImplemented.new("Contributions welcome!")
end

#shutdown(vapp_id) ⇒ Object

Raises:


37
38
39
# File 'lib/fog/terremark/requests/shutdown.rb', line 37

def shutdown(vapp_id)
  raise MockNotImplemented.new("Contributions welcome!")
end