openstack 3.3.16 → 3.3.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eee16d454f310254303fee16b6cddfd9e8bfe6a5
4
- data.tar.gz: 1f793fdbe4244664b10fc49dfb4afabf9c7a647a
3
+ metadata.gz: 3118591896f4d8985f96e629ee024553efc6ccec
4
+ data.tar.gz: 234766f3da131d005ddb7e156ab5fe731ec6a565
5
5
  SHA512:
6
- metadata.gz: 937c9f97542b1d39526248f8613be49aec208b378f1cfd97890e4409f2a6c58805c0fb7d4457d4b721315be0a357df6c11e3f53a5640dee921a75dbe2dab0cf1
7
- data.tar.gz: 7077f800cdcde0264b78f928e1318769c56b5e26c7f18b1f0e6925d73d44ad892a18985792cad6c334874f0aeb7a484173e7ef43acd400080c6071007deecc71
6
+ metadata.gz: e0b42b5d8d46fa3a6a68ba01bdccd891a0a7a07b9f333b0b1f8adeb5440e68529399b9751a52210324eed90f516dd09c6db52dd998f398ee9842f0899f6bb3df
7
+ data.tar.gz: eec481dffdcbf4fe0e35155e098f0aedf0943bced420ccff75ac9886ad8937f995a5a0fe1603c659f8adbf8f548997f0b207eabc12e446e5e98ebf86fe2a6f82
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.3.16
1
+ 3.3.17
@@ -9,6 +9,7 @@ module OpenStack
9
9
  require 'date'
10
10
  require 'securerandom'
11
11
  require 'logger'
12
+ require 'thread'
12
13
 
13
14
  unless "".respond_to? :each_char
14
15
  require "jcode"
@@ -151,6 +151,7 @@ class Connection
151
151
  @quantum_version = 'v2.0' if @service_type == 'network'
152
152
  @quantum_version = 'v2' if @service_type == 'metering'
153
153
  @endpoint_type = options[:endpoint_type] || "publicURL"
154
+ @semaphore = Mutex.new
154
155
  end
155
156
 
156
157
  #specialised from of csreq for PUT object... uses body_stream if possible
@@ -172,7 +173,10 @@ class Connection
172
173
  request.body = data
173
174
  end
174
175
  start_http(server,path,port,scheme,hdrhash)
175
- response = @http[server].request(request)
176
+ response = nil
177
+ @semaphore.synchronize do
178
+ response = @http[server].request(request)
179
+ end
176
180
  if @is_debug
177
181
  puts "REQUEST: PUT => #{path}"
178
182
  puts data if data
@@ -210,14 +214,17 @@ class Connection
210
214
  start_http(server,path,port,scheme,hdrhash)
211
215
  request = Net::HTTP.const_get(method.to_s.capitalize).new(path,hdrhash)
212
216
  request.body = data
213
- if block_given?
214
- response = @http[server].request(request) do |res|
215
- res.read_body do |b|
216
- yield b
217
+ response = nil
218
+ @semaphore.synchronize do
219
+ if block_given?
220
+ response = @http[server].request(request) do |res|
221
+ res.read_body do |b|
222
+ yield b
223
+ end
217
224
  end
225
+ else
226
+ response = @http[server].request(request)
218
227
  end
219
- else
220
- response = @http[server].request(request)
221
228
  end
222
229
  log_request(request_id, "RESPONSE: Code => #{response.code} Time => #{(Time.now.to_f * 1000) - started_timestamp}ms")
223
230
  if @is_debug
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.16
4
+ version: 3.3.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Prince