kakin 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9c6fa53613bd8220fffe498b25b31db2b40d04a1623c2779ad87355e5f8b466
4
- data.tar.gz: b2a124e6ca09b58c6b59a2ffdd8c5bf1334ec942e8dcd1944a1bb08ea08b093d
3
+ metadata.gz: c4d79cc2ffb8deb8ebb267963327939ee177c60ddb014217ee433a0394981c9f
4
+ data.tar.gz: bf19b09fc2874309ed228ed06a9179e659d5f3d54ecfa7db6e4357b8898ad9cd
5
5
  SHA512:
6
- metadata.gz: c4137646f75989f86fbc65ef8a6b4d48b1d33d9d21abda779d2860dc1693dc8923c158f9ecbdcbdf7f0c74c794e944e410237066371e6e423666a2c4b2d662c3
7
- data.tar.gz: 2be2fa5bdbaae9f341bb6cf8aff1abc316b6a6a59affecbdd8338b9352ce25b39d5fa12f31beabf0a673cf3e360304b51723e08af6d71b7028886dbedba6edc9
6
+ metadata.gz: 276941d537c9c47a2e31b88564cf9d12a8c11ce2b56fd035d0b35113fcbbf0add7e2cdaa8ea5cbfe43fc4b4a9893fa1e6b8925aae4aff1c90a7d4bf1a72735cc
7
+ data.tar.gz: f7f2dc5c6369018a79060ce2a7b947b69efbb7625fe2eb11d120e5b4d24c5fe3e848667e8b29e526c69ddb3f15c2ed51ca8ac04fcd58c8b275a77bc7d79234c4
@@ -47,7 +47,9 @@ module Kakin
47
47
  end
48
48
 
49
49
  tenant_usages.each do |usage|
50
- tenant = tenants.find { |tenant| tenant.id == usage["tenant_id"] }
50
+ tenant_id = usage["tenant_id"]
51
+ tenant = tenants.find { |tenant| tenant.id == tenant_id }
52
+ tenant_name = tenant&.name || tenant_id
51
53
 
52
54
  total_vcpus_usage = usage["total_vcpus_usage"]
53
55
  total_memory_mb_usage = usage["total_memory_mb_usage"]
@@ -57,7 +59,7 @@ module Kakin
57
59
  bill_memory = total_memory_mb_usage * yaml["memory_mb_per_hour"]
58
60
  bill_disk = total_local_gb_usage * yaml["disk_gb_per_hour"]
59
61
 
60
- result[tenant.name] = {
62
+ result[tenant_name] = {
61
63
  'bill_total' => bill_vcpu + bill_memory + bill_disk,
62
64
  'bill_vcpu' => bill_vcpu,
63
65
  'bill_memory' => bill_memory,
@@ -1,3 +1,3 @@
1
1
  module Kakin
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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.0
4
+ version: 0.4.1
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-10-28 00:00:00.000000000 Z
12
+ date: 2020-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0'
128
128
  requirements: []
129
- rubygems_version: 3.0.3
129
+ rubygems_version: 3.1.2
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: kakin is resource calcuration tool for OpenStack