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

reverted back to version 1 of the Rackspace compute interface along with a deprecation warning

This commit is contained in:
Kyle Rames 2012-12-20 15:26:06 -06:00
parent 165ad28492
commit bc02b0e7af

View file

@ -68,12 +68,13 @@ module Fog
when :rackspace
version = attributes.delete(:version)
version = version.to_s.downcase.to_sym unless version.nil?
if version == :v1
require 'fog/rackspace/compute'
Fog::Compute::Rackspace.new(attributes)
else
if version == :v2
require 'fog/rackspace/compute_v2'
Fog::Compute::RackspaceV2.new(attributes)
Fog::Compute::RackspaceV2.new(attributes)
else
warn "[DEPRECATION] First Gen Cloud Servers are deprecated. Please use `:version => :v2` attribute to use Next Gen Cloud Servers."
require 'fog/rackspace/compute'
Fog::Compute::Rackspace.new(attributes)
end
when :serverlove
require 'fog/serverlove/compute'