Class: Fog::NewServers::Compute::Mock
- Inherits:
-
Object
- Object
- Fog::NewServers::Compute::Mock
- Defined in:
- lib/fog/new_servers/compute.rb,
lib/fog/new_servers/requests/compute/add_server.rb,
lib/fog/new_servers/requests/compute/get_server.rb,
lib/fog/new_servers/requests/compute/list_plans.rb,
lib/fog/new_servers/requests/compute/list_images.rb,
lib/fog/new_servers/requests/compute/list_servers.rb,
lib/fog/new_servers/requests/compute/cancel_server.rb,
lib/fog/new_servers/requests/compute/reboot_server.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add_server(server_id) ⇒ Object
- #cancel_server(server_id) ⇒ Object
- #get_server(server_id) ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #list_images ⇒ Object
- #list_plans ⇒ Object
- #list_servers ⇒ Object
- #reboot_server(server_id) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
35 36 37 38 |
# File 'lib/fog/new_servers/compute.rb', line 35 def initialize(={}) @new_server_username = [:new_servers_username] @data = self.class.data[@new_server_username] end |
Class Method Details
.data ⇒ Object
23 24 25 26 27 |
# File 'lib/fog/new_servers/compute.rb', line 23 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
29 30 31 32 33 |
# File 'lib/fog/new_servers/compute.rb', line 29 def self.reset_data(keys=data.keys) for key in [*keys] data.delete(key) end end |
Instance Method Details
#add_server(server_id) ⇒ Object
34 35 36 |
# File 'lib/fog/new_servers/requests/compute/add_server.rb', line 34 def add_server(server_id) Fog::Mock.not_implemented end |
#cancel_server(server_id) ⇒ Object
31 32 33 |
# File 'lib/fog/new_servers/requests/compute/cancel_server.rb', line 31 def cancel_server(server_id) Fog::Mock.not_implemented end |
#get_server(server_id) ⇒ Object
37 38 39 |
# File 'lib/fog/new_servers/requests/compute/get_server.rb', line 37 def get_server(server_id) Fog::Mock.not_implemented end |
#list_images ⇒ Object
28 29 30 |
# File 'lib/fog/new_servers/requests/compute/list_images.rb', line 28 def list_images Fog::Mock.not_implemented end |
#list_plans ⇒ Object
31 32 33 |
# File 'lib/fog/new_servers/requests/compute/list_plans.rb', line 31 def list_plans Fog::Mock.not_implemented end |
#list_servers ⇒ Object
37 38 39 |
# File 'lib/fog/new_servers/requests/compute/list_servers.rb', line 37 def list_servers Fog::Mock.not_implemented end |
#reboot_server(server_id) ⇒ Object
25 26 27 |
# File 'lib/fog/new_servers/requests/compute/reboot_server.rb', line 25 def reboot_server(server_id) Fog::Mock.not_implemented end |