Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7f65e593f1 | ||
![]() |
597e262d05 | ||
![]() |
b4ab1606c9 | ||
![]() |
542b98dfd4 | ||
![]() |
8469536fb9 | ||
![]() |
ce82f1b36a | ||
![]() |
e4c2d765e9 | ||
![]() |
0a375baeff | ||
![]() |
76ed4e1025 | ||
![]() |
717df99473 | ||
![]() |
92af1b956c | ||
![]() |
d28dc1f65c | ||
![]() |
642ddf905c | ||
![]() |
d598424ff9 | ||
![]() |
3749ebaee5 | ||
![]() |
3cdea3ecfe | ||
![]() |
b95ebe3faf | ||
![]() |
3ec6495652 | ||
![]() |
a8271f78a1 | ||
![]() |
b635bae846 | ||
![]() |
50ac27de70 | ||
![]() |
60014c9090 | ||
![]() |
65a87f0f09 | ||
![]() |
1ed8565777 | ||
![]() |
66bd08bcbf | ||
![]() |
4a214fee4c | ||
![]() |
eaf07754ab | ||
![]() |
c862c35b46 | ||
![]() |
6f32ff64c9 | ||
![]() |
fa34a025c6 | ||
![]() |
cb688019c6 | ||
![]() |
be15624da2 |
.gitreview.zuul.yamlCONTRIBUTING.rstHACKING.rstMANIFEST.inREADME.rst
cloudpulseclient
doc/source
requirements.txtsetup.cfgtools
tox.ini@ -1,4 +1,4 @@
|
|||||||
[gerrit]
|
[gerrit]
|
||||||
host=review.openstack.org
|
host=review.opendev.org
|
||||||
port=29418
|
port=29418
|
||||||
project=openstack/python-cloudpulseclient.git
|
project=x/python-cloudpulseclient.git
|
||||||
|
7
.zuul.yaml
Normal file
7
.zuul.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
- project:
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-pep8
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-pep8
|
@ -1,13 +1,13 @@
|
|||||||
If you would like to contribute to the development of OpenStack,
|
If you would like to contribute to the development of OpenStack,
|
||||||
you must follow the steps in this page:
|
you must follow the steps in this page:
|
||||||
|
|
||||||
http://docs.openstack.org/infra/manual/developers.html
|
https://docs.openstack.org/infra/manual/developers.html
|
||||||
|
|
||||||
Once those steps have been completed, changes to OpenStack
|
Once those steps have been completed, changes to OpenStack
|
||||||
should be submitted for review via the Gerrit tool, following
|
should be submitted for review via the Gerrit tool, following
|
||||||
the workflow documented at:
|
the workflow documented at:
|
||||||
|
|
||||||
http://docs.openstack.org/infra/manual/developers.html#development-workflow
|
https://docs.openstack.org/infra/manual/developers.html#development-workflow
|
||||||
|
|
||||||
Pull requests submitted through GitHub will be ignored.
|
Pull requests submitted through GitHub will be ignored.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
python-cloudpulseclient Style Commandments
|
python-cloudpulseclient Style Commandments
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
|
Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
include AUTHORS
|
|
||||||
include ChangeLog
|
|
||||||
exclude .gitignore
|
|
||||||
exclude .gitreview
|
|
||||||
|
|
||||||
global-exclude *.pyc
|
|
@ -5,9 +5,9 @@ python-cloudpulseclient
|
|||||||
A Python language binding for OpenStack CloudPulse.
|
A Python language binding for OpenStack CloudPulse.
|
||||||
|
|
||||||
* Free software: Apache license
|
* Free software: Apache license
|
||||||
* Documentation: http://wiki.openstack.org/wiki/Cloudpulse
|
* Documentation: https://wiki.openstack.org/wiki/Cloudpulse
|
||||||
* Source: http://git.openstack.org/cgit/stackforge/python-cloudpulseclient
|
* Source: http://git.openstack.org/cgit/openstack/python-cloudpulseclient
|
||||||
* Bugs: http://bugs.launchpad.net/python-cloudpulseclient
|
* Bugs: https://bugs.launchpad.net/python-cloudpulseclient
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
# not use this file except in compliance with the License. You may obtain
|
# not use this file except in compliance with the License. You may obtain
|
||||||
# a copy of the License at
|
# a copy of the License at
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright 2012 OpenStack LLC.
|
# Copyright 2012 OpenStack LLC.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright 2012 OpenStack LLC.
|
# Copyright 2012 OpenStack LLC.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright 2012 OpenStack LLC.
|
# Copyright 2012 OpenStack LLC.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
# not use this file except in compliance with the License. You may obtain
|
# not use this file except in compliance with the License. You may obtain
|
||||||
# a copy of the License at
|
# a copy of the License at
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
"""oslo_i18n integration module for cloudpulseclient.
|
"""oslo_i18n integration module for cloudpulseclient.
|
||||||
|
|
||||||
See http://docs.openstack.org/developer/oslo.i18n/usage.html .
|
See https://docs.openstack.org/oslo.i18n/latest/user/usage.html.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -23,13 +23,3 @@ _translators = oslo_i18n.TranslatorFactory(domain='cloudpulseclient')
|
|||||||
|
|
||||||
# The primary translation function using the well-known name "_"
|
# The primary translation function using the well-known name "_"
|
||||||
_ = _translators.primary
|
_ = _translators.primary
|
||||||
|
|
||||||
# Translators for log levels.
|
|
||||||
#
|
|
||||||
# The abbreviated names are meant to reflect the usual use of a short
|
|
||||||
# name like '_'. The "L" is for "log" and the other letter comes from
|
|
||||||
# the level.
|
|
||||||
_LI = _translators.log_info
|
|
||||||
_LW = _translators.log_warning
|
|
||||||
_LE = _translators.log_error
|
|
||||||
_LC = _translators.log_critical
|
|
||||||
|
@ -12,34 +12,18 @@
|
|||||||
|
|
||||||
"""oslo.i18n integration module.
|
"""oslo.i18n integration module.
|
||||||
|
|
||||||
See http://docs.openstack.org/developer/oslo.i18n/usage.html
|
See https://docs.openstack.org/oslo.i18n/latest/user/usage.html
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
import oslo_i18n
|
||||||
import oslo_i18n
|
|
||||||
|
|
||||||
# NOTE(dhellmann): This reference to o-s-l-o will be replaced by the
|
# NOTE(dhellmann): This reference to o-s-l-o will be replaced by the
|
||||||
# application name when this module is synced into the separate
|
# application name when this module is synced into the separate
|
||||||
# repository. It is OK to have more than one translation function
|
# repository. It is OK to have more than one translation function
|
||||||
# using the same domain, since there will still only be one message
|
# using the same domain, since there will still only be one message
|
||||||
# catalog.
|
# catalog.
|
||||||
_translators = oslo_i18n.TranslatorFactory(domain='cloudpulseclient')
|
_translators = oslo_i18n.TranslatorFactory(domain='cloudpulseclient')
|
||||||
|
|
||||||
# The primary translation function using the well-known name "_"
|
# The primary translation function using the well-known name "_"
|
||||||
_ = _translators.primary
|
_ = _translators.primary
|
||||||
|
|
||||||
# Translators for log levels.
|
|
||||||
#
|
|
||||||
# The abbreviated names are meant to reflect the usual use of a short
|
|
||||||
# name like '_'. The "L" is for "log" and the other letter comes from
|
|
||||||
# the level.
|
|
||||||
_LI = _translators.log_info
|
|
||||||
_LW = _translators.log_warning
|
|
||||||
_LE = _translators.log_error
|
|
||||||
_LC = _translators.log_critical
|
|
||||||
except ImportError:
|
|
||||||
# NOTE(dims): Support for cases where a project wants to use
|
|
||||||
# code from oslo-incubator, but is not ready to be internationalized
|
|
||||||
# (like tempest)
|
|
||||||
_ = _LI = _LW = _LE = _LC = lambda x: x
|
|
||||||
|
@ -127,6 +127,8 @@ class BaseAuthPlugin(object):
|
|||||||
"tenant_name",
|
"tenant_name",
|
||||||
"token",
|
"token",
|
||||||
"auth_url",
|
"auth_url",
|
||||||
|
"project_domain_name",
|
||||||
|
"user_domain_name",
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, auth_system=None, **kwargs):
|
def __init__(self, auth_system=None, **kwargs):
|
||||||
|
@ -41,6 +41,27 @@ class MissingArgs(Exception):
|
|||||||
super(MissingArgs, self).__init__(msg)
|
super(MissingArgs, self).__init__(msg)
|
||||||
|
|
||||||
|
|
||||||
|
class InvalidNumber(Exception):
|
||||||
|
"""Supplied argument for --number is invalid"""
|
||||||
|
def __init__(self):
|
||||||
|
msg = _("Invalid input, expected a number in range 1<=number<=240")
|
||||||
|
super(InvalidNumber, self).__init__(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def check_int_limit(value):
|
||||||
|
"""Check that supplied arg is of integer type and in range 1<=value<=240"""
|
||||||
|
try:
|
||||||
|
int_value = int(value)
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
raise InvalidNumber()
|
||||||
|
|
||||||
|
# max_db_entries in cloudpulse is 240, hence this limit
|
||||||
|
if not 1 <= int_value <= 240:
|
||||||
|
raise InvalidNumber()
|
||||||
|
|
||||||
|
return int_value
|
||||||
|
|
||||||
|
|
||||||
def validate_args(fn, *args, **kwargs):
|
def validate_args(fn, *args, **kwargs):
|
||||||
"""Check that the supplied args are sufficient for calling a function.
|
"""Check that the supplied args are sufficient for calling a function.
|
||||||
|
|
||||||
@ -139,7 +160,7 @@ def isunauthenticated(func):
|
|||||||
|
|
||||||
|
|
||||||
def print_list(objs, fields, formatters=None, sortby_index=0,
|
def print_list(objs, fields, formatters=None, sortby_index=0,
|
||||||
mixed_case_fields=None, field_labels=None):
|
mixed_case_fields=None, field_labels=None, limit_number=25):
|
||||||
"""Print a list or objects as a table, one row per object.
|
"""Print a list or objects as a table, one row per object.
|
||||||
|
|
||||||
:param objs: iterable of :class:`Resource`
|
:param objs: iterable of :class:`Resource`
|
||||||
@ -163,10 +184,16 @@ def print_list(objs, fields, formatters=None, sortby_index=0,
|
|||||||
kwargs = {}
|
kwargs = {}
|
||||||
else:
|
else:
|
||||||
kwargs = {'sortby': field_labels[sortby_index]}
|
kwargs = {'sortby': field_labels[sortby_index]}
|
||||||
|
|
||||||
|
# Limit the number to 25 (default) or provided number from user
|
||||||
|
# Show last entries after sorting
|
||||||
|
kwargs['start'] = 0
|
||||||
|
kwargs['end'] = limit_number
|
||||||
|
|
||||||
pt = prettytable.PrettyTable(field_labels)
|
pt = prettytable.PrettyTable(field_labels)
|
||||||
pt.align = 'l'
|
pt.align = 'l'
|
||||||
|
|
||||||
for o in objs:
|
for o in objs[::-1]:
|
||||||
row = []
|
row = []
|
||||||
for field in fields:
|
for field in fields:
|
||||||
if field in formatters:
|
if field in formatters:
|
||||||
@ -267,5 +294,5 @@ def pretty_choice_list(l):
|
|||||||
|
|
||||||
def exit(msg=''):
|
def exit(msg=''):
|
||||||
if msg:
|
if msg:
|
||||||
print (msg, file=sys.stderr)
|
print(msg, file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -33,6 +33,13 @@ from oslo_utils import encodeutils
|
|||||||
from oslo_utils import strutils
|
from oslo_utils import strutils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from cloudpulseclient.openstack.common.apiclient import auth
|
||||||
|
from cloudpulseclient.openstack.common.apiclient import exceptions as exc
|
||||||
|
from cloudpulseclient.openstack.common import cliutils
|
||||||
|
from cloudpulseclient.v1 import client
|
||||||
|
from cloudpulseclient.v1 import shell as shell_v1
|
||||||
|
from cloudpulseclient import version
|
||||||
|
|
||||||
HAS_KEYRING = False
|
HAS_KEYRING = False
|
||||||
all_errors = ValueError
|
all_errors = ValueError
|
||||||
try:
|
try:
|
||||||
@ -49,13 +56,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from cloudpulseclient.openstack.common.apiclient import auth
|
|
||||||
from cloudpulseclient.openstack.common.apiclient import exceptions as exc
|
|
||||||
from cloudpulseclient.openstack.common import cliutils
|
|
||||||
from cloudpulseclient.v1 import client
|
|
||||||
from cloudpulseclient.v1 import shell as shell_v1
|
|
||||||
from cloudpulseclient import version
|
|
||||||
|
|
||||||
DEFAULT_API_VERSION = '1'
|
DEFAULT_API_VERSION = '1'
|
||||||
DEFAULT_ENDPOINT_TYPE = 'publicURL'
|
DEFAULT_ENDPOINT_TYPE = 'publicURL'
|
||||||
DEFAULT_SERVICE_TYPE = 'health'
|
DEFAULT_SERVICE_TYPE = 'health'
|
||||||
@ -294,9 +294,11 @@ class OpenStackCloudPulseShell(object):
|
|||||||
metavar='<endpoint-type>',
|
metavar='<endpoint-type>',
|
||||||
default=cliutils.env(
|
default=cliutils.env(
|
||||||
'CLOUDPULSE_ENDPOINT_TYPE',
|
'CLOUDPULSE_ENDPOINT_TYPE',
|
||||||
default=DEFAULT_ENDPOINT_TYPE),
|
default=cliutils.env(
|
||||||
help='Defaults to env[CLOUDPULSE_ENDPOINT_TYPE] or'
|
'OS_ENDPOINT_TYPE',
|
||||||
+ DEFAULT_ENDPOINT_TYPE + '.')
|
default=DEFAULT_ENDPOINT_TYPE)),
|
||||||
|
help='Defaults to env[CLOUDPULSE_ENDPOINT_TYPE] '
|
||||||
|
'or' + DEFAULT_ENDPOINT_TYPE + '.')
|
||||||
# NOTE(dtroyer): We can't add --endpoint_type here due to argparse
|
# NOTE(dtroyer): We can't add --endpoint_type here due to argparse
|
||||||
# thinking usage-list --end is ambiguous; but it
|
# thinking usage-list --end is ambiguous; but it
|
||||||
# works fine with only --endpoint-type present
|
# works fine with only --endpoint-type present
|
||||||
@ -521,16 +523,20 @@ class OpenStackCloudPulseShell(object):
|
|||||||
'--os-password, env[OS_PASSWORD], or '
|
'--os-password, env[OS_PASSWORD], or '
|
||||||
'prompted response')
|
'prompted response')
|
||||||
|
|
||||||
self.cs = client.Client(username=os_username,
|
self.cs = client.Client(
|
||||||
api_key=os_password,
|
username=os_username,
|
||||||
project_id=os_tenant_id,
|
api_key=os_password,
|
||||||
project_name=os_tenant_name,
|
project_id=os_tenant_id,
|
||||||
auth_url=os_auth_url,
|
project_name=os_tenant_name,
|
||||||
service_type=service_type,
|
auth_url=os_auth_url,
|
||||||
region_name=args.os_region_name,
|
service_type=service_type,
|
||||||
cacert=cacert,
|
region_name=args.os_region_name,
|
||||||
insecure=insecure,
|
project_domain_name=args.os_project_domain_name,
|
||||||
cloudpulse_url=bypass_url)
|
user_domain_name=args.os_user_domain_name,
|
||||||
|
cacert=cacert,
|
||||||
|
insecure=insecure,
|
||||||
|
cloudpulse_url=bypass_url,
|
||||||
|
endpoint_type=endpoint_type)
|
||||||
|
|
||||||
args.func(self.cs, args)
|
args.func(self.cs, args)
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2010-2011 OpenStack Foundation
|
# Copyright 2010-2011 OpenStack Foundation
|
||||||
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
# not use this file except in compliance with the License. You may obtain
|
# not use this file except in compliance with the License. You may obtain
|
||||||
# a copy of the License at
|
# a copy of the License at
|
||||||
|
@ -25,18 +25,22 @@ class Client(object):
|
|||||||
def __init__(self, username=None, api_key=None, project_id=None,
|
def __init__(self, username=None, api_key=None, project_id=None,
|
||||||
project_name=None, auth_url=None, cloudpulse_url=None,
|
project_name=None, auth_url=None, cloudpulse_url=None,
|
||||||
endpoint_type='publicURL', service_type='container',
|
endpoint_type='publicURL', service_type='container',
|
||||||
|
project_domain_name=None, user_domain_name=None,
|
||||||
region_name=None, input_auth_token=None, insecure=False,
|
region_name=None, input_auth_token=None, insecure=False,
|
||||||
cacert=None):
|
cacert=None):
|
||||||
|
|
||||||
keystone = None
|
keystone = None
|
||||||
if not input_auth_token:
|
if not input_auth_token:
|
||||||
keystone = self.get_keystone_client(username=username,
|
keystone = self.get_keystone_client(
|
||||||
api_key=api_key,
|
username=username,
|
||||||
auth_url=auth_url,
|
api_key=api_key,
|
||||||
project_id=project_id,
|
auth_url=auth_url,
|
||||||
project_name=project_name,
|
project_id=project_id,
|
||||||
insecure=insecure,
|
project_name=project_name,
|
||||||
cacert=cacert)
|
project_domain_name=project_domain_name,
|
||||||
|
user_domain_name=user_domain_name,
|
||||||
|
insecure=insecure,
|
||||||
|
cacert=cacert)
|
||||||
|
|
||||||
input_auth_token = keystone.auth_token
|
input_auth_token = keystone.auth_token
|
||||||
if not input_auth_token:
|
if not input_auth_token:
|
||||||
@ -80,6 +84,7 @@ class Client(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_keystone_client(username=None, api_key=None, auth_url=None,
|
def get_keystone_client(username=None, api_key=None, auth_url=None,
|
||||||
insecure=False, cacert=None, token=None,
|
insecure=False, cacert=None, token=None,
|
||||||
|
project_domain_name=None, user_domain_name=None,
|
||||||
project_id=None, project_name=None):
|
project_id=None, project_name=None):
|
||||||
if not auth_url:
|
if not auth_url:
|
||||||
raise RuntimeError("No auth url specified")
|
raise RuntimeError("No auth url specified")
|
||||||
@ -94,6 +99,8 @@ class Client(object):
|
|||||||
cacert=cacert,
|
cacert=cacert,
|
||||||
tenant_id=project_id,
|
tenant_id=project_id,
|
||||||
tenant_name=project_name,
|
tenant_name=project_name,
|
||||||
|
project_domain_name=project_domain_name,
|
||||||
|
user_domain_name=user_domain_name,
|
||||||
auth_url=auth_url,
|
auth_url=auth_url,
|
||||||
endpoint=auth_url)
|
endpoint=auth_url)
|
||||||
client.authenticate()
|
client.authenticate()
|
||||||
|
@ -29,17 +29,22 @@ def _print_list_field(field):
|
|||||||
@utils.arg('--period',
|
@utils.arg('--period',
|
||||||
metavar='<period>',
|
metavar='<period>',
|
||||||
help='List tests results that have been run in the last x minutes.')
|
help='List tests results that have been run in the last x minutes.')
|
||||||
|
@utils.arg('--number',
|
||||||
|
metavar='<number>',
|
||||||
|
default=25,
|
||||||
|
type=utils.check_int_limit,
|
||||||
|
help='List x number of tests (Max 240).')
|
||||||
def do_result(cs, args):
|
def do_result(cs, args):
|
||||||
"""List all the test results"""
|
"""List all the test results"""
|
||||||
search_opts = {
|
search_opts = {
|
||||||
'failed': args.failed,
|
'failed': args.failed,
|
||||||
'period': args.period,
|
'period': args.period
|
||||||
}
|
}
|
||||||
healtchecks = cs.healthcheck.list(search_opts=search_opts)
|
healtchecks = cs.healthcheck.list(search_opts=search_opts)
|
||||||
columns = ('uuid', 'id', 'name', 'testtype', 'state')
|
columns = ('uuid', 'id', 'name', 'testtype', 'state')
|
||||||
utils.print_list(healtchecks, columns,
|
utils.print_list(healtchecks, columns,
|
||||||
{'versions': _print_list_field('versions')},
|
{'versions': _print_list_field('versions')},
|
||||||
sortby_index=1)
|
sortby_index=1, limit_number=args.number)
|
||||||
|
|
||||||
|
|
||||||
@utils.arg('--name',
|
@utils.arg('--name',
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
pbr>=1.6
|
pbr>=1.6
|
||||||
Babel>=1.3
|
Babel>=2.3.4 # BSD
|
||||||
oslo.config>=2.3.0 # Apache-2.0
|
oslo.config>=3.14.0 # Apache-2.0
|
||||||
oslo.i18n>=1.5.0 # Apache-2.0`
|
oslo.i18n>=2.1.0 # Apache-2.0
|
||||||
oslo.utils>=2.0.0,!=2.6.0 # Apache-2.0
|
oslo.utils>=3.16.0 # Apache-2.0
|
||||||
iso8601>=0.1.9
|
iso8601>=0.1.11 # MIT
|
||||||
requests>=2.5.2,!=2.8.0,!=2.9.0
|
requests>=2.10.0 # Apache-2.0
|
||||||
python-keystoneclient>=1.6.0,!=1.8.0
|
python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0
|
||||||
PyYAML>=3.1.0
|
PyYAML>=3.1.0 # MIT
|
||||||
stevedore>=1.5.0 # Apache-2.0
|
stevedore>=1.16.0 # Apache-2.0
|
||||||
six>=1.9.0
|
six>=1.9.0 # MIT
|
||||||
|
@ -4,7 +4,7 @@ summary = A Python language binding for OpenStack CloudPulse.
|
|||||||
description-file =
|
description-file =
|
||||||
README.rst
|
README.rst
|
||||||
author = OpenStack
|
author = OpenStack
|
||||||
author-email = openstack-dev@lists.openstack.org
|
author-email = openstack-discuss@lists.openstack.org
|
||||||
home-page = http://www.openstack.org/
|
home-page = http://www.openstack.org/
|
||||||
classifier =
|
classifier =
|
||||||
Environment :: OpenStack
|
Environment :: OpenStack
|
||||||
@ -18,6 +18,8 @@ classifier =
|
|||||||
Programming Language :: Python :: 3
|
Programming Language :: Python :: 3
|
||||||
Programming Language :: Python :: 3.3
|
Programming Language :: Python :: 3.3
|
||||||
Programming Language :: Python :: 3.4
|
Programming Language :: Python :: 3.4
|
||||||
|
Programming Language :: Python :: 3.5
|
||||||
|
Programming Language :: Python :: 3.6
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages =
|
packages =
|
||||||
|
20
tools/flake8wrap.sh
Executable file
20
tools/flake8wrap.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# A simple wrapper around flake8 which makes it possible
|
||||||
|
# to ask it to only verify files changed in the current
|
||||||
|
# git HEAD patch.
|
||||||
|
#
|
||||||
|
# Intended to be invoked via tox:
|
||||||
|
#
|
||||||
|
# tox -epep8 -- -HEAD
|
||||||
|
#
|
||||||
|
|
||||||
|
if test "x$1" = "x-HEAD" ; then
|
||||||
|
shift
|
||||||
|
files=$(git diff --name-only HEAD~1 | tr '\n' ' ')
|
||||||
|
echo "Running flake8 on ${files}"
|
||||||
|
diff -u --from-file /dev/null ${files} | flake8 --diff "$@"
|
||||||
|
else
|
||||||
|
echo "Running flake8 on all files"
|
||||||
|
exec flake8 "$@"
|
||||||
|
fi
|
32
tox.ini
32
tox.ini
@ -1,30 +1,46 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 1.6
|
minversion = 2.0
|
||||||
envlist = py34,py27,pep8
|
envlist = py36,pep8
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install {opts} {packages}
|
install_command = pip install -U {opts} {packages}
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
-r{toxinidir}/test-requirements.txt
|
OS_STDOUT_CAPTURE=1
|
||||||
commands = python setup.py test --slowest --testr-args='{posargs}'
|
OS_STDERR_CAPTURE=1
|
||||||
|
deps =
|
||||||
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
passenv = TEMPEST_* OS_TEST_*
|
||||||
|
commands =
|
||||||
|
find . -type f -name "*.py[c|o]" -delete
|
||||||
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
commands =
|
||||||
|
bash tools/flake8wrap.sh {posargs}
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
basepython = python3
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
basepython = python3
|
||||||
|
commands =
|
||||||
|
python setup.py test --coverage --testr-args='{posargs}'
|
||||||
|
coverage report
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
|
basepython = python3
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
|
basepython = python3
|
||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user