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

[openstack|compute] Update Mocks for Volumes

Signed-off-by: Nelvin Driz <nelvindriz@live.com>
This commit is contained in:
Nelvin Driz 2012-04-01 21:19:27 +08:00
parent 1a4908703c
commit c9b04b47c9

View file

@ -21,19 +21,30 @@ module Fog
response = Excon::Response.new
response.status = 200
response.body = {
'volumes' => [
{ 'id' => '1',
'displayName' => Fog::Mock.random_letters(rand(8) + 5),
'displayDescription' => Fog::Mock.random_letters(rand(12) + 10),
'size' => 3,
'status' => 'online',
'snapshotId' => '4',
'volumeType' => nil,
'availabilityZone' => 'nova',
'createdAt' => Time.now,
'attchments' => []}
]
}
"volumes" => [
{ "status" => "available",
"displayDescription" => "",
"availabilityZone" => "nova",
"displayName" => "WD",
"attachments" => [{}],
"volumeType" => nil,
"snapshotId" => nil,
"size" => 1,
"id" => 6,
"createdAt" => "2012-03-30 05:31:00.655058",
"metadata" => {} },
{ "status" => "available",
"displayDescription" => "",
"availabilityZone" => "nova",
"displayName" => "test",
"attachments" => [{}],
"volumeType" => nil,
"snapshotId" => nil,
"size" => 1,
"id" => 8,
"createdAt" => "2012-03-30 16:14:55.582717",
"metadata" => {} }
] }
response
end
end