Skip to content

Commit

Permalink
Merge pull request fog#3380 from rackspace/remove_preview
Browse files Browse the repository at this point in the history
Use Rackspace's prod endpoint for Poppy CDN
  • Loading branch information
geemus committed Jan 7, 2015
2 parents 8bd64c2 + a4ec4c7 commit f5408a9
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lib/fog/rackspace/cdn_v2.rb
Expand Up @@ -6,8 +6,6 @@ class CDNV2 < Fog::Service
requires :rackspace_api_key, :rackspace_username
recognizes :rackspace_auth_url, :persistent, :rackspace_cdn_ssl, :rackspace_region, :rackspace_cdn_url

PREVIEW_API_URL = "preview.cdn.api.rackspacecloud.com"

model_path 'fog/rackspace/models/cdn_v2'
model :service
collection :services
Expand Down Expand Up @@ -70,10 +68,6 @@ def initialize(options = {})
end

def request(params, parse_json = true)
# TODO: This MUST be removed when CDNV2 is live
rewrite_cdn_v2_host!
# TODO: This MUST be removed when CDNV2 is live

super
rescue Excon::Errors::NotFound => error
raise NotFound.slurp(error, self)
Expand All @@ -85,18 +79,6 @@ def request(params, parse_json = true)
raise ServiceError.slurp(error, self)
end

# TODO: This MUST be removed when CDNV2 is live
def rewrite_cdn_v2_host!
conn = @connection.instance_variable_get("@excon")
conn.data[:host] = PREVIEW_API_URL
conn.instance_variable_set("@socket_key", PREVIEW_API_URL)

if conn.data.has_key?(:__construction_args)
conn.data[:__construction_args][:host] = PREVIEW_API_URL
end
end
# TODO: This MUST be removed when CDNV2 is live

def request_uri(path, options={})
return path if options == {}
require "addressable/uri"
Expand Down

0 comments on commit f5408a9

Please sign in to comment.