Sha256: 6e1d114d8537e9fefc301d942058172c26b7323ff47f6fb86f828b2077fa6d01

Contents?: true

Size: 785 Bytes

Versions: 2

Compression:

Stored size: 785 Bytes

Contents

# coding: utf-8

module Fog
  module DNS
    class SakuraCloud
      class Real
        def list_zones(options = {})
          filter = {
            "Filter" => {
              "Provider.Class" => "dns"
            }
          }
          request(
            :headers => {
              'Authorization' => "Basic #{@auth_encode}"
            },
            :method => 'GET',
            :path => "#{Fog::SakuraCloud::SAKURACLOUD_API_ENDPOINT}/commonserviceitem",
            :query => URI.encode(Fog::JSON.encode(filter))
          )
        end
      end

      class Mock
        def list_zones(options = {})
          response = Excon::Response.new
          response.status = 200
          response.body = {
          }
          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/dns/list_zones.rb
fog-sakuracloud-1.3.3 lib/fog/sakuracloud/requests/dns/list_zones.rb