Compare commits

..

5 Commits

Author SHA1 Message Date
e815d012fd Update .gitreview for unmaintained/wallaby
Change-Id: I29584b7fa0824a83d7c41975dff2ec750defa6ca
2024-03-05 14:54:49 +00:00
Pierre Riteau
628c2406c6 Fix formatting of release note
Single backtick is italic, double backtick is code.

Change-Id: Ieda9b224c07f653678661ab78ff66023aa8d3bf1
2021-04-20 16:29:06 +00:00
Pierre Riteau
27aa2af1f9 Add release notes job template
Without this job template there are no release notes published [1].

[1] https://docs.openstack.org/releasenotes/python-cloudkittyclient

Change-Id: I8ab231a4c563ecc2f8db22bade12bf4afa9fafc8
(cherry picked from commit 73668bebb0)
2021-04-19 22:42:29 +02:00
9bf5cf89f1 Update TOX_CONSTRAINTS_FILE for stable/wallaby
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/wallaby branch, tests will
continue to use the upper-constraints list on master.

Change-Id: I8700ff293c06504ab72a27e0d96460ac0a2cab78
2021-03-19 13:00:52 +00:00
2fe49e1947 Update .gitreview for stable/wallaby
Change-Id: I417f2b197ff5ce2492f0c625d27306f237250493
2021-03-19 13:00:23 +00:00
18 changed files with 46 additions and 124 deletions

View File

@@ -2,3 +2,4 @@
host=review.opendev.org
port=29418
project=openstack/python-cloudkittyclient.git
defaultbranch=unmaintained/wallaby

View File

@@ -46,7 +46,7 @@
- openstack-lower-constraints-jobs
- check-requirements
- openstack-cover-jobs
- openstack-python3-yoga-jobs
- openstack-python3-wallaby-jobs
- openstackclient-plugin-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3

View File

@@ -1,19 +1,16 @@
The source repository for this project can be found at:
https://opendev.org/openstack/python-cloudkittyclient
If you would like to contribute to the development of OpenStack,
you must follow the steps in this page:
Pull requests submitted through GitHub are not monitored.
https://docs.openstack.org/infra/manual/developers.html
To start contributing to OpenStack, follow the steps in the contribution guide
to set up and use Gerrit:
Once those steps have been completed, changes to OpenStack
should be submitted for review via the Gerrit tool, following
the workflow documented at:
https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
https://docs.openstack.org/infra/manual/developers.html#development-workflow
Bugs should be filed on Storyboard:
Pull requests submitted through GitHub will be ignored.
https://storyboard.openstack.org/#!/project/895
Bugs should be filed on Storyboard, not GitHub:
For more specific information about contributing to this repository, see the
python-cloudkittyclient contributor guide:
https://docs.openstack.org/python-cloudkittyclient/latest/contributor/contributing.html
https://storyboard.openstack.org/#!/project/openstack/python-cloudkittyclient

View File

@@ -137,7 +137,7 @@ class CkDataframesTest(base.BaseFunctionalTest):
super(CkDataframesTest, self).tearDown()
def test_dataframes_add_with_no_args(self):
self.assertRaisesRegex(
self.assertRaisesRegexp(
RuntimeError,
'error: the following arguments are required: datafile',
self.runner,

View File

@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from collections import abc
import collections
from unittest import mock
from cloudkittyclient.tests.unit.v1 import base
@@ -57,7 +57,7 @@ class TestReportCli(base.BaseAPIEndpointTestCase):
assert len(result) == 2
assert result[0] == ('Tenant ID', )
assert isinstance(result[1], abc.Iterable)
assert isinstance(result[1], collections.Iterable)
for res in result[1]:
assert isinstance(res, abc.Iterable)
assert isinstance(res, collections.Iterable)

View File

@@ -172,7 +172,7 @@ class HashmapManager(base.BaseManager):
:param value: Value of the mapping
:type value: str
"""
if kwargs.get('cost') is None:
if not kwargs.get('cost'):
raise exc.ArgumentRequired("'cost' argument is required")
if not kwargs.get('value'):
if not kwargs.get('service_id'):

View File

@@ -36,8 +36,6 @@ class SummaryManager(base.BaseManager):
:type begin: datetime.datetime
:param end: End of the period to gather data from
:type end: datetime.datetime
:param response_format: Either 'table' or 'object' defaults to 'table'
:type response_format: str
"""
if 'groupby' in kwargs.keys() and isinstance(kwargs['groupby'], list):
kwargs['groupby'] = ','.join(kwargs['groupby'])
@@ -48,8 +46,7 @@ class SummaryManager(base.BaseManager):
)
authorized_args = [
'offset', 'limit', 'filters', 'groupby', 'begin', 'end',
'response_format']
'offset', 'limit', 'filters', 'groupby', 'begin', 'end']
url = self.get_url(None, kwargs, authorized_args=authorized_args)
return self.api_client.get(url).json()

View File

@@ -0,0 +1,5 @@
============
Contributing
============
.. include:: ../../CONTRIBUTING.rst

View File

