Class: Fog::NewServers::Mock

Inherits:
Object
  • Object
show all
Includes:
Collections
Defined in:
lib/fog/new_servers.rb,
lib/fog/new_servers/requests/add_server.rb,
lib/fog/new_servers/requests/get_server.rb,
lib/fog/new_servers/requests/list_plans.rb,
lib/fog/new_servers/requests/list_images.rb,
lib/fog/new_servers/requests/list_servers.rb,
lib/fog/new_servers/requests/cancel_server.rb,
lib/fog/new_servers/requests/reboot_server.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



36
37
38
39
# File 'lib/fog/new_servers.rb', line 36

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

Class Method Details

.dataObject



24
25
26
27
28
# File 'lib/fog/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/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



33
34
35
# File 'lib/fog/new_servers/requests/add_server.rb', line 33

def add_server(server_id)
  Fog::Mock.not_implemented
end

#cancel_server(server_id) ⇒ Object



30
31
32
# File 'lib/fog/new_servers/requests/cancel_server.rb', line 30

def cancel_server(server_id)
  Fog::Mock.not_implemented
end

#get_server(server_id) ⇒ Object



36
37
38
# File 'lib/fog/new_servers/requests/get_server.rb', line 36

def get_server(server_id)
  Fog::Mock.not_implemented
end

#list_imagesObject



27
28
29
# File 'lib/fog/new_servers/requests/list_images.rb', line 27

def list_images
  Fog::Mock.not_implemented
end

#list_plansObject



30
31
32
# File 'lib/fog/new_servers/requests/list_plans.rb', line 30

def list_plans
  Fog::Mock.not_implemented
end

#list_serversObject



36
37
38
# File 'lib/fog/new_servers/requests/list_servers.rb', line 36

def list_servers
  Fog::Mock.not_implemented
end

#reboot_server(server_id) ⇒ Object



24
25
26
# File 'lib/fog/new_servers/requests/reboot_server.rb', line 24

def reboot_server(server_id)
  Fog::Mock.not_implemented
end