Sha256: e4d12128d962b5964adfec871b763682fbc53022d1abaf821ea58c23af537c8d

Contents?: true

Size: 1.24 KB

Versions: 13

Compression:

Stored size: 1.24 KB

Contents

# coding: utf-8

module Fog
  module Volume
    class SakuraCloud
      class Real
        def list_disks(options = {})
          request(
            :headers => {
              'Authorization' => "Basic #{@auth_encode}"
            },
            :method => 'GET',
            :path => "#{Fog::SakuraCloud.build_endpoint(@api_zone)}/disk"
          )
        end
      end

      class Mock
        def list_disks(options = {})
          response = Excon::Response.new
          response.status = 200
          response.body = {
          "Disks" =>
            [
            {"Index" => 0,
              "ID" =>112600053890,
              "Name" =>"foober1",
              "Connection" => "virtio",
              "Availability"=>"available",
              "SizeMB"=>20480,
              "Plan"=> {},
              "SourceDisk" => nil,
              "SourceArchive" => {}},
            {"Index" => 1,
              "ID" =>112600053891,
              "Name" =>"foober2",
              "Connection"  => "virtio",
              "Availability"=>"available",
              "SizeMB"=>20480,
              "Plan"=> {},
              "SourceDisk" => nil,
              "SourceArchive" => {}}
            ]
          }
          response
        end
      end
    end
  end
end

Version data entries

13 entries across 11 versions & 2 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-sakuracloud-1.7.5/lib/fog/sakuracloud/requests/volume/list_disks.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-sakuracloud-1.7.5/lib/fog/sakuracloud/requests/volume/list_disks.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-sakuracloud-1.7.5/lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.7.5 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.7.4 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.7.3 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.7.2 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.7.1 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.7.0 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.6.0 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.5.2 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.5.1 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.5.0 lib/fog/sakuracloud/requests/volume/list_disks.rb