Sha256: b17875115e28dd2893468b15559cda35218042dbf1d6b06269f67afa2673f43d

Contents?: true

Size: 1.14 KB

Versions: 14

Compression:

Stored size: 1.14 KB

Contents

module Fog
  module DNS
    class Google
      ##
      # Fetches the representation of an existing Project. Use this method to look up the limits on the number of
      # resources that are associated with your project.
      #
      # @see https://developers.google.com/cloud-dns/api/v1/projects/get
      class Real
        def get_project(identity)
          api_method = @dns.projects.get
          parameters = {
            :project => identity
          }

          request(api_method, parameters)
        end
      end

      class Mock
        def get_project(identity)
          body = {
            "kind" => 'dns#project',
            "number" => Fog::Mock.random_numbers(12).to_s,
            "id" => identity,
            "quota" => {
              "kind" => 'dns#quota',
              "managedZones" => 100,
              "rrsetsPerManagedZone" => 10_000,
              "rrsetAdditionsPerChange" => 100,
              "rrsetDeletionsPerChange" => 100,
              "totalRrdataSizePerChange" => 10_000,
              "resourceRecordsPerRrset" => 20
            }
          }

          build_excon_response(body)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/dns/google/requests/get_project.rb
fog-google-0.5.5 lib/fog/dns/google/requests/get_project.rb
fog-google-0.5.4 lib/fog/dns/google/requests/get_project.rb
fog-google-0.5.3 lib/fog/dns/google/requests/get_project.rb
fog-google-0.5.2 lib/fog/dns/google/requests/get_project.rb
fog-google-0.5.1 lib/fog/dns/google/requests/get_project.rb
fog-google-0.5.0 lib/fog/dns/google/requests/get_project.rb
fog-google-0.4.2 lib/fog/dns/google/requests/get_project.rb
fog-google-0.4.1 lib/fog/dns/google/requests/get_project.rb
fog-google-0.4.0 lib/fog/dns/google/requests/get_project.rb
fog-google-0.3.2 lib/fog/dns/google/requests/get_project.rb
fog-google-0.3.1 lib/fog/dns/google/requests/get_project.rb
fog-google-0.3.0 lib/fog/dns/google/requests/get_project.rb
fog-google-0.2.0 lib/fog/dns/google/requests/get_project.rb