Sha256: b4e456c469c2c8a245fd49fca1ddf19d15282fd2921880575841016d399b658a

Contents?: true

Size: 927 Bytes

Versions: 2

Compression:

Stored size: 927 Bytes

Contents

# coding: utf-8

module Fog
  module Compute
    class SakuraCloud
      class Real
        def list_zones(options = {})
          request(
            :headers => {
              'Authorization' => "Basic #{@auth_encode}"
            },
            :method => 'GET',
            :path => "#{Fog::SakuraCloud::SAKURACLOUD_API_ENDPOINT}/zone"
          )
        end
      end

      class Mock
        def list_zones(options = {})
          response = Excon::Response.new
          response.status = 200
          response.body = {
          "Zones" =>
            [
            {"Index"=>0,
               "ID"=>31001,
               "Name"=>"is1a",
               "Description"=>"石狩第1ゾーン"},
            {"Index"=>1,
               "ID"=>31002,
               "Name"=>"is1b",
               "Description"=>"石狩第2ゾーン"}
            ]
          }
          response
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-sakuracloud-1.4.0 lib/fog/sakuracloud/requests/compute/list_zones.rb
fog-sakuracloud-1.3.3 lib/fog/sakuracloud/requests/compute/list_zones.rb