python-cloudkittyclient 5.1.0__py3-none-any.whl → 5.3.0__py3-none-any.whl

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.
cloudkittyclient/utils.py CHANGED
@@ -13,7 +13,6 @@
13
13
  # under the License.
14
14
  #
15
15
  import inspect
16
- import sys
17
16
 
18
17
  import pbr.version
19
18
 
@@ -82,11 +81,6 @@ def format_http_errors(ignore):
82
81
  """
83
82
 
84
83
  def wrap(cls):
85
- # If you want pretty errors, use python3.
86
- # __qualname__ does not exist in python 2
87
- if sys.version_info.major < 3:
88
- return cls
89
-
90
84
  def predicate(item):
91
85
  # This avoids decorating functions of parent classes
92
86
  return (inspect.isfunction(item)
@@ -12,11 +12,11 @@
12
12
  # License for the specific language governing permissions and limitations
13
13
  # under the License.
14
14
  #
15
+ from oslo_utils import strutils
16
+
15
17
  from cloudkittyclient.common import base
16
18
  from cloudkittyclient import exc
17
19
 
18
- from distutils.util import strtobool
19
-
20
20
 
21
21
  class ScopeManager(base.BaseManager):
22
22
  """Class used to handle /v2/scope endpoint"""
@@ -133,7 +133,8 @@ class ScopeManager(base.BaseManager):
133
133
  )
134
134
 
135
135
  if kwargs.get('active'):
136
- body['active'] = strtobool(kwargs.get('active'))
136
+ body['active'] = strutils.bool_from_string(
137
+ kwargs.get('active'), strict=True)
137
138
 
138
139
  # Stripping None
139
140
  body = dict(filter(lambda elem: elem[1] is not None, body.items()))
@@ -35,10 +35,20 @@ class CliSummaryGet(lister.Lister):
35
35
  help='Maximal number of elements')
36
36
  parser.add_argument('-g', '--groupby', type=str, action='append',
37
37
  help='Attribute to group the summary by. Can be '
38
- 'specified several times')
38
+ 'specified several times. One can also group '
39
+ 'by different time options such as: "time-d" '
40
+ 'to group by day of the year, "time-w" to '
41
+ 'group by week of the year, "time-m" to '
42
+ 'group by month, and "time-y" to group data '
43
+ 'by year.')
39
44
  parser.add_argument('--filter', type=filter_, action='append',
40
45
  help="Optional filter, in 'key:value' format. Can "
41
- "be specified several times.")
46
+ "be specified several times. It is also "
47
+ "possible to filter data using the group by "
48
+ "values. However, one needs to group by as "
49
+ "well; for instance, if one wants to filter "
50
+ "by resource id (id), then we need to group "
51
+ "by id via the option '-g id'.")
42
52
  parser.add_argument('-b', '--begin', type=timeutils.parse_isotime,
43
53
  help="Start of the period to query, in iso8601 "
44
54
  "format. Example: 2019-05-01T00:00:00Z.")
@@ -36,6 +36,7 @@ Sean McGinnis <sean.mcginnis@gmail.com>
36
36
  Steve Martinelli <s.martinelli@gmail.com>
37
37
  Stéphane Albert <stephane.albert@objectif-libre.com>
38
38
  Swapnil Kulkarni (coolsvap) <me@coolsvap.net>
39
+ Takashi Kajinami <kajinamit@oss.nttdata.com>
39
40
  Vieri <15050873171@163.com>
40
41
  Xiangjun Li <xiangjun.li@easystack.cn>
41
42
  ZhiQiang Fan <aji.zqfan@gmail.com>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-cloudkittyclient
3
- Version: 5.1.0
3
+ Version: 5.3.0
4
4
  Summary: API client of cloudkitty, Rating as a Service project.
5
5
  Home-page: https://docs.openstack.org/python-cloudkittyclient/latest/
6
6
  Author: OpenStack
@@ -5,7 +5,7 @@ cloudkittyclient/exc.py,sha256=vKGcJCmtQzEqOyJgiJzrMU5F4v6oYhYxWIile7zXmvg,3173
5
5
  cloudkittyclient/format.py,sha256=f-BkE5tkU3gCfH2rOq7isz3mcxqwRzI5NCDhVYr4Yqw,3204
6
6
  cloudkittyclient/osc.py,sha256=OpJfHrvf0hW5qajnpu9_CJyoy4MZTMgU9CYZucnoLIU,1527
7
7
  cloudkittyclient/shell.py,sha256=l9bshm_RMup9U1ze7JawCuHBzlLKl6blDcFbmEDAAyk,5633
8
- cloudkittyclient/utils.py,sha256=mt2QQho8ofgG1ZNRkB70PT79gF5vNMD-nbbvAalzJQw,2956
8
+ cloudkittyclient/utils.py,sha256=DCC4fsGIDuisFSrJQVPGRv1xTvKsaTjzRiZrWLARoo4,2782
9
9
  cloudkittyclient/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  cloudkittyclient/common/base.py,sha256=0jXS6IZbx5iRMSLhYWnjhEvFMYJqMGB3DUCvQzMZspE,2543
11
11
  cloudkittyclient/common/client.py,sha256=PzUE8RxmvcUorH7QuRuH39n_EVbsLu8bqVAWCO7Dd50,1540
@@ -63,18 +63,18 @@ cloudkittyclient/v2/dataframes.py,sha256=s4IGC5JSgfKoh2_ee_HTQtI7FJZ0L0RUPM0I0hR
63
63
  cloudkittyclient/v2/dataframes_cli.py,sha256=97_pffc9L-SmZGazuo8YYh3ZIkpK5rMHj90_RnwrkIc,4282
64
64
  cloudkittyclient/v2/reprocessing.py,sha256=_n_VTQCDaYOEl6h_fpdnOmuh8l2WRmAi9Rw0-Un-3h0,2814
65
65
  cloudkittyclient/v2/reprocessing_cli.py,sha256=fAYtDaZRaSjpoUMX_ZuhC8irQvn1_f5KhBni7X6dKAs,4021
66
- cloudkittyclient/v2/scope.py,sha256=LMFMkSn7Wgh0bVa4SdGHD3mmQnjDx1zBL1MAocAipZg,5415
66
+ cloudkittyclient/v2/scope.py,sha256=L2E0xnTLu0qpS7kN5v5bhZC455p-1bGG2P2hPsX0Jbs,5456
67
67
  cloudkittyclient/v2/scope_cli.py,sha256=Ob1m-1CwNEZ6dOz9eyJLUQ8BZ0Z-681kcdLlUaSt-CU,4437
68
68
  cloudkittyclient/v2/summary.py,sha256=r4LewfiYmhdnGFZEiKgvbb8MquRStBQbHT99IUQlOww,2116
69
- cloudkittyclient/v2/summary_cli.py,sha256=v_vi1A4xQb9ACNFmigMtx7TzJmwFfaGb8Vxip4cyYKg,2681
69
+ cloudkittyclient/v2/summary_cli.py,sha256=A08eGm0c3d9LUBhUfrngSo-3K9pWsDB8Br6L4Owkvuk,3459
70
70
  cloudkittyclient/v2/rating/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  cloudkittyclient/v2/rating/modules.py,sha256=EGApZyoXlcw_GNosJQTn5wHwEcbHrz8CZZzsS0j_hgk,2165
72
72
  cloudkittyclient/v2/rating/modules_cli.py,sha256=XK7burE7ZmRQRPs81Y9HdkHUQoDFkvjQuxG1syOjimQ,1026
73
- python_cloudkittyclient-5.1.0.dist-info/AUTHORS,sha256=63dDZVp26ZVEB0zoSJ0KNrtk73MHTVdNxJT-gpcU0c4,2602
74
- python_cloudkittyclient-5.1.0.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
75
- python_cloudkittyclient-5.1.0.dist-info/METADATA,sha256=75_Rz2QvVnrVL_so_CWlDgv-f1u85Ox6hOscVg2hB5o,1961
76
- python_cloudkittyclient-5.1.0.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
77
- python_cloudkittyclient-5.1.0.dist-info/entry_points.txt,sha256=-MLVr_HbwVjfBc5ufkqjY1IuPZHxd2cKTP6hrkrg4bA,16185
78
- python_cloudkittyclient-5.1.0.dist-info/pbr.json,sha256=4ant30THaLmWmR8G_ExrUgoMDg3nsMRvstSPGc57pvo,46
79
- python_cloudkittyclient-5.1.0.dist-info/top_level.txt,sha256=TtMJyxkmBFte9bhR6os7dENHUkoVxb6zshYScZMsGVA,17
80
- python_cloudkittyclient-5.1.0.dist-info/RECORD,,
73
+ python_cloudkittyclient-5.3.0.dist-info/AUTHORS,sha256=I31DH5pMzqE7wstnW18eVVqvef5jWS2nHVuYADH4F9U,2647
74
+ python_cloudkittyclient-5.3.0.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
75
+ python_cloudkittyclient-5.3.0.dist-info/METADATA,sha256=BsbV76oIb925VlNyWJxOvA_92x2tRKbNtUMJQZwsNTI,1961
76
+ python_cloudkittyclient-5.3.0.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
77
+ python_cloudkittyclient-5.3.0.dist-info/entry_points.txt,sha256=-MLVr_HbwVjfBc5ufkqjY1IuPZHxd2cKTP6hrkrg4bA,16185
78
+ python_cloudkittyclient-5.3.0.dist-info/pbr.json,sha256=1u6bxOXBFmtMDPafHGMRmwl-vQKsLcbjg1LmdSdp9ug,46
79
+ python_cloudkittyclient-5.3.0.dist-info/top_level.txt,sha256=TtMJyxkmBFte9bhR6os7dENHUkoVxb6zshYScZMsGVA,17
80
+ python_cloudkittyclient-5.3.0.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ {"git_version": "8e6f9ae", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "e912feb", "is_release": true}