kaname 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kaname.gemspec +1 -1
- data/lib/kaname/adapter/read_only.rb +10 -2
- data/lib/kaname/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9bb34f056e95f72704b84a514305563ca17931d6ca9bc282caef210e7d43ef1
|
4
|
+
data.tar.gz: f6b357b16049d9cf528217cc9353430a39b45b44415f92e28fa2819e960dfbc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb512dd45dfb0df7eb0fe7098f1433b111cb007380a0c8f01f40be86368f70eccdd2c1e6cda693f4837ad9274e65427dcffecbef56b8a28669d80976c7eed1ff
|
7
|
+
data.tar.gz: 47d99b2ac4cdd68f9fedf87235643ce411038e6d365291d74a37c08c2a22c87acabd40b48eae09cd6709d824dff6d5c5c5457bd812a717c226305a5127b7dd05
|
data/kaname.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "yao", ">= 0.
|
22
|
+
spec.add_dependency "yao", ">= 0.8.0"
|
23
23
|
spec.add_dependency "diffy"
|
24
24
|
spec.add_dependency "hashdiff", ">= 1.0.0"
|
25
25
|
spec.add_dependency "thor"
|
@@ -10,12 +10,16 @@ module Kaname
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def find_user(name)
|
13
|
-
user = Yao::User.find_by_name(name)
|
13
|
+
user = Yao::User.find_by_name(name).first
|
14
14
|
{"id" => user.id, "name" => user.name}
|
15
15
|
end
|
16
16
|
|
17
17
|
def list_tenants
|
18
|
-
@_tenants ||=
|
18
|
+
@_tenants ||= if keystone_v2?
|
19
|
+
Yao::Tenant.list
|
20
|
+
else
|
21
|
+
Yao::Project.list
|
22
|
+
end
|
19
23
|
end
|
20
24
|
|
21
25
|
def list_roles
|
@@ -62,6 +66,10 @@ module Kaname
|
|
62
66
|
|
63
67
|
private
|
64
68
|
|
69
|
+
def keystone_v2?
|
70
|
+
Yao.default_client.pool["identity"].url_prefix.to_s.match(/v2\.0/)
|
71
|
+
end
|
72
|
+
|
65
73
|
def tenant_role_hash(user_id)
|
66
74
|
list_role_assignments.each_with_object(Hash.new) do |t,th|
|
67
75
|
if t.user.id == user_id
|
data/lib/kaname/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaname
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SHIBATA Hiroshi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yao
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.8.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.8.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: diffy
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
199
|
requirements: []
|
200
|
-
rubygems_version: 3.0.
|
200
|
+
rubygems_version: 3.0.3
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: Identity configuration tool for OpenStack.
|