fog-softlayer 0.3.21 → 0.3.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2VhZjFhNTkyZDA1OTZiMDliY2I4MDUwNGQ5ZDJiN2QwMzk5NmE5OQ==
4
+ ZDRjMGMzNTJlOWViMmI4OWYyNDEzZmYzNjFjNmEzYWE4OTQ1ZjZlYw==
5
5
  data.tar.gz: !binary |-
6
- NDE2M2E1ZTgyYjI5Y2MyMzU2YjEwZDg4M2RiOTU1OTBjNjE4M2JhNg==
6
+ NWRhODgwN2M5MjliZGUzODNjOTRkZTNhZWE2YzkxYTQ0ODFmOTYxNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGQzZDMwYzhmMTg5NTY5NTFkMDU0NGFjZWYxNTIzZTRhZWU5MTI3OTVkMzFk
10
- MTE4YTRmNjJjZDUzY2Q3YjRkZmE5NjhiODQ4ZmNjODUwMzY5YzExYmQxMWQw
11
- NTE4MmQ0N2NkM2QzYzkxZmMwZDNlOWViOTNiOWQ4MjM0ODgyZjc=
9
+ MjZmOTE2YjQyYjdhNjk5NDA0NWFlMDMxYjgxNzJhZTQ1NDIyYTUxZTkxOGI0
10
+ NWMzZGE2MmQ4ZWE1NjViNDNiMTM2MjE3YzRiMGIzYTYwNjgzODU3NjkyOTRm
11
+ NDVmZmI3Njc2MzZlZTgzZjEwNWNmNWRlNTg2MDZjOGExZWQyNzQ=
12
12
  data.tar.gz: !binary |-
13
- MGQ1MmJiYThhYmQ1NjJmODM2YTFjNDU1YTdiMDU0NGJhMDFlYmFlZjAwNDQ1
14
- MDk4OWE2Nzg1YTE2NGNiZGMxZTMyNzE3MWMzMTBmODdlMTA5ZmNhYjczNGIy
15
- YjNlOWNjNTdhM2RhMTU1ZDE3ZDljNDAxNzk2M2MzZmM3YmQxNmQ=
13
+ MzNiZjk5N2U5NTYwYzAzNGMwNTAwYWYwYmRlN2NhZGYyMTdkZjYyYzdiZmYy
14
+ YjhjMWVjOTM2ZjljOGFjMmM5NDQyNDI5NGI0Y2E4MWRiZmRiY2E0ZDQwZWYz
15
+ YWUxYjU2MDA1YTEzZGFiNjM5MTJlMzFiMjA4MDkxZmJkM2VlYWY=
@@ -49,25 +49,11 @@ module Fog
49
49
  params = { :headers => user_agent_header }
50
50
  params[:headers]['Content-Type'] = 'application/json'
51
51
  params[:expects] = options[:expected] || [200,201]
52
-
53
- if options[:body].respond_to?(:each)
54
- body = []
55
- options[:body].each do |item|
56
- body.push(item)
57
- end
58
- else
59
- body = options[:body]
60
- end
61
-
52
+ params[:query] = options[:query] unless options[:query].nil?
62
53
  unless options[:body].nil?
63
- # SLAPI reloadOperatingSystem appears to want a different format for the body than any other method...
64
- if path =~ /reload/i and path =~ /operating/i and path =~ /system/i
65
- params[:body] = Fog::JSON.encode({:parameters => body})
66
- else
67
- params[:body] = Fog::JSON.encode({:parameters => [body]})
68
- end
54
+ options[:body] = [options[:body]] unless options[:body].kind_of?(Array)
55
+ params[:body] = Fog::JSON.encode({:parameters => options[:body]})
69
56
  end
70
- params[:query] = options[:query] unless options[:query].nil?
71
57
 
72
58
  # initialize connection object
73
59
  @connection = Fog::Core::Connection.new(@request_url, false, params)
@@ -43,7 +43,7 @@ module Fog
43
43
  class Real
44
44
  def create_vm(opts)
45
45
  raise ArgumentError, "Fog::Compute::Softlayer#create_vm expects argument of type Hash" unless opts.kind_of?(Hash)
46
- opts = [opts]
46
+ opts = [[opts]] # don't ask...
47
47
  self.create_vms(opts)
48
48
  end
49
49
  end
@@ -7,6 +7,6 @@
7
7
 
8
8
  module Fog
9
9
  module Softlayer
10
- VERSION = "0.3.21"
10
+ VERSION = "0.3.22"
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-softlayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.21
4
+ version: 0.3.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Eldridge