Compare commits
2 Commits
unmaintain
...
zed-eom
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f07486434 | |||
| cd9eebdebf |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,4 +16,3 @@ dist
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
releasenotes/build
|
||||
.idea/
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
host=review.opendev.org
|
||||
port=29418
|
||||
project=openstack/python-cloudkittyclient.git
|
||||
defaultbranch=unmaintained/2024.1
|
||||
defaultbranch=stable/zed
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
templates:
|
||||
- check-requirements
|
||||
- openstack-cover-jobs
|
||||
- openstack-python3-jobs
|
||||
- openstack-python3-zed-jobs
|
||||
- openstackclient-plugin-jobs
|
||||
- publish-openstack-docs-pti
|
||||
- release-notes-jobs-python3
|
||||
|
||||
@@ -15,57 +15,26 @@
|
||||
#
|
||||
import json
|
||||
import os
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
from cloudkittyclient.tests import utils
|
||||
|
||||
from oslo_log import log
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
class BaseFunctionalTest(utils.BaseTestCase):
|
||||
|
||||
# DevStack is using VENV by default. Therefore, to execute the commands,
|
||||
# we need to activate the VENV. And, to do that, we need the VENV path.
|
||||
# This path is hardcoded here because we could not find a variable in this
|
||||
# Python code to retrieve the VENV variable from the test machine.
|
||||
# It seems that because of the stack TOX -> stestr -> this python code, and
|
||||
# so on, we are not able to access the DevStack variables here.
|
||||
#
|
||||
# If somebody finds a solution, we can remove the hardcoded path here.
|
||||
DEV_STACK_VENV_BASE_PATH = "/opt/stack/data/venv"
|
||||
|
||||
BASE_COMMAND_WITH_VENV = "source %s/bin/activate && %s "
|
||||
|
||||
def _run(self, executable, action,
|
||||
flags='', params='', fmt='-f json', stdin=None, has_output=True):
|
||||
if not has_output:
|
||||
fmt = ''
|
||||
|
||||
does_venv_exist = not os.system("ls -lah /opt/stack/data/venv")
|
||||
LOG.info("Test to check if the VENV file exist returned: [%s].",
|
||||
does_venv_exist)
|
||||
|
||||
system_variables = os.environ.copy()
|
||||
LOG.info("System variables [%s] found when executing the tests.",
|
||||
system_variables)
|
||||
|
||||
cmd = ' '.join([executable, flags, action, params, fmt])
|
||||
|
||||
actual_command_with_venv = self.BASE_COMMAND_WITH_VENV % (
|
||||
self.DEV_STACK_VENV_BASE_PATH, cmd)
|
||||
|
||||
LOG.info("Command being executed: [%s].", actual_command_with_venv)
|
||||
|
||||
cmd = shlex.split(cmd)
|
||||
p = subprocess.Popen(
|
||||
["bash", "-c", actual_command_with_venv],
|
||||
env=os.environ.copy(), shell=False, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, stdin=subprocess.PIPE if stdin else None
|
||||
cmd, env=os.environ.copy(), shell=False,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
stdin=subprocess.PIPE if stdin else None,
|
||||
)
|
||||
stdout, stderr = p.communicate(input=stdin)
|
||||
LOG.info("Standard output [%s] and error output [%s] for command "
|
||||
"[%s]. ", stdout, stderr, actual_command_with_venv)
|
||||
if p.returncode != 0:
|
||||
raise RuntimeError('"{cmd}" returned {val}: {msg}'.format(
|
||||
cmd=' '.join(cmd), val=p.returncode, msg=stderr))
|
||||
|
||||
@@ -19,6 +19,8 @@ class ReprocessingManager(base.BaseManager):
|
||||
|
||||
url = '/v2/task/reprocesses'
|
||||
|
||||
url_to_post = '/v2/task/reprocess'
|
||||
|
||||
def get_reprocessing_tasks(self, offset=0, limit=100, scope_ids=[],
|
||||
order="DESC", **kwargs):
|
||||
"""Returns a paginated list of reprocessing tasks.
|
||||
@@ -73,4 +75,4 @@ class ReprocessingManager(base.BaseManager):
|
||||
|
||||
body = dict(filter(lambda elem: bool(elem[1]), body.items()))
|
||||
|
||||
return self.api_client.post(self.url, json=body).json()
|
||||
return self.api_client.post(self.url_to_post, json=body).json()
|
||||
|
||||
@@ -44,8 +44,8 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = 'python-cloudkittyclient'
|
||||
copyright = '2017, OpenStack Foundation'
|
||||
project = u'python-cloudkittyclient'
|
||||
copyright = u'2017, OpenStack Foundation'
|
||||
|
||||
# openstackdocstheme options
|
||||
repository_name = 'openstack/python-cloudkittyclient'
|
||||
@@ -99,8 +99,8 @@ latex_elements = {
|
||||
latex_documents = [
|
||||
('index',
|
||||
'doc-%s.tex' % project,
|
||||
'%s Documentation' % project,
|
||||
'OpenStack Foundation', 'howto', True),
|
||||
u'%s Documentation' % project,
|
||||
u'OpenStack Foundation', 'howto', True),
|
||||
]
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed a bug where creating a reprocessing task would fail due to sending a
|
||||
POST request to the wrong endpoint.
|
||||
@@ -1,6 +0,0 @@
|
||||
===========================
|
||||
2023.1 Series Release Notes
|
||||
===========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/2023.1
|
||||
@@ -1,6 +0,0 @@
|
||||
===========================
|
||||
2023.2 Series Release Notes
|
||||
===========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/2023.2
|
||||
@@ -42,8 +42,8 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = 'CloudKitty Client Release Notes'
|
||||
copyright = '2016, CloudKitty developers'
|
||||
project = u'CloudKitty Client Release Notes'
|
||||
copyright = u'2016, CloudKitty developers'
|
||||
|
||||
# Release notes are version independent.
|
||||
# The short X.Y version.
|
||||
@@ -194,8 +194,8 @@ latex_elements = {
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
('index', 'PythonCloudKittyClient.tex',
|
||||
'CloudKitty Client Release Notes Documentation',
|
||||
'CloudKitty developers', 'manual'),
|
||||
u'CloudKitty Client Release Notes Documentation',
|
||||
u'CloudKitty developers', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
@@ -225,8 +225,8 @@ latex_documents = [
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'cloudkittyclient',
|
||||
'CloudKitty Client Release Notes Documentation',
|
||||
['CloudKitty developers'], 1)
|
||||
u'CloudKitty Client Release Notes Documentation',
|
||||
[u'CloudKitty developers'], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
@@ -240,8 +240,8 @@ man_pages = [
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'cloudkittyclient',
|
||||
'CloudKitty Client Release Notes Documentation',
|
||||
'CloudKitty Client developers', 'CloudKittyClient',
|
||||
u'CloudKitty Client Release Notes Documentation',
|
||||
u'CloudKitty Client developers', 'CloudKittyClient',
|
||||
'One line description of project.', 'Miscellaneous'),
|
||||
]
|
||||
|
||||
|
||||
@@ -8,9 +8,6 @@ Contents
|
||||
:maxdepth: 2
|
||||
|
||||
unreleased
|
||||
2023.2
|
||||
2023.1
|
||||
zed
|
||||
yoga
|
||||
xena
|
||||
wallaby
|
||||
|
||||
@@ -3,4 +3,4 @@ Yoga Series Release Notes
|
||||
=========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: unmaintained/yoga
|
||||
:branch: stable/yoga
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
========================
|
||||
Zed Series Release Notes
|
||||
========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/zed
|
||||
@@ -6,7 +6,7 @@ description_file =
|
||||
author = OpenStack
|
||||
author_email = openstack-discuss@lists.openstack.org
|
||||
home_page = https://docs.openstack.org/python-cloudkittyclient/latest/
|
||||
python_requires = >=3.8
|
||||
python_requires = >=3.6
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
@@ -17,10 +17,10 @@ classifier =
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
|
||||
[files]
|
||||
packages =
|
||||
|
||||
37
tox.ini
37
tox.ini
@@ -9,7 +9,6 @@ basepython = python3
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
setenv =
|
||||
DEVSTACK_VENV={env:DEVSTACK_VENV}
|
||||
VIRTUAL_ENV={envdir}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
@@ -30,40 +29,12 @@ commands =
|
||||
commands = oslo_debug_helper -t cloudkittyclient/tests {posargs}
|
||||
|
||||
[testenv:functional-v1]
|
||||
passenv =
|
||||
OS_CLOUD
|
||||
OS_PROJECT_DOMAIN_ID
|
||||
OS_USER_DOMAIN_ID
|
||||
OS_PROJECT_DOMAIN_NAME
|
||||
OS_USER_DOMAIN_NAME
|
||||
OS_PROJECT_NAME
|
||||
OS_IDENTITY_API_VERSION
|
||||
OS_PASSWORD
|
||||
OS_AUTH_TYPE
|
||||
OS_AUTH_URL
|
||||
OS_USERNAME
|
||||
OS_ENDPOINT
|
||||
DEVSTACK_VENV
|
||||
VIRTUAL_ENV
|
||||
passenv = OS_CLOUD OS_PROJECT_DOMAIN_ID OS_USER_DOMAIN_ID OS_PROJECT_DOMAIN_NAME OS_USER_DOMAIN_NAME OS_PROJECT_NAME OS_IDENTITY_API_VERSION OS_PASSWORD OS_AUTH_TYPE OS_AUTH_URL OS_USERNAME OS_ENDPOINT
|
||||
setenv = OS_RATING_API_VERSION=1
|
||||
commands = stestr run --concurrency=1 --test-path ./cloudkittyclient/tests/functional/v1
|
||||
|
||||
[testenv:functional-v2]
|
||||
passenv =
|
||||
OS_CLOUD
|
||||
OS_PROJECT_DOMAIN_ID
|
||||
OS_USER_DOMAIN_ID
|
||||
OS_PROJECT_DOMAIN_NAME
|
||||
OS_USER_DOMAIN_NAME
|
||||
OS_PROJECT_NAME
|
||||
OS_IDENTITY_API_VERSION
|
||||
OS_PASSWORD
|
||||
OS_AUTH_TYPE
|
||||
OS_AUTH_URL
|
||||
OS_USERNAME
|
||||
OS_ENDPOINT
|
||||
DEVSTACK_VENV
|
||||
VIRTUAL_ENV
|
||||
passenv = OS_CLOUD OS_PROJECT_DOMAIN_ID OS_USER_DOMAIN_ID OS_PROJECT_DOMAIN_NAME OS_USER_DOMAIN_NAME OS_PROJECT_NAME OS_IDENTITY_API_VERSION OS_PASSWORD OS_AUTH_TYPE OS_AUTH_URL OS_USERNAME OS_ENDPOINT
|
||||
setenv = OS_RATING_API_VERSION=2
|
||||
commands = stestr run --concurrency=1 --test-path ./cloudkittyclient/tests/functional/v2
|
||||
|
||||
@@ -75,7 +46,7 @@ commands = {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2024.1}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/zed}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build --keep-going -b html doc/source doc/build/html
|
||||
|
||||
@@ -101,7 +72,7 @@ import_exceptions = cloudkittyclient.i18n
|
||||
|
||||
[testenv:releasenotes]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2024.1}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/zed}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
Reference in New Issue
Block a user