Class: Fog::NewServers::Compute::Mock
- Inherits:
-
Object
- Object
- Fog::NewServers::Compute::Mock
- Defined in:
- lib/fog/compute/new_servers.rb,
lib/fog/compute/requests/new_servers/add_server.rb,
lib/fog/compute/requests/new_servers/get_server.rb,
lib/fog/compute/requests/new_servers/list_plans.rb,
lib/fog/compute/requests/new_servers/list_images.rb,
lib/fog/compute/requests/new_servers/list_servers.rb,
lib/fog/compute/requests/new_servers/cancel_server.rb,
lib/fog/compute/requests/new_servers/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.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/fog/compute/new_servers.rb', line 36 def initialize(={}) unless .delete(:provider) location = caller.first warning = "[yellow][WARN] Fog::NewServers::Compute.new is deprecated, use Fog::Compute.new(:provider => 'NewServers') instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) end @new_server_username = [:new_servers_username] @data = self.class.data[@new_server_username] end |
Class Method Details
.data ⇒ Object
24 25 26 27 28 |
# File 'lib/fog/compute/new_servers.rb', line 24 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
30 31 32 33 34 |
# File 'lib/fog/compute/new_servers.rb', line 30 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/compute/requests/new_servers/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/compute/requests/new_servers/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/compute/requests/new_servers/get_server.rb', line 37 def get_server(server_id) Fog::Mock.not_implemented end |
#list_images ⇒ Object
28 29 30 |
# File 'lib/fog/compute/requests/new_servers/list_images.rb', line 28 def list_images Fog::Mock.not_implemented end |
#list_plans ⇒ Object
31 32 33 |
# File 'lib/fog/compute/requests/new_servers/list_plans.rb', line 31 def list_plans Fog::Mock.not_implemented end |
#list_servers ⇒ Object
37 38 39 |
# File 'lib/fog/compute/requests/new_servers/list_servers.rb', line 37 def list_servers Fog::Mock.not_implemented end |
#reboot_server(server_id) ⇒ Object
25 26 27 |
# File 'lib/fog/compute/requests/new_servers/reboot_server.rb', line 25 def reboot_server(server_id) Fog::Mock.not_implemented end |