From fde1ee532a2a74ce34f77d4830da2f9a6adfcdf8 Mon Sep 17 00:00:00 2001 From: Kyle Rames Date: Thu, 20 Dec 2012 10:08:41 -0600 Subject: [PATCH] Updated default Rackspace Compute provider to return a Fog::Compute::RackspaceV2 instance. In order to access legacy Cloud Servers, a :version => :v1 parameter will need be passed like so Fog::Compute.new({ :provider => 'Rackspace', :rackspace_username => USER, :rackspace_api_key => API_KEY, :version => :v1 }) --- lib/fog/compute.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fog/compute.rb b/lib/fog/compute.rb index 4fddf6863..ae31a8b6c 100644 --- a/lib/fog/compute.rb +++ b/lib/fog/compute.rb @@ -68,12 +68,12 @@ module Fog when :rackspace version = attributes.delete(:version) version = version.to_s.downcase.to_sym unless version.nil? - if version == :v2 + if version == :v1 + require 'fog/rackspace/compute' + Fog::Compute::Rackspace.new(attributes) + else require 'fog/rackspace/compute_v2' Fog::Compute::RackspaceV2.new(attributes) - else - require 'fog/rackspace/compute' - Fog::Compute::Rackspace.new(attributes) end when :serverlove require 'fog/serverlove/compute'