fog-openstack 0.2.0 → 0.2.1

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: c70342e05368a8b5eee2e3b0cc8bfa02f2201156
4
- data.tar.gz: d0794fd0a519e1e9a1e0501d22f04b14f5f17c90
3
+ metadata.gz: 9b30f652b4b6df666a43ce5d8a5df9e999062ea3
4
+ data.tar.gz: b0ef11fb9333c0987ae31ecead2c2f99ddf107a6
5
5
  SHA512:
6
- metadata.gz: 9c974aa8e32e72c4bf8397c5881563e7349a54ce13b3f3f92dddd2f8434d32ee53b3c636f0316f7da4c18ca03b95e808e6848f4ea4e3c8595b84de1e8213297d
7
- data.tar.gz: 7e1d1a0ebcbdd7582beb275d66a66bb24dfa08b64072a015a57c8c311aa67217b040e2b33b7be418ef379ccffb59f21399aae04dd381381b81b1e7e38266307a
6
+ metadata.gz: b96108935e442c7667530a689be9911a55a1c5d137b0072e322af3c47140e9fb1cdbae3f679838bda873169f719e84521bd08cef8b94ca9bf23d078f18e36e7d
7
+ data.tar.gz: 3b95ad280e133a331c803e7fd9b5daf3632085fa1ee0c05304cf9202e957a38a223c5eabe2752c4a81354483877ba6ff8aea8c45b81b885205b41e17e0f285f2
@@ -12,11 +12,13 @@ module Fog
12
12
  # Will be removed in future after hard deprecation is enforced for a couple of releases
13
13
  Fog::Logger.deprecation("An authentication URL including a version is deprecated")
14
14
  case args[:openstack_auth_url]
15
- when /v3/
16
- args[:openstack_auth_url].gsub!(/\/v3(\/)*.*/, '')
17
- 'v3'
18
- when /v2(\.0)*/
19
- args[:openstack_auth_url].gsub!(/\/v2(\.0)*(\/)*.*/, '')
15
+ when /\/v3(\/)*.*$/
16
+ args[:openstack_auth_url].gsub!(/\/v3(\/)*.*$/, '')
17
+ args[:no_path_prefix] = true
18
+ '3'
19
+ when /\/v2(\.0)*(\/)*.*$/
20
+ args[:openstack_auth_url].gsub!(/\/v2(\.0)*(\/)*.*$/, '')
21
+ args[:no_path_prefix] = true
20
22
  '2.0'
21
23
  end
22
24
  end
@@ -14,7 +14,7 @@ module Fog
14
14
  :openstack_project_name, :openstack_project_id,
15
15
  :openstack_project_domain, :openstack_user_domain, :openstack_domain_name,
16
16
  :openstack_project_domain_id, :openstack_user_domain_id, :openstack_domain_id,
17
- :openstack_identity_api_version
17
+ :openstack_identity_api_version, :no_path_prefix
18
18
 
19
19
  model_path 'fog/identity/openstack/v2/models'
20
20
  model :tenant
@@ -169,8 +169,17 @@ module Fog
169
169
  end
170
170
 
171
171
  class Real < Fog::Identity::OpenStack::Real
172
+ def initialize(args)
173
+ @path_prefix = if args[:no_path_prefix]
174
+ ''
175
+ else
176
+ 'v2.0'
177
+ end
178
+ super
179
+ end
180
+
172
181
  def default_path_prefix
173
- 'v2.0'
182
+ @path_prefix
174
183
  end
175
184
 
176
185
  def default_service_type
@@ -13,7 +13,7 @@ module Fog
13
13
  :openstack_user_domain_id, :openstack_project_domain_id,
14
14
  :openstack_api_key, :openstack_current_user_id, :openstack_userid, :openstack_username,
15
15
  :current_user, :current_user_id, :current_tenant,
16
- :provider, :openstack_identity_api_version, :openstack_cache_ttl
16
+ :provider, :openstack_identity_api_version, :openstack_cache_ttl, :no_path_prefix
17
17
 
18
18
  model_path 'fog/identity/openstack/v3/models'
19
19
  model :domain
@@ -142,8 +142,17 @@ module Fog
142
142
  end
143
143
 
144
144
  class Real < Fog::Identity::OpenStack::Real
145
+ def initialize(args)
146
+ @path_prefix = if args[:no_path_prefix]
147
+ ''
148
+ else
149
+ 'v3'
150
+ end
151
+ super
152
+ end
153
+
145
154
  def default_path_prefix
146
- 'v3'
155
+ @path_prefix
147
156
  end
148
157
 
149
158
  def default_service_type
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module OpenStack
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-openstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Darby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-29 00:00:00.000000000 Z
11
+ date: 2018-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core