From f9d0355ea8e92ba5352aa9050e28c212898db5a5 Mon Sep 17 00:00:00 2001 From: Scott Thompson Date: Tue, 19 Jan 2016 14:38:29 -0600 Subject: [PATCH 1/2] Fix an issue where a bare metal server order crashes trying to retrieve hardware that doesn't exist yet --- CHANGELOG.textile | 3 +++ lib/softlayer/BareMetalServerOrder.rb | 2 +- lib/softlayer/base.rb | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.textile b/CHANGELOG.textile index 8e4f540..a4f3538 100644 --- a/CHANGELOG.textile +++ b/CHANGELOG.textile @@ -1,3 +1,6 @@ +*3.2.1* +Fix a crashing issue where a Bare Metal server order tried to retrieve the hardware ordered before it has been provisioned. + *3.2* * Add password-based authentication with `SoftLayer::Client.with_password(username: '...', password: '...', ...)`. diff --git a/lib/softlayer/BareMetalServerOrder.rb b/lib/softlayer/BareMetalServerOrder.rb index 5e21cca..2749c9d 100644 --- a/lib/softlayer/BareMetalServerOrder.rb +++ b/lib/softlayer/BareMetalServerOrder.rb @@ -133,7 +133,7 @@ def place_order!() order_template = yield order_template if block_given? server_hash = @softlayer_client[:Hardware].createObject(order_template) - SoftLayer::BareMetalServer.server_with_id(server_hash['id'], :client => @softlayer_client) if server_hash + return server_hash end protected diff --git a/lib/softlayer/base.rb b/lib/softlayer/base.rb index c5779db..5f2d470 100644 --- a/lib/softlayer/base.rb +++ b/lib/softlayer/base.rb @@ -12,7 +12,7 @@ module SoftLayer # The version number (including major, minor, and bugfix numbers) # This should change in accordance with the concept of Semantic Versioning - VERSION = "3.2.0" # version history in the CHANGELOG.textile file at the root of the source + VERSION = "3.2.1" # version history in the CHANGELOG.textile file at the root of the source # The base URL of the SoftLayer API available to the public internet. API_PUBLIC_ENDPOINT = 'https://api.softlayer.com/xmlrpc/v3/' From 1fd2b40ab26d1c9aba5a96a032d94f39e9173732 Mon Sep 17 00:00:00 2001 From: Scott Thompson Date: Tue, 19 Jan 2016 15:41:54 -0600 Subject: [PATCH 2/2] Updated travis CI testing --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d3ceb36..4512c94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: ruby rvm: - - "2.1.2" - - "2.1.1" + - "2.3.0" + - "2.2.4" + - "2.1.8" - "2.0.0" - - "1.9.3" - - "1.9.2" - jruby-19mode