2011-06-16 19:28:54 -04:00
|
|
|
Shindo.tests('Fog::Compute[:linode] | kernel requests', ['linode']) do
|
2011-03-17 16:12:31 -04:00
|
|
|
|
|
|
|
@kernels_format = Linode::Compute::Formats::BASIC.merge({
|
|
|
|
'DATA' => [{
|
|
|
|
'LABEL' => String,
|
|
|
|
'ISXEN' => Integer,
|
|
|
|
'ISPVOPS' => Integer,
|
|
|
|
'KERNELID' => Integer
|
|
|
|
}]
|
|
|
|
})
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
@kernel_id = nil
|
|
|
|
|
|
|
|
tests('#avail_kernels').formats(@kernels_format) do
|
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
data = Fog::Compute[:linode].avail_kernels.body
|
2011-03-17 16:12:31 -04:00
|
|
|
@kernel_id = data['DATA'].first['KERNELID']
|
|
|
|
data
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("@avail_kernels(#{@kernel_id})").formats(@kernels_format) do
|
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:linode].avail_kernels(@kernel_id).body
|
2011-03-17 16:12:31 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|