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

[hp|block_storage_v2] Fix status for request methods.

This commit is contained in:
Rupak Ganguly 2013-05-24 18:40:13 -04:00
parent db95a16cb2
commit d1d4d9eca9
2 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,7 @@ module Fog
request(
:body => Fog::JSON.encode(data),
:expects => 200,
:expects => 202,
:method => 'POST',
:path => 'backups'
)
@ -69,7 +69,7 @@ module Fog
'links' => [{'href'=>"http://cinder:8776/v1/#{tenant_id}/backups/#{id}", 'rel'=>'self'}, {'href'=>"http://cinder:8776/v1/#{tenant_id}/backups/#{id}", 'rel'=>'bookmark'}]
}
self.data[:volume_backups][data['id']] = data
response.status = 200
response.status = 202
response.body = { 'backup' => resp_data }
response
else

View file

@ -27,7 +27,7 @@ module Fog
request(
:body => Fog::JSON.encode(data),
:expects => 200,
:expects => 202,
:method => 'POST',
:path => "backups/#{backup_id}/restore"
)
@ -54,7 +54,7 @@ module Fog
end
else
# create a new volume and restore the backup
new_vol = create_volume('display_name' => 'restore_vol', 'size' => 1).body
new_vol = create_volume('display_name' => 'restore_backup', 'size' => 1).body
new_vol_id = new_vol['volume']['id']
data = copy_volume_data(new_vol_id, volume_to_restore)
resp_volume_id = new_vol_id