Sha256: e349cf3273ba115a7f924c4437f54dd2618b86230c1ca824b6c60fdc9f264bd4
Contents?: true
Size: 1.41 KB
Versions: 7
Compression:
Stored size: 1.41 KB
Contents
module Fog module Volume class OpenStack class Real def list_volumes_detailed(options = {}) request( :expects => 200, :method => 'GET', :path => 'volumes/detail', :query => options ) end end class Mock def list_volumes_detailed(options = {}) response = Excon::Response.new response.status = 200 self.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' => self.data[:volumes] } response end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems