1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

git grep -l "DNS::AWS" -- lib/ | xargs sed -i "" "s/DNS::AWS/AWS::DNS/g"

This commit is contained in:
sue445 2018-09-14 23:09:08 +09:00
parent 0b8bd964bb
commit f9cc6bf2b1
15 changed files with 27 additions and 27 deletions

View file

@ -77,7 +77,7 @@ module Fog
# :aws_secret_access_key in order to create a connection
#
# ==== Examples
# dns = Fog::DNS::AWS.new(
# dns = Fog::AWS::DNS.new(
# :aws_access_key_id => your_aws_access_key_id,
# :aws_secret_access_key => your_aws_secret_access_key
# )
@ -147,9 +147,9 @@ module Fog
else
raise case match[:code]
when 'NoSuchHostedZone', 'NoSuchChange' then
Fog::DNS::AWS::NotFound.slurp(error, match[:message])
Fog::AWS::DNS::NotFound.slurp(error, match[:message])
else
Fog::DNS::AWS::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
Fog::AWS::DNS::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
end
end
end

View file

@ -15,7 +15,7 @@ module Fog
attribute :zone
model Fog::DNS::AWS::Record
model Fog::AWS::DNS::Record
def all(options = {})
requires :zone
@ -99,7 +99,7 @@ module Fog
record
end
end.compact.first
rescue Fog::DNS::AWS::NotFound
rescue Fog::AWS::DNS::NotFound
nil
end

View file

@ -20,7 +20,7 @@ module Fog
def records
@records ||= begin
Fog::DNS::AWS::Records.new(
Fog::AWS::DNS::Records.new(
:zone => self,
:service => service
)

View file

@ -7,7 +7,7 @@ module Fog
attribute :marker, :aliases => 'Marker'
attribute :max_items, :aliases => 'MaxItems'
model Fog::DNS::AWS::Zone
model Fog::AWS::DNS::Zone
def all(options = {})
options[:marker] ||= marker unless marker.nil?
@ -19,7 +19,7 @@ module Fog
def get(zone_id)
data = service.get_hosted_zone(zone_id).body
new(data)
rescue Fog::DNS::AWS::NotFound
rescue Fog::AWS::DNS::NotFound
nil
end
end

View file

@ -198,7 +198,7 @@ module Fog
request({
:body => body,
:idempotent => true,
:parser => Fog::Parsers::DNS::AWS::ChangeResourceRecordSets.new,
:parser => Fog::Parsers::AWS::DNS::ChangeResourceRecordSets.new,
:expects => 200,
:method => 'POST',
:path => "hostedzone/#{zone_id}/rrset"
@ -302,10 +302,10 @@ module Fog
}
response
else
raise Fog::DNS::AWS::Error.new("InvalidChangeBatch => #{errors.join(", ")}")
raise Fog::AWS::DNS::Error.new("InvalidChangeBatch => #{errors.join(", ")}")
end
else
raise Fog::DNS::AWS::NotFound.new("NoSuchHostedZone => A hosted zone with the specified hosted zone ID does not exist.")
raise Fog::AWS::DNS::NotFound.new("NoSuchHostedZone => A hosted zone with the specified hosted zone ID does not exist.")
end
end
end

View file

@ -55,7 +55,7 @@ module Fog
:expects => 201,
:method => 'POST',
:path => 'healthcheck',
:parser => Fog::Parsers::DNS::AWS::HealthCheck.new
:parser => Fog::Parsers::AWS::DNS::HealthCheck.new
})
end
end

View file

