occi-api 4.3.0.beta.3 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/occi/api/client/http/authn_plugins/keystone.rb +10 -7
- data/lib/occi/api/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 644617fdb432b4b461d7041aac940ee18c00c4e6
|
4
|
+
data.tar.gz: 2b23339314d565dd67791897b17370826bebe724
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46ba1864b6ccbcc728ac8f73239b100d8c63715587b1d89c5f9bd13fb48a63be677eefa6294886047f6798220754178dfd840e8e323679295e5c48cab69535f9
|
7
|
+
data.tar.gz: e9bd93d055809ea21875c5bc73b93002f1aa8fe6c0bef6c281814d99a5a0c8485af034cc980d07df3f5963d2789fb4012d27383847a8e7abf73037c2a211a16c
|
@@ -10,12 +10,15 @@ module Occi::Api::Client
|
|
10
10
|
# get Keystone URL if possible
|
11
11
|
set_keystone_base_url
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
if !ENV['ROCCI_CLIENT_KEYSTONE_TENANT'].blank?
|
14
|
+
# get a scoped token for the specified tenant directly
|
15
|
+
set_auth_token ENV['ROCCI_CLIENT_KEYSTONE_TENANT']
|
16
|
+
else
|
17
|
+
# get an unscoped token, use the unscoped token
|
18
|
+
# for tenant discovery and get a scoped token
|
19
|
+
set_auth_token
|
20
|
+
get_first_working_tenant
|
21
|
+
end
|
19
22
|
|
20
23
|
raise ::Occi::Api::Client::Errors::AuthnError,
|
21
24
|
"Unable to get a tenant from Keystone, fallback failed!" if @env_ref.class.headers['X-Auth-Token'].blank?
|
@@ -94,7 +97,7 @@ module Occi::Api::Client
|
|
94
97
|
body.to_json
|
95
98
|
end
|
96
99
|
|
97
|
-
def
|
100
|
+
def get_first_working_tenant
|
98
101
|
response = @env_ref.class.get(
|
99
102
|
"#{@keystone_url}/v2.0/tenants",
|
100
103
|
:headers => get_req_headers
|
data/lib/occi/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: occi-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.0
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Feldhaus
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-10-
|
13
|
+
date: 2014-10-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: occi-core
|
@@ -229,9 +229,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: 1.9.3
|
230
230
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
231
231
|
requirements:
|
232
|
-
- - "
|
232
|
+
- - ">="
|
233
233
|
- !ruby/object:Gem::Version
|
234
|
-
version:
|
234
|
+
version: '0'
|
235
235
|
requirements: []
|
236
236
|
rubyforge_project:
|
237
237
|
rubygems_version: 2.2.2
|