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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c39ff422b601e3adbb406dbcdcfa4e7b0d3477f
4
- data.tar.gz: 89d1677c49f3f69f38942347c2a36568bd8b87f0
3
+ metadata.gz: 644617fdb432b4b461d7041aac940ee18c00c4e6
4
+ data.tar.gz: 2b23339314d565dd67791897b17370826bebe724
5
5
  SHA512:
6
- metadata.gz: 04278ffe962784a436d98d5c710dac9567e1c006c502bdb4537f578afa2bf7e0fa8d89a21c3dd9ac505d5e47c3fe826a3ea8fc4be0b9611a5e5ddaeca1dc9ae0
7
- data.tar.gz: 8a63832a4542feb7c19ede688a7c6b62740db7d738f9962a7088936de89c66bc2ab0e91b4d7d5f0e86040c330b2a9d220d5c92f1d35eeb13ff2e69c26e32044e
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
- # get an un-scoped token
14
- set_auth_token
15
-
16
- # use the un-scoped token for tenant discovery
17
- # and get a scoped token
18
- get_prefered_tenant
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 get_prefered_tenant(match = nil)
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
@@ -1,5 +1,5 @@
1
1
  module Occi
2
2
  module Api
3
- VERSION = "4.3.0.beta.3" unless defined?(::Occi::Api::VERSION)
3
+ VERSION = "4.3.0" unless defined?(::Occi::Api::VERSION)
4
4
  end
5
5
  end
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.beta.3
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-06 00:00:00.000000000 Z
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: 1.3.1
234
+ version: '0'
235
235
  requirements: []
236
236
  rubyforge_project:
237
237
  rubygems_version: 2.2.2