12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/fog/volume/huaweicloud/v1/requests/list_volumes.rb', line 12
def list_volumes(_options = true, _options_deprecated = {})
response = Excon::Response.new
response.status = 200
data[:volumes] ||= [
{"status" => "available",
"display_description" => "test 1 desc",
"availability_zone" => "nova",
"display_name" => "Volume1",
"attachments" => [{}],
"volume_type" => nil,
"snapshot_id" => nil,
"size" => 1,
"id" => 1,
"created_at" => Time.now,
"metadata" => {}},
{"status" => "available",
"display_description" => "test 2 desc",
"availability_zone" => "nova",
"display_name" => "Volume2",
"attachments" => [{}],
"volume_type" => nil,
"snapshot_id" => nil,
"size" => 1,
"id" => 2,
"created_at" => Time.now,
"metadata" => {}}
]
response.body = {'volumes' => data[:volumes]}
response
end
|