mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Kernel api has been deprecated.
This commit is contained in:
parent
bded73bfb3
commit
a7badd8cdc
4 changed files with 1 additions and 95 deletions
|
@ -15,7 +15,6 @@ module Fog
|
|||
request :list_disks
|
||||
request :list_firewalls
|
||||
request :list_images
|
||||
request :list_kernels
|
||||
request :list_machine_types
|
||||
request :list_networks
|
||||
request :list_operations
|
||||
|
@ -25,7 +24,6 @@ module Fog
|
|||
request :get_disk
|
||||
request :get_firewall
|
||||
request :get_image
|
||||
request :get_kernel
|
||||
request :get_machine_type
|
||||
request :get_network
|
||||
request :get_operation
|
||||
|
@ -99,6 +97,7 @@ module Fog
|
|||
|
||||
def build_result(api_method, parameters, body_object=nil)
|
||||
if body_object
|
||||
#p api_method, parameters
|
||||
result = @client.execute(
|
||||
:api_method => api_method,
|
||||
:parameters => parameters,
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
module Fog
|
||||
module Compute
|
||||
class Google
|
||||
|
||||
class Mock
|
||||
|
||||
def get_kernel(kernel_name)
|
||||
Fog::Mock.not_implemented
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Real
|
||||
|
||||
def get_kernel(kernel_name)
|
||||
api_method = @compute.kernels.get
|
||||
parameters = {
|
||||
'project' => 'google',
|
||||
'kernel' => kernel_name
|
||||
}
|
||||
|
||||
result = self.build_result(api_method, parameters)
|
||||
response = self.build_response(result)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,29 +0,0 @@
|
|||
module Fog
|
||||
module Compute
|
||||
class Google
|
||||
|
||||
class Mock
|
||||
|
||||
def list_kernels
|
||||
Fog::Mock.not_implemented
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Real
|
||||
|
||||
def list_kernels
|
||||
api_method = @compute.kernels.list
|
||||
parameters = {
|
||||
'project' => 'google'
|
||||
}
|
||||
|
||||
result = self.build_result(api_method, parameters)
|
||||
response = self.build_response(result)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,34 +0,0 @@
|
|||
Shindo.tests('Fog::Compute[:google] | kernel requests', ['google']) do
|
||||
|
||||
@google = Fog::Compute[:google]
|
||||
|
||||
@get_kernel_format = {
|
||||
'kind' => String,
|
||||
'id' => String,
|
||||
'selfLink' => String,
|
||||
'creationTimestamp' => String,
|
||||
'name' => String,
|
||||
'description' => String
|
||||
}
|
||||
|
||||
@list_kernels_format = {
|
||||
'kind' => String,
|
||||
'id' => String,
|
||||
'selfLink' => String,
|
||||
'items' => []
|
||||
}
|
||||
|
||||
tests('success') do
|
||||
|
||||
tests("#get_kernel").formats(@get_kernel_format) do
|
||||
kernel_name = @google.list_kernels.body["items"][0]["name"]
|
||||
@google.get_kernel(kernel_name).body
|
||||
end
|
||||
|
||||
tests("#list_kernels").formats(@list_kernels_format) do
|
||||
@google.list_kernels.body
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue