occi-api 4.3.8 → 4.3.9
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 +8 -7
- data/lib/occi/api/version.rb +1 -1
- data/occi-api.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8b69c9ddc70b5ac8a38d674e34b53683f64809d
|
4
|
+
data.tar.gz: 24573d898d0169235a498050c7699ef37c543782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ad5bb6636c11da1e4f2c31d06f3ad813d381c836c8ce3d7fff437af048385083fc9afd3b87b9641610ab76e2074b54d3e2bb24a19ac09db260225045f760a92
|
7
|
+
data.tar.gz: 0f13a8097e9f77c965bddbd3bbc4e5fe46250a4a3c99a8f6294b66a1c74a73083c244dc0e4af028b4e0167e938b53f169b5918be420116b19e9258e92d7a0670
|
@@ -4,7 +4,7 @@ module Occi::Api::Client
|
|
4
4
|
|
5
5
|
class Keystone < Base
|
6
6
|
|
7
|
-
KEYSTONE_URI_REGEXP = /^(Keystone|snf-auth) uri='(.+)'$/
|
7
|
+
KEYSTONE_URI_REGEXP = /^(Keystone|snf-auth) uri=("|')(.+)("|')$/
|
8
8
|
KEYSTONE_VERSION_REGEXP = /^v([0-9]).*$/
|
9
9
|
|
10
10
|
def setup(options = {})
|
@@ -12,6 +12,7 @@ module Occi::Api::Client
|
|
12
12
|
set_keystone_base_url
|
13
13
|
|
14
14
|
# discover Keystone API version
|
15
|
+
@env_ref.class.headers.delete 'X-Auth-Token'
|
15
16
|
set_auth_token ENV['ROCCI_CLIENT_KEYSTONE_TENANT']
|
16
17
|
|
17
18
|
raise ::Occi::Api::Client::Errors::AuthnError,
|
@@ -48,9 +49,9 @@ module Occi::Api::Client
|
|
48
49
|
|
49
50
|
match = KEYSTONE_URI_REGEXP.match(authN_header)
|
50
51
|
raise ::Occi::Api::Client::Errors::AuthnError,
|
51
|
-
"Unable to get Keystone's URL from the response, fallback failed!" unless match && match[
|
52
|
+
"Unable to get Keystone's URL from the response, fallback failed!" unless match && match[3]
|
52
53
|
|
53
|
-
@keystone_url = match[
|
54
|
+
@keystone_url = match[3]
|
54
55
|
end
|
55
56
|
|
56
57
|
def set_auth_token(tenant = nil)
|
@@ -220,8 +221,8 @@ module Occi::Api::Client
|
|
220
221
|
|
221
222
|
def set_voms_unscoped_token
|
222
223
|
response = @env_ref.class.post(
|
223
|
-
# egi.eu and
|
224
|
-
"#{@base_url}/OS-FEDERATION/identity_providers/egi.eu/protocols/mapped/
|
224
|
+
# egi.eu and mapped below should be configurable
|
225
|
+
"#{@base_url}/OS-FEDERATION/identity_providers/egi.eu/protocols/mapped/auth",
|
225
226
|
)
|
226
227
|
Occi::Api::Log.debug response.inspect
|
227
228
|
|
@@ -235,7 +236,7 @@ module Occi::Api::Client
|
|
235
236
|
|
236
237
|
def get_first_working_project
|
237
238
|
response = @env_ref.class.get(
|
238
|
-
"#{@base_url}/projects",
|
239
|
+
"#{@base_url}/auth/projects",
|
239
240
|
:headers => get_req_headers
|
240
241
|
)
|
241
242
|
Occi::Api::Log.debug response.inspect
|
@@ -270,7 +271,7 @@ module Occi::Api::Client
|
|
270
271
|
}
|
271
272
|
response = @env_ref.class.post(
|
272
273
|
"#{@base_url}/auth/tokens",
|
273
|
-
:body => body,
|
274
|
+
:body => body.to_json,
|
274
275
|
:headers => get_req_headers
|
275
276
|
)
|
276
277
|
|
data/lib/occi/api/version.rb
CHANGED
data/occi-api.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.test_files = `git ls-files -- {test,spec}/*`.split("\n")
|
19
19
|
gem.require_paths = ['lib']
|
20
20
|
|
21
|
-
gem.add_dependency 'occi-core', '>= 4.3.
|
21
|
+
gem.add_dependency 'occi-core', '>= 4.3.5', '< 5'
|
22
22
|
gem.add_dependency 'httparty', '>= 0.13.1', '< 1'
|
23
23
|
gem.add_dependency 'json', '>= 1.8.1', '< 3'
|
24
24
|
|
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.
|
4
|
+
version: 4.3.9
|
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: 2017-
|
13
|
+
date: 2017-02-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: occi-core
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 4.3.
|
21
|
+
version: 4.3.5
|
22
22
|
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: '5'
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
requirements:
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: 4.3.
|
31
|
+
version: 4.3.5
|
32
32
|
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '5'
|
@@ -459,7 +459,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
459
459
|
version: '0'
|
460
460
|
requirements: []
|
461
461
|
rubyforge_project:
|
462
|
-
rubygems_version: 2.
|
462
|
+
rubygems_version: 2.6.8
|
463
463
|
signing_key:
|
464
464
|
specification_version: 4
|
465
465
|
summary: OCCI development library providing a high-level client API
|