Sha256: 4f6ddb9415b4a438ba6e1676b50000e6349433c1248ff86d3b3a2b8dcd99c7dc

Contents?: true

Size: 1.23 KB

Versions: 29

Compression:

Stored size: 1.23 KB

Contents

# coding: utf-8

module Fog
  module Volume
    class SakuraCloud
      class Real
        def list_archives(options = {})
          request(
            :headers => {
              'Authorization' => "Basic #{@auth_encord}"
            },
            :method => 'GET',
            :path => "#{Fog::SakuraCloud::SAKURACLOUD_API_ENDPOINT}/archive"
          )
        end
      end

      class Mock
        def list_archives(options = {})
          response = Excon::Response.new
          response.status = 200
          response.body = {
          "Archives" =>
            [
            {"Index"=>0,
              "ID"=>112500514887,
              "Name"=>"CentOS 5.10 64bit (基本セット)",
              "Availability"=>"available",
              "SizeMB"=>20480,
              "Plan"=>{"ID"=>2, "StorageClass"=>"iscsi1204", "Name"=>"標準プラン"}
            },
            {"Index"=>1,
              "ID"=>112500571575,
              "Name"=>"CentOS 6.5 64bit (基本セット)",
              "Availability"=>"available",
              "SizeMB"=>102400,
              "Plan"=>{"ID"=>2, "StorageClass"=>"iscsi1204", "Name"=>"標準プラン"}
            }
            ]
          }
          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_archives.rb
fog-sakuracloud-1.3.1 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-1.3.0 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-1.2.0 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-1.1.1 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-1.1.0 lib/fog/sakuracloud/requests/volume/list_archives.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-sakuracloud-1.0.1/lib/fog/sakuracloud/requests/volume/list_archives.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-1.0.1 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-1.0.0 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-0.1.2 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-0.1.1 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-0.1.0 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-0.0.4 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-0.0.3 lib/fog/sakuracloud/requests/volume/list_archives.rb
fog-sakuracloud-0.0.1 lib/fog/sakuracloud/requests/volume/list_archives.rb
ns-fog-1.22.11 lib/fog/sakuracloud/requests/volume/list_archives.rb
ns-fog-1.22.10 lib/fog/sakuracloud/requests/volume/list_archives.rb
ns-fog-1.22.9 lib/fog/sakuracloud/requests/volume/list_archives.rb
ns-fog-1.22.8 lib/fog/sakuracloud/requests/volume/list_archives.rb