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

[aws|cdn] Updates reference to service

This commit is contained in:
Paul Thornthwaite 2012-12-22 23:31:58 +00:00
parent 017a1b67f9
commit 4dd40c1c70
6 changed files with 14 additions and 14 deletions

View file

@ -37,7 +37,7 @@ module Fog
@invalidations ||= begin
Fog::CDN::AWS::Invalidations.new(
:distribution => self,
:connection => connection
:service => service
)
end
end
@ -54,15 +54,15 @@ module Fog
private
def delete_distribution(identity, etag)
connection.delete_distribution(identity, etag)
service.delete_distribution(identity, etag)
end
def put_distribution_config(identity, etag, options)
connection.put_distribution_config(identity, etag, options)
service.put_distribution_config(identity, etag, options)
end
def post_distribution(options = {})
connection.post_distribution(options)
service.post_distribution(options)
end
def attributes_to_options

View file

@ -16,11 +16,11 @@ module Fog
attribute :is_truncated, :aliases => 'IsTruncated'
def get_distribution(dist_id)
connection.get_distribution(dist_id)
service.get_distribution(dist_id)
end
def list_distributions(options = {})
connection.get_distribution_list(options)
service.get_distribution_list(options)
end
alias :each_distribution_this_page :each

View file

@ -30,7 +30,7 @@ module Fog
def save
requires :paths, :caller_reference
raise "Submitted invalidation cannot be submitted again" if persisted?
response = connection.post_invalidation(distribution.identity, paths, caller_reference)
response = service.post_invalidation(distribution.identity, paths, caller_reference)
merge_attributes(invalidation_to_attributes(response.body))
true
end

View file

@ -21,7 +21,7 @@ module Fog
options[:max_items] ||= max_items
options.delete_if {|key, value| value.nil?}
data = connection.get_invalidation_list(distribution.identity, options).body
data = service.get_invalidation_list(distribution.identity, options).body
merge_attributes(data.reject {|key, value| !['IsTruncated', 'MaxItems', 'NextMarker', 'Marker'].include?(key)})
@ -31,7 +31,7 @@ module Fog
def get(invalidation_id)
requires :distribution
data = connection.get_invalidation(distribution.identity, invalidation_id).body
data = service.get_invalidation(distribution.identity, invalidation_id).body
if data
invalidation = new(data)

View file

@ -41,15 +41,15 @@ module Fog
private
def delete_distribution(identity, etag)
connection.delete_streaming_distribution(identity, etag)
service.delete_streaming_distribution(identity, etag)
end
def put_distribution_config(identity, etag, options)
connection.put_streaming_distribution_config(identity, etag, options)
service.put_streaming_distribution_config(identity, etag, options)
end
def post_distribution(options = {})
connection.post_streaming_distribution(options)
service.post_streaming_distribution(options)
end
def attributes_to_options

View file

@ -16,11 +16,11 @@ module Fog
attribute :is_truncated, :aliases => 'IsTruncated'
def get_distribution(dist_id)
connection.get_streaming_distribution(dist_id)
service.get_streaming_distribution(dist_id)
end
def list_distributions(options = {})
connection.get_streaming_distribution_list(options)
service.get_streaming_distribution_list(options)
end
alias :each_distribution_this_page :each