@@ -1,47 +0,0 @@
============================
So You Want to Contribute...
============================
For general information on contributing to OpenStack, please check out the
`contributor guide <https://docs.openstack.org/contributors/>`_ to get started.
It covers all the basics that are common to all OpenStack projects: the accounts
you need, the basics of interacting with our Gerrit review system, how we
communicate as a community, etc.
Below will cover the more project specific information you need to get started
with python-cloudkittyclient.
Communication
~~~~~~~~~~~~~
* IRC channel #cloudkitty at `OFTC <http://oftc.net>`_
* Mailing list (prefix subjects with ``[cloudkitty]`` for faster responses)
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss
Contacting the Core Team
~~~~~~~~~~~~~~~~~~~~~~~~
Please refer the `python-cloudkittyclient Core Team
<https://review.opendev.org/admin/groups/4ac765c35f985b3ad9226da07fdcc205c1ce4fe1,members>`_ contacts.
New Feature Planning
~~~~~~~~~~~~~~~~~~~~
CloudKitty features are tracked on `Storyboard <https://storyboard.openstack.org/#!/project/895>`_.
Task Tracking
~~~~~~~~~~~~~
We track our tasks in `Storyboard <https://storyboard.openstack.org/#!/project/895>`_.
If you're looking for some smaller, easier work item to pick up and get started
on, search for the 'low-hanging-fruit' tag.
Reporting a Bug
~~~~~~~~~~~~~~~
You found an issue and want to make sure we are aware of it? You can do so on
`StoryBoard <https://storyboard.openstack.org/#!/project/895>`_.
Getting Your Patch Merged
~~~~~~~~~~~~~~~~~~~~~~~~~
All changes proposed to the python-cloudkittyclient project require one or two +2 votes
from python-cloudkittyclient core reviewers before one of the core reviewers can approve
patch by giving ``Workflow +1`` vote.
Project Team Lead Duties
~~~~~~~~~~~~~~~~~~~~~~~~
All common PTL duties are enumerated in the `PTL guide
<https://docs.openstack.org/project-team-guide/ptl.html>`_.

View File

@@ -12,19 +12,10 @@ Contents:
install
usage
contributor
cli_reference
api_reference/index
For Contributors
================
* If you are a new contributor to python-cloudkittyclient please refer: :doc:`contributor/contributing`
.. toctree::
:hidden:
contributor/contributing
Indices and tables
==================

View File

@@ -1,8 +1,8 @@
---
fixes:
- |
Fix `create_threshold` method when using cost as 0.
When using 0 as the cost, the `create_threshold` method
Fix ``create_threshold`` method when using cost as 0.
When using 0 as the cost, the ``create_threshold`` method
throws an exception. That happens because 0 (zero) is evaluated
to False. Therefore, we need to change the validation method to
check if the values are None.

View File

@@ -1,4 +0,0 @@
---
fixes:
- |
Fixes creation of hashmap mappings with a zero cost.

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# CloudKitty Client Release Notes documentation build configuration file.
# Cloudkitty Release Notes documentation build configuration file.
#
# This file is execfile()d with the current directory set to its
# containing dir.
@@ -42,8 +42,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'CloudKitty Client Release Notes'
copyright = u'2016, CloudKitty developers'
project = u'Cloudkitty Client Release Notes'
copyright = u'2016, Cloudkitty developers'
# Release notes are version independent.
# The short X.Y version.
@@ -173,7 +173,7 @@ html_static_path = ['_static']
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'CloudKittyClientReleaseNotestdoc'
htmlhelp_basename = 'CloudkittyReleaseNotestdoc'
# -- Options for LaTeX output ---------------------------------------------
@@ -193,9 +193,8 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'PythonCloudKittyClient.tex',
u'CloudKitty Client Release Notes Documentation',
u'CloudKitty developers', 'manual'),
('index', 'PythonCloudkitty.tex', u'Cloudkitty 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 +224,8 @@ latex_documents = [
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'cloudkittyclient',
u'CloudKitty Client Release Notes Documentation',
[u'CloudKitty developers'], 1)
u'Cloudkitty Client Release Notes Documentation',
[u'Cloudkitty developers'], 1)
]
# If true, show URL addresses after external links.
@@ -240,8 +239,8 @@ man_pages = [
# dir menu entry, description, category)
texinfo_documents = [
('index', 'cloudkittyclient',
u'CloudKitty Client Release Notes Documentation',
u'CloudKitty Client developers', 'CloudKittyClient',
u'Cloudkitty Client Release Notes Documentation',
u'Cloudkitty Client developers', 'Cloudkittyclient',
'One line description of project.', 'Miscellaneous'),
]

View File

@@ -1,4 +1,4 @@
Welcome to CloudKitty Client Release Notes documentation!
Welcome to Cloudkitty Client Release Notes documentation!
=========================================================
Contents
@@ -8,8 +8,6 @@ Contents
:maxdepth: 2
unreleased
xena
wallaby
victoria
ussuri
train

View File

@@ -1,6 +0,0 @@
============================
Wallaby Series Release Notes
============================
.. release-notes::
:branch: stable/wallaby

View File

@@ -1,6 +0,0 @@
=========================
Xena Series Release Notes
=========================
.. release-notes::
:branch: stable/xena

View File

@@ -1,12 +1,12 @@
[metadata]
name = python-cloudkittyclient
summary = API client of cloudkitty, Rating as a Service project.
description_file =
description-file =
README.rst
author = OpenStack
author_email = openstack-discuss@lists.openstack.org
home_page = https://docs.openstack.org/python-cloudkittyclient/latest/
python_requires = >=3.6
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/python-cloudkittyclient/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@@ -20,7 +20,6 @@ classifier =
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
[files]
packages =

12
tox.ini
View File

@@ -1,6 +1,6 @@
[tox]
minversion = 3.18.0
envlist = py3,pep8
minversion = 3.1.1
envlist = py36,py38,pep8
skipsdist = True
ignore_basepython_conflict = True
@@ -45,15 +45,13 @@ commands = flake8
commands = {posargs}
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build --keep-going -b html doc/source doc/build/html
[testenv:pdf-docs]
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
allowlist_externals =
whitelist_externals =
make
commands =
sphinx-build --keep-going -b latex doc/source doc/build/pdf
@@ -72,7 +70,7 @@ import_exceptions = cloudkittyclient.i18n
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/wallaby}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html