@ -48,7 +48,7 @@ module Fog
request({
:body => %Q{<?xml version="1.0" encoding="UTF-8"?><CreateHostedZoneRequest xmlns="https://route53.amazonaws.com/doc/#{@version}/"><Name>#{name}</Name>#{optional_tags}</CreateHostedZoneRequest>},
:parser => Fog::Parsers::DNS::AWS::CreateHostedZone.new,
:parser => Fog::Parsers::AWS::DNS::CreateHostedZone.new,
:expects => 201,
:method => 'POST',
:path => "hostedzone"
@ -102,7 +102,7 @@ module Fog
}
response
else
raise Fog::DNS::AWS::Error.new("DelegationSetNotAvailable => Amazon Route 53 allows some duplication, but Amazon Route 53 has a maximum threshold of duplicated domains. This error is generated when you reach that threshold. In this case, the error indicates that too many hosted zones with the given domain name exist. If you want to create a hosted zone and Amazon Route 53 generates this error, contact Customer Support.")
raise Fog::AWS::DNS::Error.new("DelegationSetNotAvailable => Amazon Route 53 allows some duplication, but Amazon Route 53 has a maximum threshold of duplicated domains. This error is generated when you reach that threshold. In this case, the error indicates that too many hosted zones with the given domain name exist. If you want to create a hosted zone and Amazon Route 53 generates this error, contact Customer Support.")
end
end
end

View file

@ -24,7 +24,7 @@ module Fog
request({
:expects => 200,
:parser => Fog::Parsers::DNS::AWS::DeleteHostedZone.new,
:parser => Fog::Parsers::AWS::DNS::DeleteHostedZone.new,
:method => 'DELETE',
:path => "hostedzone/#{zone_id}"
})
@ -37,7 +37,7 @@ module Fog
def delete_hosted_zone(zone_id)
response = Excon::Response.new
key = [zone_id, "/hostedzone/#{zone_id}"].find { |k| !self.data[:zones][k].nil? } ||
raise(Fog::DNS::AWS::NotFound.new("NoSuchHostedZone => A hosted zone with the specified hosted zone does not exist."))
raise(Fog::AWS::DNS::NotFound.new("NoSuchHostedZone => A hosted zone with the specified hosted zone does not exist."))
change = {
:id => Fog::AWS::Mock.change_id,

View file

@ -23,7 +23,7 @@ module Fog
request({
:expects => 200,
:parser => Fog::Parsers::DNS::AWS::GetChange.new,
:parser => Fog::Parsers::AWS::DNS::GetChange.new,
:method => 'GET',
:path => "change/#{change_id}"
})
@ -36,7 +36,7 @@ module Fog
# find the record with matching change_id
# records = data[:zones].values.map{|z| z[:records].values.map{|r| r.values}}.flatten
change = self.data[:changes][change_id] ||
raise(Fog::DNS::AWS::NotFound.new("NoSuchChange => Could not find resource with ID: #{change_id}"))
raise(Fog::AWS::DNS::NotFound.new("NoSuchChange => Could not find resource with ID: #{change_id}"))
response.status = 200
submitted_at = Time.parse(change[:submitted_at])

View file

@ -30,7 +30,7 @@ module Fog
def get_health_check(id)
request({
:expects => 200,
:parser => Fog::Parsers::DNS::AWS::HealthCheck.new,
:parser => Fog::Parsers::AWS::DNS::HealthCheck.new,
:method => 'GET',
:path => "healthcheck/#{id}"
})

View file

@ -29,7 +29,7 @@ module Fog
:expects => 200,
:idempotent => true,
:method => 'GET',
:parser => Fog::Parsers::DNS::AWS::GetHostedZone.new,
:parser => Fog::Parsers::AWS::DNS::GetHostedZone.new,
:path => "hostedzone/#{zone_id}"
})
end
@ -51,7 +51,7 @@ module Fog
}
response
else
raise Fog::DNS::AWS::NotFound.new("NoSuchHostedZone => A hosted zone with the specified hosted zone ID does not exist.")
raise Fog::AWS::DNS::NotFound.new("NoSuchHostedZone => A hosted zone with the specified hosted zone ID does not exist.")
end
end
end

View file

@ -26,7 +26,7 @@ module Fog
:expects => 200,
:method => 'GET',
:path => "healthcheck",
:parser => Fog::Parsers::DNS::AWS::ListHealthChecks.new
:parser => Fog::Parsers::AWS::DNS::ListHealthChecks.new
})
end
end

View file

@ -38,7 +38,7 @@ module Fog
request({
:query => parameters,
:parser => Fog::Parsers::DNS::AWS::ListHostedZones.new,
:parser => Fog::Parsers::AWS::DNS::ListHostedZones.new,
:expects => 200,
:method => 'GET',
:path => "hostedzone"

View file

@ -51,7 +51,7 @@ module Fog
:expects => 200,
:idempotent => true,
:method => 'GET',
:parser => Fog::Parsers::DNS::AWS::ListResourceRecordSets.new,
:parser => Fog::Parsers::AWS::DNS::ListResourceRecordSets.new,
:path => "hostedzone/#{zone_id}/rrset",
:query => parameters
})
@ -64,7 +64,7 @@ module Fog
tmp_records.push(record) if !record[:name].nil? && ( name.nil? || record[:name].gsub(zone[:name],"") >= name)
record.each do |key,subr|
if subr.is_a?(Hash) && key.is_a?(String) &&
key.start_with?(Fog::DNS::AWS::Mock::SET_PREFIX)
key.start_with?(Fog::AWS::DNS::Mock::SET_PREFIX)
if name.nil?
tmp_records.append(subr)
else
@ -81,7 +81,7 @@ module Fog
response = Excon::Response.new
zone = self.data[:zones][zone_id] ||
raise(Fog::DNS::AWS::NotFound.new("NoSuchHostedZone => A hosted zone with the specified hosted zone ID does not exist."))
raise(Fog::AWS::DNS::NotFound.new("NoSuchHostedZone => A hosted zone with the specified hosted zone ID does not exist."))
records = if options[:type]
records_type = zone[:records][options[:type]]

View file

@ -26,7 +26,7 @@ module Fog
when :ddb, :dynamodb
Fog::AWS::DynamoDB
when :dns
Fog::DNS::AWS
Fog::AWS::DNS
when :elasticache
Fog::AWS::Elasticache
when :elb