Sha256: c3e9be99146e1ea7c391b09d3ed56601abd2895bb5ee0a9c1b604cdff003d102

Contents?: true

Size: 1.24 KB

Versions: 29

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_encord}"
            },
            :method => 'GET',
            :path => "#{Fog::SakuraCloud::SAKURACLOUD_API_ENDPOINT}/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

29 entries across 29 versions & 4 rubygems

Version Path
fog-sakuracloud-1.3.2 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.3.1 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.3.0 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.2.0 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.1.1 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.1.0 lib/fog/sakuracloud/requests/volume/list_disks.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-sakuracloud-1.0.1/lib/fog/sakuracloud/requests/volume/list_disks.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.0.1 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-1.0.0 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-0.1.2 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-0.1.1 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-0.1.0 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-0.0.4 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-0.0.3 lib/fog/sakuracloud/requests/volume/list_disks.rb
fog-sakuracloud-0.0.1 lib/fog/sakuracloud/requests/volume/list_disks.rb
ns-fog-1.22.11 lib/fog/sakuracloud/requests/volume/list_disks.rb
ns-fog-1.22.10 lib/fog/sakuracloud/requests/volume/list_disks.rb
ns-fog-1.22.9 lib/fog/sakuracloud/requests/volume/list_disks.rb
ns-fog-1.22.8 lib/fog/sakuracloud/requests/volume/list_disks.rb