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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 989ed6f8ff03bdac576ec5721b77c402d221e60b
4
- data.tar.gz: 3e85abd587efea9b5713fe815de349e5c7d9cd89
3
+ metadata.gz: c8b69c9ddc70b5ac8a38d674e34b53683f64809d
4
+ data.tar.gz: 24573d898d0169235a498050c7699ef37c543782
5
5
  SHA512:
6
- metadata.gz: 8adf03257f511aabb53d61b4883bb44eeb980cba5147df713165bbac81605ad523fbb6ce7f9bd41ed1a4c97ff5e99b0ac211c8da7182fdad2ac30448ed60ed81
7
- data.tar.gz: 88c1a17c2d8880d928e75de38683ed42980d6df3a98f9d1d0c5c93c6fe91a5781f3e8a64dc7161f079c4d833e96d28ca40f95097b116d1eefb792142f035f748
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[2]
52
+ "Unable to get Keystone's URL from the response, fallback failed!" unless match && match[3]
52
53
 
53
- @keystone_url = match[2]
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 voms below should be configurable
224
- "#{@base_url}/OS-FEDERATION/identity_providers/egi.eu/protocols/mapped/voms",
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
 
@@ -1,5 +1,5 @@
1
1
  module Occi
2
2
  module Api
3
- VERSION = "4.3.8" unless defined?(::Occi::Api::VERSION)
3
+ VERSION = "4.3.9" unless defined?(::Occi::Api::VERSION)
4
4
  end
5
5
  end
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.2', '< 5'
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.8
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-01-27 00:00:00.000000000 Z
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.2
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.2
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.4.8
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