Module: Fog::CDN
- Defined in:
- lib/fog/cdn.rb,
lib/fog/hp/cdn.rb,
lib/fog/aws/cdn.rb,
lib/fog/rackspace/cdn.rb,
lib/fog/aws/models/cdn/distribution.rb,
lib/fog/aws/models/cdn/invalidation.rb,
lib/fog/aws/models/cdn/distributions.rb,
lib/fog/aws/models/cdn/invalidations.rb,
lib/fog/hp/requests/cdn/put_container.rb,
lib/fog/hp/requests/cdn/get_containers.rb,
lib/fog/hp/requests/cdn/head_container.rb,
lib/fog/hp/requests/cdn/post_container.rb,
lib/fog/hp/requests/cdn/delete_container.rb,
lib/fog/aws/requests/cdn/get_distribution.rb,
lib/fog/aws/requests/cdn/get_invalidation.rb,
lib/fog/aws/models/cdn/distribution_helper.rb,
lib/fog/aws/requests/cdn/post_distribution.rb,
lib/fog/aws/requests/cdn/post_invalidation.rb,
lib/fog/aws/models/cdn/distributions_helper.rb,
lib/fog/aws/requests/cdn/delete_distribution.rb,
lib/fog/rackspace/requests/cdn/put_container.rb,
lib/fog/aws/models/cdn/streaming_distribution.rb,
lib/fog/rackspace/requests/cdn/get_containers.rb,
lib/fog/rackspace/requests/cdn/head_container.rb,
lib/fog/rackspace/requests/cdn/post_container.rb,
lib/fog/aws/models/cdn/streaming_distributions.rb,
lib/fog/aws/requests/cdn/get_distribution_list.rb,
lib/fog/aws/requests/cdn/get_invalidation_list.rb,
lib/fog/aws/requests/cdn/put_distribution_config.rb,
lib/fog/aws/requests/cdn/get_streaming_distribution.rb,
lib/fog/aws/requests/cdn/post_streaming_distribution.rb,
lib/fog/aws/requests/cdn/delete_streaming_distribution.rb,
lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb,
lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb
Defined Under Namespace
Classes: AWS, HP, Rackspace
Class Method Summary
collapse
Class Method Details
.[](provider) ⇒ Object
4
5
6
|
# File 'lib/fog/cdn.rb', line 4
def self.[](provider)
self.new(:provider => provider)
end
|
.new(attributes) ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/fog/cdn.rb', line 8
def self.new(attributes)
attributes = attributes.dup case provider = attributes.delete(:provider).to_s.downcase.to_sym
when :aws
require 'fog/aws/cdn'
Fog::CDN::AWS.new(attributes)
when :hp
require 'fog/hp/cdn'
Fog::CDN::HP.new(attributes)
when :rackspace
require 'fog/rackspace/cdn'
Fog::CDN::Rackspace.new(attributes)
else
raise ArgumentError.new("#{provider} is not a recognized cdn provider")
end
end
|
.providers ⇒ Object
25
26
27
|
# File 'lib/fog/cdn.rb', line 25
def self.providers
Fog.services[:cdn]
end
|