opennebula 5.9.80.pre → 5.9.90.pre

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: 321f13bb3966469aa1b7b07f8b83287985be6841
4
- data.tar.gz: 204f2304bdecee1142c845ee78d6c676de6c4456
3
+ metadata.gz: 615f2993c34d8bd03ddf2cec976b957ca5f72052
4
+ data.tar.gz: 2ae7a7d09b5886ca2bbbb225b96ee71a5b525760
5
5
  SHA512:
6
- metadata.gz: e358e112f2e6f689f45d8aaab0608b972b15165bf1e17e66346df051027faa676d6ed69355f2305832ae024c7088d243d38206248dd709df6d6557520492dd2c
7
- data.tar.gz: a299a7153acfb2a60d3dd7731d23c33bd4e2f7685e4e40459ca8f77275c9b42d42dfbef87aa53a9439f72d569f3554be45741f30ee74601ba818ad4ddb7eb607
6
+ metadata.gz: 02b773491867c781e38c59e2f889410dc60372b0326b4707da2740e75f253dbb9e864f49148d47adaf21a0411b6de25ce1f2f44a0f7b999ca12e3f5e8258105d
7
+ data.tar.gz: 77bc56c14cba0063deba21d6d15c40f1a3399747700e469ffd8159ad9a4756650545c02aaf8f6935ac7162be122cc0740a5e9e31d444ac9a7df97ecd7d956418
@@ -16,6 +16,7 @@
16
16
 
17
17
  require 'rubygems'
18
18
  require 'uri'
19
+ require 'ipaddress'
19
20
 
20
21
  require 'digest/sha1'
21
22
  require 'net/https'
@@ -50,7 +51,7 @@ end
50
51
  module CloudClient
51
52
 
52
53
  # OpenNebula version
53
- VERSION = '5.9.80'
54
+ VERSION = '5.9.90'
54
55
 
55
56
  # #########################################################################
56
57
  # Default location for the authentication file
@@ -94,8 +95,29 @@ module CloudClient
94
95
 
95
96
  if ENV['http_proxy']
96
97
  uri_proxy = URI.parse(ENV['http_proxy'])
97
- host = uri_proxy.host
98
- port = uri_proxy.port
98
+ flag = false
99
+
100
+ # Check if we need to bypass the proxy
101
+ if ENV['no_proxy']
102
+ ENV['no_proxy'].split(',').each do |item|
103
+ item = item.rstrip.lstrip
104
+
105
+ unless (IPAddress(url.host) rescue nil).nil?
106
+ unless (IPAddress(item) rescue nil).nil?
107
+ flag |= IPAddress(item).include? IPAddress(url.host)
108
+ end
109
+ else
110
+ if (IPAddress(item) rescue nil).nil?
111
+ flag |= (item == url.host)
112
+ end
113
+ end
114
+ end
115
+ end
116
+
117
+ unless flag
118
+ host = uri_proxy.host
119
+ port = uri_proxy.port
120
+ end
99
121
  end
100
122
 
101
123
  http = Net::HTTP::Proxy(host, port).new(url.host, url.port)
@@ -74,5 +74,5 @@ require 'opennebula/hook_log'
74
74
  module OpenNebula
75
75
 
76
76
  # OpenNebula version
77
- VERSION = '5.9.80'
77
+ VERSION = '5.9.90'
78
78
  end
@@ -15,6 +15,7 @@
15
15
  #--------------------------------------------------------------------------- #
16
16
 
17
17
  require 'uri'
18
+ require 'ipaddress'
18
19
  require 'cloud/CloudClient'
19
20
 
20
21
  include CloudCLI
@@ -328,8 +329,29 @@ module Service
328
329
 
329
330
  if ENV['http_proxy']
330
331
  uri_proxy = URI.parse(ENV['http_proxy'])
331
- @host = uri_proxy.host
332
- @port = uri_proxy.port
332
+ flag = false
333
+
334
+ # Check if we need to bypass the proxy
335
+ if ENV['no_proxy']
336
+ ENV['no_proxy'].split(',').each do |item|
337
+ item = item.rstrip.lstrip
338
+
339
+ unless (IPAddress @uri.host rescue nil).nil?
340
+ unless (IPAddress item rescue nil).nil?
341
+ flag |= IPAddress(item).include? IPAddress(@uri.host)
342
+ end
343
+ else
344
+ if (IPAddress(item) rescue nil).nil?
345
+ flag |= (item == @uri.host)
346
+ end
347
+ end
348
+ end
349
+ end
350
+
351
+ unless flag
352
+ @host = uri_proxy.host
353
+ @port = uri_proxy.port
354
+ end
333
355
  end
334
356
  end
335
357
 
@@ -816,7 +816,7 @@ module OpenNebula
816
816
  # Replace the original template's capacity with the actual VM values
817
817
  replace = ""
818
818
  if !description.nil?
819
- replace << "DESCRIPTION = #{description}\n"
819
+ replace << "DESCRIPTION = \"#{description}\"\n"
820
820
  end
821
821
  cpu = self['TEMPLATE/CPU']
822
822
  if !cpu.nil? && !cpu.empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.9.80.pre
4
+ version: 5.9.90.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-14 00:00:00.000000000 Z
11
+ date: 2019-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri