python-cloudkittyclient 4.7.1__py3-none-any.whl → 4.8.1__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.
@@ -15,26 +15,57 @@
15
15
  #
16
16
  import json
17
17
  import os
18
- import shlex
19
18
  import subprocess
20
19
 
21
20
  from cloudkittyclient.tests import utils
22
21
 
22
+ from oslo_log import log
23
+
24
+ LOG = log.getLogger(__name__)
25
+
23
26
 
24
27
  class BaseFunctionalTest(utils.BaseTestCase):
25
28
 
29
+ # DevStack is using VENV by default. Therefore, to execute the commands,
30
+ # we need to activate the VENV. And, to do that, we need the VENV path.
31
+ # This path is hardcoded here because we could not find a variable in this
32
+ # Python code to retrieve the VENV variable from the test machine.
33
+ # It seems that because of the stack TOX -> stestr -> this python code, and
34
+ # so on, we are not able to access the DevStack variables here.
35
+ #
36
+ # If somebody finds a solution, we can remove the hardcoded path here.
37
+ DEV_STACK_VENV_BASE_PATH = "/opt/stack/data/venv"
38
+
39
+ BASE_COMMAND_WITH_VENV = "source %s/bin/activate && %s "
40
+
26
41
  def _run(self, executable, action,
27
42
  flags='', params='', fmt='-f json', stdin=None, has_output=True):
28
43
  if not has_output:
29
44
  fmt = ''
45
+
46
+ does_venv_exist = not os.system("ls -lah /opt/stack/data/venv")
47
+ LOG.info("Test to check if the VENV file exist returned: [%s].",
48
+ does_venv_exist)
49
+
50
+ system_variables = os.environ.copy()
51
+ LOG.info("System variables [%s] found when executing the tests.",
52
+ system_variables)
53
+
30
54
  cmd = ' '.join([executable, flags, action, params, fmt])
31
- cmd = shlex.split(cmd)
55
+
56
+ actual_command_with_venv = self.BASE_COMMAND_WITH_VENV % (
57
+ self.DEV_STACK_VENV_BASE_PATH, cmd)
58
+
59
+ LOG.info("Command being executed: [%s].", actual_command_with_venv)
60
+
32
61
  p = subprocess.Popen(
33
- cmd, env=os.environ.copy(), shell=False,
34
- stdout=subprocess.PIPE, stderr=subprocess.PIPE,
35
- stdin=subprocess.PIPE if stdin else None,
62
+ ["bash", "-c", actual_command_with_venv],
63
+ env=os.environ.copy(), shell=False, stdout=subprocess.PIPE,
64
+ stderr=subprocess.PIPE, stdin=subprocess.PIPE if stdin else None
36
65
  )
37
66
  stdout, stderr = p.communicate(input=stdin)
67
+ LOG.info("Standard output [%s] and error output [%s] for command "
68
+ "[%s]. ", stdout, stderr, actual_command_with_venv)
38
69
  if p.returncode != 0:
39
70
  raise RuntimeError('"{cmd}" returned {val}: {msg}'.format(
40
71
  cmd=' '.join(cmd), val=p.returncode, msg=stderr))
@@ -1,12 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-cloudkittyclient
3
- Version: 4.7.1
3
+ Version: 4.8.1
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
7
7
  Author-email: openstack-discuss@lists.openstack.org
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
8
  Classifier: Environment :: OpenStack
11
9
  Classifier: Intended Audience :: Information Technology
12
10
  Classifier: Intended Audience :: System Administrators
@@ -21,15 +19,17 @@ Classifier: Programming Language :: Python :: 3.7
21
19
  Classifier: Programming Language :: Python :: 3.8
22
20
  Classifier: Programming Language :: Python :: 3.9
23
21
  Requires-Python: >=3.6
24
- Requires-Dist: PyYAML (>=5.3.1)
25
- Requires-Dist: cliff (>=3.5.0)
26
- Requires-Dist: jsonpath-rw-ext (>=1.2.0)
27
- Requires-Dist: keystoneauth1 (>=4.3.0)
28
- Requires-Dist: os-client-config (>=2.1.0)
29
- Requires-Dist: osc-lib (>=2.3.0)
30
- Requires-Dist: oslo.log (>=4.4.0)
31
- Requires-Dist: oslo.utils (>=4.7.0)
32
- Requires-Dist: pbr (>=5.5.1)
22
+ License-File: LICENSE
23
+ License-File: AUTHORS
24
+ Requires-Dist: pbr >=5.5.1
25
+ Requires-Dist: cliff >=3.5.0
26
+ Requires-Dist: keystoneauth1 >=4.3.0
27
+ Requires-Dist: oslo.utils >=4.7.0
28
+ Requires-Dist: oslo.log >=4.4.0
29
+ Requires-Dist: PyYAML >=5.3.1
30
+ Requires-Dist: jsonpath-rw-ext >=1.2.0
31
+ Requires-Dist: os-client-config >=2.1.0
32
+ Requires-Dist: osc-lib >=2.3.0
33
33
 
