Sha256: be6268991409fc1742a7b241627985e65d6b9c2265ae73afdc7474afafaee1df

Contents?: true

Size: 1.14 KB

Versions: 7

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' => 10000,
              'rrsetAdditionsPerChange' => 100,
              'rrsetDeletionsPerChange'=>100,
              'totalRrdataSizePerChange' => 10000,
              'resourceRecordsPerRrset' => 20,
            }
          }

          build_excon_response(body)
        end
      end
    end
  end
end

Version data entries

7 entries across 5 versions & 2 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-google-0.1.0/lib/fog/google/requests/dns/get_project.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-google-0.1.0/lib/fog/google/requests/dns/get_project.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/lib/fog/google/requests/dns/get_project.rb
fog-google-0.1.3 lib/fog/google/requests/dns/get_project.rb
fog-google-0.1.2 lib/fog/google/requests/dns/get_project.rb
fog-google-0.1.1 lib/fog/google/requests/dns/get_project.rb
fog-google-0.1.0 lib/fog/google/requests/dns/get_project.rb