1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Change flavorId to flavorRef and imageId to imageRef as the specs changed. Also, change expected status to be 202 instead of 200.

This commit is contained in:
Rupak Ganguly 2011-10-18 11:16:37 -04:00
parent 7e1a287e4d
commit d1172a6bd3

View file

@ -36,8 +36,8 @@ module Fog
def create_server(flavor_id, image_id, options = {})
data = {
'server' => {
'flavorId' => flavor_id,
'imageId' => image_id
'flavorRef' => flavor_id,
'imageRef' => image_id
}
}
if options['metadata']
@ -57,7 +57,7 @@ module Fog
end
request(
:body => MultiJson.encode(data),
:expects => 200,
:expects => 202,
:method => 'POST',
:path => 'servers.json'
)
@ -69,7 +69,7 @@ module Fog
def create_server(flavor_id, image_id, options = {})
response = Excon::Response.new
response.status = 200
response.status = 202
data = {
'addresses' => { 'private' => ['0.0.0.0'], 'public' => ['0.0.0.0'] },