34
34
  ================
35
35
  CloudKittyClient
@@ -48,5 +48,3 @@ The client is available on PyPi_.
48
48
  .. _CloudKitty: https://github.com/openstack/cloudkitty
49
49
  .. _PyPi: https://pypi.org/project/python-cloudkittyclient/
50
50
 
51
-
52
-
@@ -12,7 +12,7 @@ cloudkittyclient/common/client.py,sha256=PzUE8RxmvcUorH7QuRuH39n_EVbsLu8bqVAWCO7
12
12
  cloudkittyclient/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  cloudkittyclient/tests/utils.py,sha256=-IHeuTncxCMwF3CrE8DpXvZKgf4Prqpe7gh16HFDF24,1353
14
14
  cloudkittyclient/tests/functional/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- cloudkittyclient/tests/functional/base.py,sha256=H82jTBYW5PTyQqPL0xY9C2NKLzWjpBb4VmYRJLMg5_o,2023
15
+ cloudkittyclient/tests/functional/base.py,sha256=T2EAozIg4r2uQ6FfLbzLGm6wVGnLeE8PyFS2Bdi8Ryc,3395
16
16
  cloudkittyclient/tests/functional/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  cloudkittyclient/tests/functional/v1/test_collector.py,sha256=X8PPdlhIn0k0nqse5AElU9tBa3Z3Vri_1cTAlBfmBbI,2419
18
18
  cloudkittyclient/tests/functional/v1/test_hashmap.py,sha256=4GNrjdGXGDqfCtWkhzLA3YCV4_9055kwMq-wOp_rCzw,13022
@@ -70,11 +70,11 @@ cloudkittyclient/v2/summary_cli.py,sha256=v_vi1A4xQb9ACNFmigMtx7TzJmwFfaGb8Vxip4
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-4.7.1.dist-info/AUTHORS,sha256=63dDZVp26ZVEB0zoSJ0KNrtk73MHTVdNxJT-gpcU0c4,2602
74
- python_cloudkittyclient-4.7.1.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
75
- python_cloudkittyclient-4.7.1.dist-info/METADATA,sha256=jYhAgP7tkoSMEuxJ95m6cdi754gmOcL4j1xZ9yae5Mg,1959
76
- python_cloudkittyclient-4.7.1.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
77
- python_cloudkittyclient-4.7.1.dist-info/entry_points.txt,sha256=-MLVr_HbwVjfBc5ufkqjY1IuPZHxd2cKTP6hrkrg4bA,16185
78
- python_cloudkittyclient-4.7.1.dist-info/pbr.json,sha256=DAqa5kQCpsbTSWXg--hBPrXPw6cdIiuD-lphhQoDgJU,46
79
- python_cloudkittyclient-4.7.1.dist-info/top_level.txt,sha256=TtMJyxkmBFte9bhR6os7dENHUkoVxb6zshYScZMsGVA,17
80
- python_cloudkittyclient-4.7.1.dist-info/RECORD,,
73
+ python_cloudkittyclient-4.8.1.dist-info/AUTHORS,sha256=63dDZVp26ZVEB0zoSJ0KNrtk73MHTVdNxJT-gpcU0c4,2602
74
+ python_cloudkittyclient-4.8.1.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
75
+ python_cloudkittyclient-4.8.1.dist-info/METADATA,sha256=yNqzeko6NWsezS0y-ZH_119PcybMKk7PBk0k8yocGeU,1948
76
+ python_cloudkittyclient-4.8.1.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
77
+ python_cloudkittyclient-4.8.1.dist-info/entry_points.txt,sha256=ano5AeFl65CWYf-Agxm4QfP6kSfzBTSUq3h7cccU8-s,16184
78
+ python_cloudkittyclient-4.8.1.dist-info/pbr.json,sha256=rdBcBwF3yIw655bP4FCi5oqdd6s-I3x2XRJ3nJ1ROgs,46
79
+ python_cloudkittyclient-4.8.1.dist-info/top_level.txt,sha256=TtMJyxkmBFte9bhR6os7dENHUkoVxb6zshYScZMsGVA,17
80
+ python_cloudkittyclient-4.8.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.34.2)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -219,4 +219,3 @@ rating_scope_state_reset = cloudkittyclient.v2.scope_cli:CliScopeStateReset
219
219
  rating_summary_get = cloudkittyclient.v2.summary_cli:CliSummaryGet
220
220
  rating_tasks_reprocessing_create = cloudkittyclient.v2.reprocessing_cli:CliReprocessingTasksPost
221
221
  rating_tasks_reprocessing_get = cloudkittyclient.v2.reprocessing_cli:CliReprocessingTasksGet
222
-
@@ -0,0 +1 @@
1
+ {"git_version": "c151d6b", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "e07c295", "is_release": true}