1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
module Fog
module DNS
class Google < Fog::Service
autoload :Mock, File.expand_path("../google/mock", __FILE__)
autoload :Real, File.expand_path("../google/real", __FILE__)
requires :google_project
recognizes(
:app_name,
:app_version,
:google_application_default,
:google_auth,
:google_client,
:google_client_options,
:google_key_location,
:google_key_string,
:google_json_key_location,
:google_json_key_string
)
GOOGLE_DNS_API_VERSION = "v1".freeze
GOOGLE_DNS_BASE_URL = "https://www.googleapis.com/dns/".freeze
GOOGLE_DNS_API_SCOPE_URLS = %w(https://www.googleapis.com/auth/ndev.clouddns.readwrite).freeze
##
# MODELS
model_path "fog/dns/google/models"
# Zone
model :zone
collection :zones
# Record
model :record
collection :records
# Change
model :change
collection :changes
# Project
model :project
collection :projects
##
# REQUESTS
request_path "fog/dns/google/requests"
# Zone
request :create_managed_zone
request :delete_managed_zone
request :get_managed_zone
request :list_managed_zones
# Record
request :list_resource_record_sets
# Change
request :create_change
request :get_change
request :list_changes
# Project
request :get_project
end
end
end
|