Compare commits
42 Commits
ussuri-eol
...
xena-em
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
647f561532 | ||
|
|
61ef2c337e | ||
|
|
b1df2b5ccc | ||
|
|
68fd0e9e33 | ||
|
|
eb7f5e46bb | ||
|
|
0608c0527b | ||
|
|
754e06c51c | ||
|
|
d12e5a821c | ||
|
|
d2c2323bf8 | ||
|
|
67fae0ff52 | ||
|
|
73668bebb0 | ||
| dc606b1d3c | |||
| 5141971122 | |||
|
|
1e8b06243e | ||
|
|
a15f11a7d2 | ||
|
|
c2b5ed9535 | ||
|
|
bddf634143 | ||
|
|
5442134a5f | ||
|
|
3ec8f86e5a | ||
|
|
5b35e817b2 | ||
|
|
953c6c9443 | ||
| 30e21ddf7b | |||
| c24de5fe54 | |||
|
|
2a3dd279dc | ||
|
|
def535752f | ||
|
|
d3408517d6 | ||
|
|
37df7e1258 | ||
|
|
e9a6c22cef | ||
|
|
db10c24e25 | ||
|
|
2bcd29dcbd | ||
|
|
d5a99b511f | ||
|
|
2a475bbb4a | ||
|
|
8f9e104f84 | ||
|
|
a2f3de89b4 | ||
|
|
608cd0262f | ||
|
|
de3c4924e9 | ||
|
|
e88a3fa033 | ||
|
|
61dc82cb54 | ||
|
|
e69f9d5452 | ||
| 73cb650ee4 | |||
| 8bc96e21a9 | |||
|
|
3f97e9844a |
@@ -2,4 +2,3 @@
|
||||
host=review.opendev.org
|
||||
port=29418
|
||||
project=openstack/python-cloudkittyclient.git
|
||||
defaultbranch=stable/ussuri
|
||||
|
||||
@@ -46,9 +46,10 @@
|
||||
- openstack-lower-constraints-jobs
|
||||
- check-requirements
|
||||
- openstack-cover-jobs
|
||||
- openstack-python3-ussuri-jobs
|
||||
- openstack-python3-xena-jobs
|
||||
- openstackclient-plugin-jobs
|
||||
- publish-openstack-docs-pti
|
||||
- release-notes-jobs-python3
|
||||
check:
|
||||
jobs:
|
||||
- cloudkittyclient-devstack-functional-v1-client:
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
If you would like to contribute to the development of OpenStack,
|
||||
you must follow the steps in this page:
|
||||
The source repository for this project can be found at:
|
||||
|
||||
https://opendev.org/openstack/python-cloudkittyclient
|
||||
|
||||
https://docs.openstack.org/infra/manual/developers.html
|
||||
Pull requests submitted through GitHub are not monitored.
|
||||
|
||||
Once those steps have been completed, changes to OpenStack
|
||||
should be submitted for review via the Gerrit tool, following
|
||||
the workflow documented at:
|
||||
To start contributing to OpenStack, follow the steps in the contribution guide
|
||||
to set up and use Gerrit:
|
||||
|
||||
https://docs.openstack.org/infra/manual/developers.html#development-workflow
|
||||
https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
|
||||
|
||||
Pull requests submitted through GitHub will be ignored.
|
||||
Bugs should be filed on Storyboard:
|
||||
|
||||
Bugs should be filed on Storyboard, not GitHub:
|
||||
https://storyboard.openstack.org/#!/project/895
|
||||
|
||||
https://storyboard.openstack.org/#!/project/openstack/python-cloudkittyclient
|
||||
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
|
||||
|
||||
@@ -12,11 +12,9 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
from string import Formatter as StringFormatter
|
||||
|
||||
from six import add_metaclass
|
||||
from six.moves.urllib.parse import urlencode
|
||||
from string import Formatter as StringFormatter
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from cloudkittyclient import utils
|
||||
|
||||
@@ -31,8 +29,7 @@ class HttpDecoratorMeta(type):
|
||||
)
|
||||
|
||||
|
||||
@add_metaclass(HttpDecoratorMeta)
|
||||
class BaseManager(object):
|
||||
class BaseManager(object, metaclass=HttpDecoratorMeta):
|
||||
"""Base class for Endpoint Manager objects."""
|
||||
|
||||
url = ''
|
||||
|
||||
@@ -162,6 +162,11 @@ class CkDataframesTest(base.BaseFunctionalTest):
|
||||
has_output=False,
|
||||
)
|
||||
|
||||
def test_dataframes_get(self):
|
||||
# TODO(jferrieu): functional tests will be added in another
|
||||
# patch for `dataframes get`
|
||||
pass
|
||||
|
||||
|
||||
class OSCDataframesTest(CkDataframesTest):
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from cloudkittyclient import exc
|
||||
from cloudkittyclient.tests.unit.v1 import base
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
import collections
|
||||
import mock
|
||||
from collections import abc
|
||||
from unittest import mock
|
||||
|
||||
from cloudkittyclient.tests.unit.v1 import base
|
||||
from cloudkittyclient.v1 import report_cli
|
||||
@@ -57,7 +57,7 @@ class TestReportCli(base.BaseAPIEndpointTestCase):
|
||||
|
||||
assert len(result) == 2
|
||||
assert result[0] == ('Tenant ID', )
|
||||
assert isinstance(result[1], collections.Iterable)
|
||||
assert isinstance(result[1], abc.Iterable)
|
||||
|
||||
for res in result[1]:
|
||||
assert isinstance(res, collections.Iterable)
|
||||
assert isinstance(res, abc.Iterable)
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#
|
||||
import json
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
from cloudkittyclient import exc
|
||||
from cloudkittyclient.tests.unit.v2 import base
|
||||
|
||||
@@ -149,3 +151,22 @@ class TestDataframes(base.BaseAPIEndpointTestCase):
|
||||
self.assertRaises(
|
||||
exc.ArgumentRequired,
|
||||
self.dataframes.add_dataframes)
|
||||
|
||||
def test_get_dataframes(self):
|
||||
self.dataframes.get_dataframes()
|
||||
self.api_client.get.assert_called_once_with('/v2/dataframes')
|
||||
|
||||
def test_get_dataframes_with_pagination_args(self):
|
||||
self.dataframes.get_dataframes(offset=10, limit=10)
|
||||
try:
|
||||
self.api_client.get.assert_called_once_with(
|
||||
'/v2/dataframes?limit=10&offset=10')
|
||||
except AssertionError:
|
||||
self.api_client.get.assert_called_once_with(
|
||||
'/v2/dataframes?offset=10&limit=10')
|
||||
|
||||
def test_get_dataframes_filters(self):
|
||||
self.dataframes.get_dataframes(
|
||||
filters=OrderedDict([('one', 'two'), ('three', 'four')]))
|
||||
self.api_client.get.assert_called_once_with(
|
||||
'/v2/dataframes?filters=one%3Atwo%2Cthree%3Afour')
|
||||
|
||||
@@ -12,12 +12,13 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import testtools
|
||||
|
||||
from keystoneauth1 import adapter
|
||||
from keystoneauth1 import session
|
||||
import mock
|
||||
|
||||
|
||||
class BaseTestCase(testtools.TestCase):
|
||||
|
||||
@@ -172,7 +172,7 @@ class HashmapManager(base.BaseManager):
|
||||
:param value: Value of the mapping
|
||||
:type value: str
|
||||
"""
|
||||
if not kwargs.get('cost'):
|
||||
if kwargs.get('cost') is None:
|
||||
raise exc.ArgumentRequired("'cost' argument is required")
|
||||
if not kwargs.get('value'):
|
||||
if not kwargs.get('service_id'):
|
||||
@@ -373,7 +373,7 @@ class HashmapManager(base.BaseManager):
|
||||
:type level: str
|
||||
"""
|
||||
for arg in ['cost', 'level']:
|
||||
if not kwargs.get(arg):
|
||||
if kwargs.get(arg) is None:
|
||||
raise exc.ArgumentRequired(
|
||||
"'{}' argument is required".format(arg))
|
||||
if not kwargs.get('service_id') and not kwargs.get('field_id'):
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
#
|
||||
import json
|
||||
import six
|
||||
|
||||
from cloudkittyclient.common import base
|
||||
from cloudkittyclient import exc
|
||||
@@ -36,7 +35,7 @@ class DataframesManager(base.BaseManager):
|
||||
if not dataframes:
|
||||
raise exc.ArgumentRequired("'dataframes' argument is required")
|
||||
|
||||
if not isinstance(dataframes, six.string_types):
|
||||
if not isinstance(dataframes, str):
|
||||
try:
|
||||
dataframes = json.dumps(dataframes)
|
||||
except TypeError:
|
||||
@@ -49,3 +48,30 @@ class DataframesManager(base.BaseManager):
|
||||
url,
|
||||
data=dataframes,
|
||||
)
|
||||
|
||||
def get_dataframes(self, **kwargs):
|
||||
"""Returns a paginated list of DataFrames.
|
||||
|
||||
This support filters and datetime framing.
|
||||
|
||||
:param offset: Index of the first dataframe that should be returned.
|
||||
:type offset: int
|
||||
:param limit: Maximal number of dataframes to return.
|
||||
:type limit: int
|
||||
:param filters: Optional dict of filters to select data on.
|
||||
:type filters: dict
|
||||
:param begin: Start of the period to gather data from
|
||||
:type begin: datetime.datetime
|
||||
:param end: End of the period to gather data from
|
||||
:type end: datetime.datetime
|
||||
"""
|
||||
kwargs['filters'] = ','.join(
|
||||
'{}:{}'.format(k, v) for k, v in
|
||||
(kwargs.get('filters', None) or {}).items()
|
||||
)
|
||||
|
||||
authorized_args = [
|
||||
'offset', 'limit', 'filters', 'begin', 'end']
|
||||
|
||||
url = self.get_url(None, kwargs, authorized_args=authorized_args)
|
||||
return self.api_client.get(url).json()
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
import argparse
|
||||
|
||||
from cliff import command
|
||||
from cliff import lister
|
||||
from oslo_utils import timeutils
|
||||
|
||||
from cloudkittyclient import utils
|
||||
|
||||
@@ -40,3 +42,75 @@ class CliDataframesAdd(command.Command):
|
||||
utils.get_client_from_osc(self).dataframes.add_dataframes(
|
||||
dataframes=dataframes,
|
||||
)
|
||||
|
||||
|
||||
class CliDataframesGet(lister.Lister):
|
||||
"""Get dataframes from the storage backend."""
|
||||
columns = [
|
||||
('begin', 'Begin'),
|
||||
('end', 'End'),
|
||||
('metric', 'Metric Type'),
|
||||
('unit', 'Unit'),
|
||||
('qty', 'Quantity'),
|
||||
('price', 'Price'),
|
||||
('groupby', 'Group By'),
|
||||
('metadata', 'Metadata'),
|
||||
]
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(CliDataframesGet, self).get_parser(prog_name)
|
||||
|
||||
def filter_(elem):
|
||||
if len(elem.split(':')) != 2:
|
||||
raise TypeError
|
||||
return str(elem)
|
||||
|
||||
parser.add_argument('--offset', type=int, default=0,
|
||||
help='Index of the first dataframe')
|
||||
parser.add_argument('--limit', type=int, default=100,
|
||||
help='Maximal number of dataframes')
|
||||
parser.add_argument('--filter', type=filter_, action='append',
|
||||
help="Optional filter, in 'key:value' format. Can "
|
||||
"be specified several times.")
|
||||
parser.add_argument('-b', '--begin', type=timeutils.parse_isotime,
|
||||
help="Start of the period to query, in iso8601 "
|
||||
"format. Example: 2019-05-01T00:00:00Z.")
|
||||
parser.add_argument('-e', '--end', type=timeutils.parse_isotime,
|
||||
help="End of the period to query, in iso8601 "
|
||||
"format. Example: 2019-06-01T00:00:00Z.")
|
||||
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
filters = dict(elem.split(':') for elem in (parsed_args.filter or []))
|
||||
|
||||
dataframes = utils.get_client_from_osc(self).dataframes.get_dataframes(
|
||||
offset=parsed_args.offset,
|
||||
limit=parsed_args.limit,
|
||||
begin=parsed_args.begin,
|
||||
end=parsed_args.end,
|
||||
filters=filters,
|
||||
).get('dataframes', [])
|
||||
|
||||
def format_(d):
|
||||
return ' '.join([
|
||||
'{}="{}"'.format(k, v) for k, v in (d or {}).items()])
|
||||
|
||||
values = []
|
||||
for df in dataframes:
|
||||
period = df['period']
|
||||
usage = df['usage']
|
||||
for metric_type, points in usage.items():
|
||||
for point in points:
|
||||
values.append([
|
||||
period['begin'],
|
||||
period['end'],
|
||||
metric_type,
|
||||
point['vol']['unit'],
|
||||
point['vol']['qty'],
|
||||
point['rating']['price'],
|
||||
format_(point.get('groupby', {})),
|
||||
format_(point.get('metadata', {})),
|
||||
])
|
||||
|
||||
return [col[1] for col in self.columns], values
|
||||
|
||||
@@ -60,7 +60,7 @@ add_function_parentheses = True
|
||||
add_module_names = True
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
pygments_style = 'native'
|
||||
|
||||
# -- Options for HTML output --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
============
|
||||
Contributing
|
||||
============
|
||||
|
||||
.. include:: ../../CONTRIBUTING.rst
|
||||
47
doc/source/contributor/contributing.rst
Normal file
47
doc/source/contributor/contributing.rst
Normal file
@@ -0,0 +1,47 @@
|
||||
============================
|
||||
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>`_.
|
||||
@@ -12,10 +12,19 @@ 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
|
||||
==================
|
||||
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
# requirements
|
||||
pbr==2.0.0 # Apache-2.0
|
||||
cliff==2.11.0 # Apache-2.0
|
||||
keystoneauth1==3.4.0 # Apache-2.0
|
||||
oslo.utils==3.35 # Apache-2.0
|
||||
oslo.log==3.36 # Apache-2.0
|
||||
PyYAML==3.12 # MIT
|
||||
jsonpath-rw-ext==1.0 # Apache-2.0
|
||||
six==1.11 # MIT
|
||||
os-client-config==1.29.0 # Apache-2.0
|
||||
osc-lib==1.12.1 # Apache-2.0
|
||||
pbr==5.5.1 # Apache-2.0
|
||||
cliff==3.5.0 # Apache-2.0
|
||||
keystoneauth1==4.3.0 # Apache-2.0
|
||||
oslo.utils==4.7.0 # Apache-2.0
|
||||
oslo.log==4.4.0 # Apache-2.0
|
||||
PyYAML==5.3.1 # MIT
|
||||
jsonpath-rw-ext==1.2.0 # Apache-2.0
|
||||
os-client-config==2.1.0 # Apache-2.0
|
||||
osc-lib==2.3.0 # Apache-2.0
|
||||
|
||||
# test-requirements.txt
|
||||
pyflakes==2.1.1
|
||||
coverage==4.0 # Apache-2.0
|
||||
python-subunit==0.0.18 # Apache-2.0/BSD
|
||||
python-subunit==1.4.0 # Apache-2.0/BSD
|
||||
oslotest==1.10.0 # Apache-2.0
|
||||
stestr==2.0 # Apache-2.0
|
||||
mock==2.0 # BSD
|
||||
python-openstackclient==3.14 # Apache-2.0
|
||||
|
||||
# doc/requirements.txt
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Support for the ``GET /v2/dataframes`` endpoint has been added
|
||||
to the client. A new ``dataframes get`` CLI command is also available.
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
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.
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes creation of hashmap mappings with a zero cost.
|
||||
@@ -82,7 +82,7 @@ exclude_patterns = []
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
pygments_style = 'native'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
@@ -8,6 +8,9 @@ Contents
|
||||
:maxdepth: 2
|
||||
|
||||
unreleased
|
||||
wallaby
|
||||
victoria
|
||||
ussuri
|
||||
train
|
||||
stein
|
||||
rocky
|
||||
|
||||
6
releasenotes/source/ussuri.rst
Normal file
6
releasenotes/source/ussuri.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
===========================
|
||||
Ussuri Series Release Notes
|
||||
===========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/ussuri
|
||||
6
releasenotes/source/victoria.rst
Normal file
6
releasenotes/source/victoria.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
=============================
|
||||
Victoria Series Release Notes
|
||||
=============================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/victoria
|
||||
6
releasenotes/source/wallaby.rst
Normal file
6
releasenotes/source/wallaby.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
============================
|
||||
Wallaby Series Release Notes
|
||||
============================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/wallaby
|
||||
@@ -2,13 +2,12 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
pbr>=2.0.0,!=2.1.0 # Apache-2.0
|
||||
cliff>=2.11.0 # Apache-2.0
|
||||
keystoneauth1>=3.4.0 # Apache-2.0
|
||||
oslo.utils>=3.35 # Apache-2.0
|
||||
oslo.log>=3.36 # Apache-2.0
|
||||
PyYAML>=3.12 # MIT
|
||||
jsonpath-rw-ext>=1.0 # Apache-2.0
|
||||
six>=1.11 # MIT
|
||||
os-client-config>=1.29.0 # Apache-2.0
|
||||
osc-lib>=1.12.1 # Apache-2.0
|
||||
pbr>=5.5.1 # Apache-2.0
|
||||
cliff>=3.5.0 # Apache-2.0
|
||||
keystoneauth1>=4.3.0 # Apache-2.0
|
||||
oslo.utils>=4.7.0 # Apache-2.0
|
||||
oslo.log>=4.4.0 # Apache-2.0
|
||||
PyYAML>=5.3.1 # MIT
|
||||
jsonpath-rw-ext>=1.2.0 # Apache-2.0
|
||||
os-client-config>=2.1.0 # Apache-2.0
|
||||
osc-lib>=2.3.0 # Apache-2.0
|
||||
|
||||
32
setup.cfg
32
setup.cfg
@@ -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
|
||||
@@ -14,9 +14,12 @@ classifier =
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
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
|
||||
|
||||
[files]
|
||||
packages =
|
||||
@@ -85,6 +88,7 @@ openstack.rating.v1 =
|
||||
rating_pyscript_delete = cloudkittyclient.v1.rating.pyscripts_cli:CliDeleteScript
|
||||
|
||||
openstack.rating.v2 =
|
||||
rating_dataframes_get = cloudkittyclient.v2.dataframes_cli:CliDataframesGet
|
||||
rating_dataframes_add = cloudkittyclient.v2.dataframes_cli:CliDataframesAdd
|
||||
|
||||
rating_scope_state_get = cloudkittyclient.v2.scope_cli:CliScopeStateGet
|
||||
@@ -136,7 +140,6 @@ openstack.rating.v2 =
|
||||
rating_collector_state_get = cloudkittyclient.v1.collector_cli:CliCollectorGetState
|
||||
rating_collector_enable = cloudkittyclient.v1.collector_cli:CliCollectorEnable
|
||||
rating_collector_disable = cloudkittyclient.v1.collector_cli:CliCollectorDisable
|
||||
rating_dataframes_get = cloudkittyclient.v1.storage_cli:CliGetDataframes
|
||||
|
||||
rating_pyscript_create = cloudkittyclient.v1.rating.pyscripts_cli:CliCreateScript
|
||||
rating_pyscript_list = cloudkittyclient.v1.rating.pyscripts_cli:CliListScripts
|
||||
@@ -202,6 +205,7 @@ cloudkittyclient_v1 =
|
||||
|
||||
cloudkittyclient_v2 =
|
||||
dataframes_add = cloudkittyclient.v2.dataframes_cli:CliDataframesAdd
|
||||
dataframes_get = cloudkittyclient.v2.dataframes_cli:CliDataframesGet
|
||||
|
||||
scope_state_get = cloudkittyclient.v2.scope_cli:CliScopeStateGet
|
||||
scope_state_reset = cloudkittyclient.v2.scope_cli:CliScopeStateReset
|
||||
@@ -253,7 +257,6 @@ cloudkittyclient_v2 =
|
||||
collector_state_get = cloudkittyclient.v1.collector_cli:CliCollectorGetState
|
||||
collector_enable = cloudkittyclient.v1.collector_cli:CliCollectorEnable
|
||||
collector_disable = cloudkittyclient.v1.collector_cli:CliCollectorDisable
|
||||
dataframes_get = cloudkittyclient.v1.storage_cli:CliGetDataframes
|
||||
|
||||
pyscript_create = cloudkittyclient.v1.rating.pyscripts_cli:CliCreateScript
|
||||
pyscript_list = cloudkittyclient.v1.rating.pyscripts_cli:CliListScripts
|
||||
@@ -266,20 +269,3 @@ keystoneauth1.plugin =
|
||||
|
||||
cliff.formatter.list =
|
||||
df-to-csv = cloudkittyclient.format:DataframeToCsvFormatter
|
||||
|
||||
[upload_sphinx]
|
||||
upload-dir = doc/build/html
|
||||
|
||||
[compile_catalog]
|
||||
directory = cloudkittyclient/locale
|
||||
domain = python-cloudkittyclient
|
||||
|
||||
[update_catalog]
|
||||
domain = python-cloudkittyclient
|
||||
output_dir = cloudkittyclient/locale
|
||||
input_file = cloudkittyclient/locale/python-cloudkittyclient.pot
|
||||
|
||||
[extract_messages]
|
||||
keywords = _ gettext ngettext l_ lazy_gettext
|
||||
mapping_file = babel.cfg
|
||||
output_file = cloudkittyclient/locale/python-cloudkittyclient.pot
|
||||
|
||||
9
setup.py
9
setup.py
@@ -13,17 +13,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
||||
import setuptools
|
||||
|
||||
# In python < 2.7.4, a lazy loading of package `pbr` will break
|
||||
# setuptools if some other modules registered functions in `atexit`.
|
||||
# solution from: http://bugs.python.org/issue15881#msg170215
|
||||
try:
|
||||
import multiprocessing # noqa
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr>=2.0.0'],
|
||||
pbr=True)
|
||||
|
||||
@@ -2,11 +2,15 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
||||
|
||||
# remove this pyflakes from here once you bump the
|
||||
# hacking to 3.2.0 or above. hacking 3.2.0 takes
|
||||
# care of pyflakes version compatibilty.
|
||||
pyflakes>=2.1.1
|
||||
|
||||
coverage>=4.0,!=4.4 # Apache-2.0
|
||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||
python-subunit>=1.4.0 # Apache-2.0/BSD
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
stestr>=2.0 # Apache-2.0
|
||||
mock>=2.0 # BSD
|
||||
python-openstackclient>=3.14 # Apache-2.0
|
||||
|
||||
14
tox.ini
14
tox.ini
@@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 3.1.1
|
||||
envlist = py36,py37,pep8
|
||||
minversion = 3.18.0
|
||||
envlist = py3,pep8
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
@@ -45,13 +45,15 @@ commands = flake8
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-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}
|
||||
whitelist_externals =
|
||||
allowlist_externals =
|
||||
make
|
||||
commands =
|
||||
sphinx-build --keep-going -b latex doc/source doc/build/pdf
|
||||
@@ -61,7 +63,7 @@ commands =
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
||||
show-source = True
|
||||
ignore = E123,E125
|
||||
ignore = E123,E125,W503,W504
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes
|
||||
|
||||
@@ -70,7 +72,7 @@ import_exceptions = cloudkittyclient.i18n
|
||||
|
||||
[testenv:releasenotes]
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/ussuri}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
||||
-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