kakin 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kakin.gemspec +1 -1
- data/lib/kakin/cli.rb +8 -8
- data/lib/kakin/version.rb +1 -1
- data/lib/kakin/yao_ext/yao.rb +10 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9c6fa53613bd8220fffe498b25b31db2b40d04a1623c2779ad87355e5f8b466
|
4
|
+
data.tar.gz: b2a124e6ca09b58c6b59a2ffdd8c5bf1334ec942e8dcd1944a1bb08ea08b093d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4137646f75989f86fbc65ef8a6b4d48b1d33d9d21abda779d2860dc1693dc8923c158f9ecbdcbdf7f0c74c794e944e410237066371e6e423666a2c4b2d662c3
|
7
|
+
data.tar.gz: 2be2fa5bdbaae9f341bb6cf8aff1abc316b6a6a59affecbdd8338b9352ce25b39d5fa12f31beabf0a673cf3e360304b51723e08af6d71b7028886dbedba6edc9
|
data/kakin.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency 'thor'
|
22
22
|
spec.add_dependency 'yao'
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "~> 1
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.0.1"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
26
|
spec.add_development_dependency "minitest"
|
27
27
|
end
|
data/lib/kakin/cli.rb
CHANGED
@@ -3,6 +3,7 @@ require 'yaml'
|
|
3
3
|
require 'json'
|
4
4
|
require 'net/http'
|
5
5
|
require 'yao'
|
6
|
+
require 'kakin/yao_ext/yao'
|
6
7
|
require 'kakin/yao_ext/tenant'
|
7
8
|
require 'kakin/yao_ext/server'
|
8
9
|
require 'kakin/yao_ext/floatingip'
|
@@ -27,7 +28,6 @@ module Kakin
|
|
27
28
|
STDERR.puts "Start: #{start_time}"
|
28
29
|
STDERR.puts "End: #{end_time}"
|
29
30
|
client = Yao.default_client.pool['compute']
|
30
|
-
tenant_id = Yao::Tenant.get_by_name(Kakin::Configuration.tenant).id
|
31
31
|
res = client.get("./os-simple-tenant-usage?start=#{start_time}&end=#{end_time}") do |req|
|
32
32
|
req.headers["Accept"] = "application/json"
|
33
33
|
end
|
@@ -37,7 +37,7 @@ module Kakin
|
|
37
37
|
else
|
38
38
|
result = Hash.new
|
39
39
|
tenant_usages = res.body["tenant_usages"]
|
40
|
-
tenants = Yao
|
40
|
+
tenants = Yao.tenant_klass.list
|
41
41
|
|
42
42
|
unless options[:t].empty?
|
43
43
|
tenant = tenants.find { |tenant| tenant.name == options[:t] }
|
@@ -90,9 +90,9 @@ module Kakin
|
|
90
90
|
|
91
91
|
result = Hash.new
|
92
92
|
tenants = unless options[:t].empty?
|
93
|
-
Yao
|
93
|
+
Yao.tenant_klass.list(name: options[:t])
|
94
94
|
else
|
95
|
-
Yao
|
95
|
+
Yao.tenant_klass.list
|
96
96
|
end
|
97
97
|
tenants = [tenants] unless tenants.is_a?(Array)
|
98
98
|
|
@@ -120,9 +120,9 @@ module Kakin
|
|
120
120
|
|
121
121
|
result = Hash.new
|
122
122
|
tenants = unless options[:t].empty?
|
123
|
-
Yao
|
123
|
+
Yao.tenant_klass.list(name: options[:t])
|
124
124
|
else
|
125
|
-
Yao
|
125
|
+
Yao.tenant_klass.list
|
126
126
|
end
|
127
127
|
tenants = [tenants] unless tenants.is_a?(Array)
|
128
128
|
|
@@ -147,9 +147,9 @@ module Kakin
|
|
147
147
|
|
148
148
|
result = Hash.new
|
149
149
|
tenants = unless options[:t].empty?
|
150
|
-
Yao
|
150
|
+
Yao.tenant_klass.list(name: options[:t])
|
151
151
|
else
|
152
|
-
Yao
|
152
|
+
Yao.tenant_klass.list
|
153
153
|
end
|
154
154
|
tenants = [tenants] unless tenants.is_a?(Array)
|
155
155
|
volume_types = Yao::VolumeType.list
|
data/lib/kakin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kakin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- buty4649
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 2.0.1
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 2.0.1
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rake
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/kakin/yao_ext/floatingip.rb
|
108
108
|
- lib/kakin/yao_ext/server.rb
|
109
109
|
- lib/kakin/yao_ext/tenant.rb
|
110
|
+
- lib/kakin/yao_ext/yao.rb
|
110
111
|
homepage: https://github.com/yaocloud/kakin
|
111
112
|
licenses: []
|
112
113
|
metadata: {}
|
@@ -125,8 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
126
|
- !ruby/object:Gem::Version
|
126
127
|
version: '0'
|
127
128
|
requirements: []
|
128
|
-
|
129
|
-
rubygems_version: 2.7.6
|
129
|
+
rubygems_version: 3.0.3
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: kakin is resource calcuration tool for OpenStack
|