Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
582b52b1b8 | ||
|
|
4d0eb4c55a | ||
|
|
3e9b0d678e | ||
|
|
b34b746d1c | ||
|
|
baf0133c5b | ||
| e5bd6e00cb | |||
| 827d474cc4 | |||
|
|
6681724daa | ||
|
|
8d62995cf4 | ||
|
|
d82be4c8c4 | ||
|
|
152804168d | ||
|
|
4a4add3dcc |
@@ -1,4 +1,5 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
host=review.opendev.org
|
||||
port=29418
|
||||
project=openstack/python-watcherclient.git
|
||||
defaultbranch=stable/rocky
|
||||
|
||||
13
.zuul.yaml
13
.zuul.yaml
@@ -1,9 +1,18 @@
|
||||
- project:
|
||||
templates:
|
||||
- openstack-python-jobs
|
||||
- openstack-python35-jobs
|
||||
- publish-openstack-sphinx-docs
|
||||
- check-requirements
|
||||
- openstackclient-plugin-jobs
|
||||
check:
|
||||
jobs:
|
||||
- watcherclient-tempest-functional
|
||||
- watcherclient-tempest-functional:
|
||||
voting: false
|
||||
- openstack-tox-lower-constraints
|
||||
- openstack-tox-cover:
|
||||
voting: false
|
||||
|
||||
gate:
|
||||
jobs:
|
||||
- watcherclient-tempest-functional
|
||||
- openstack-tox-lower-constraints
|
||||
|
||||
@@ -71,8 +71,7 @@ Once you have an watcher `Client`_, you can perform various tasks::
|
||||
>>> watcher.audit.get(audit_uuid_or_name) # information about a particular audit
|
||||
|
||||
When the `Client`_ needs to propagate an exception, it will usually
|
||||
raise an instance subclassed from
|
||||
`watcherclient.exc.BaseException`_ or `watcherclient.exc.ClientException`_.
|
||||
raise an instance listed in `watcherclient.exceptions`_.
|
||||
|
||||
Refer to the modules themselves, for more details.
|
||||
|
||||
@@ -84,5 +83,4 @@ watcherclient Modules
|
||||
.. _watcherclient.v1.client.Client: api/watcherclient.v1.client.html#watcherclient.v1.client.Client
|
||||
.. _Client: api/watcherclient.v1.client.html#watcherclient.v1.client.Client
|
||||
.. _watcherclient.client.get_client(): api/watcherclient.client.html#watcherclient.client.get_client
|
||||
.. _watcherclient.exc.BaseException: api/watcherclient.exc.html#watcherclient.exc.BaseException
|
||||
.. _watcherclient.exc.ClientException: api/watcherclient.exc.html#watcherclient.exc.ClientException
|
||||
.. _watcherclient.exceptions: api/watcherclient.exceptions.html
|
||||
|
||||
@@ -69,7 +69,6 @@ pyperclip==1.6.0
|
||||
python-dateutil==2.5.3
|
||||
python-mimeparse==1.6.0
|
||||
python-subunit==1.0.0
|
||||
-e git://git.openstack.org/openstack/python-watcherclient@104894958882a4877dad6f469361d2adb41d0b59#egg=python_watcherclient
|
||||
pytz==2018.3
|
||||
PyYAML==3.12
|
||||
requests==2.18.4
|
||||
|
||||
8
tox.ini
8
tox.ini
@@ -6,7 +6,7 @@ skipsdist = True
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command =
|
||||
constraints: pip install -U --force-reinstall -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||
constraints: pip install -U --force-reinstall -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/rocky} {opts} {packages}
|
||||
pip install -U {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
@@ -16,20 +16,25 @@ commands = rm -f .testrepository/times.dbm
|
||||
python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands = flake8
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
commands =
|
||||
python setup.py testr --coverage --testr-args='{posargs}'
|
||||
coverage report
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
commands = oslo_debug_helper -t watcherclient/tests/unit {posargs}
|
||||
|
||||
[testenv:functional]
|
||||
@@ -56,6 +61,7 @@ builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||
|
||||
[testenv:wheel]
|
||||
basepython = python3
|
||||
commands = python setup.py bdist_wheel
|
||||
|
||||
[hacking]
|
||||
|
||||
@@ -28,7 +28,8 @@ class ActionPlanTests(base.TestCase):
|
||||
dummy_name = 'dummy'
|
||||
list_fields = ['UUID', 'Audit', 'State', 'Updated At', 'Global efficacy']
|
||||
detailed_list_fields = list_fields + ['Created At', 'Deleted At',
|
||||
'Strategy', 'Efficacy indicators']
|
||||
'Strategy', 'Efficacy indicators',
|
||||
'Hostname']
|
||||
audit_template_name = 'a' + uuidutils.generate_uuid()
|
||||
audit_uuid = None
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class AuditTests(base.TestCase):
|
||||
detailed_list_fields = list_fields + ['Created At', 'Updated At',
|
||||
'Deleted At', 'Parameters',
|
||||
'Interval', 'Audit Scope',
|
||||
'Next Run Time']
|
||||
'Next Run Time', 'Hostname']
|
||||
audit_template_name = 'a' + uuidutils.generate_uuid()
|
||||
audit_uuid = None
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ ACTION_PLAN_1 = {
|
||||
"description": "Dummy Global Efficacy2"}
|
||||
],
|
||||
'deleted_at': None,
|
||||
'hostname': ''
|
||||
}
|
||||
|
||||
ACTION_PLAN_2 = {
|
||||
@@ -63,6 +64,7 @@ ACTION_PLAN_2 = {
|
||||
"description": "Dummy Global Efficacy",
|
||||
}],
|
||||
'deleted_at': None,
|
||||
'hostname': ''
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ AUDIT_1 = {
|
||||
'auto_trigger': False,
|
||||
'next_run_time': None,
|
||||
'name': 'my_audit1',
|
||||
'hostname': '',
|
||||
}
|
||||
|
||||
AUDIT_2 = {
|
||||
@@ -88,6 +89,7 @@ AUDIT_2 = {
|
||||
'auto_trigger': False,
|
||||
'next_run_time': None,
|
||||
'name': 'my_audit2',
|
||||
'hostname': '',
|
||||
}
|
||||
|
||||
AUDIT_3 = {
|
||||
@@ -107,6 +109,7 @@ AUDIT_3 = {
|
||||
'auto_trigger': True,
|
||||
'next_run_time': None,
|
||||
'name': 'my_audit3',
|
||||
'hostname': '',
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class ShowActionPlan(command.ShowOne):
|
||||
yaml_format.YAMLFormatter().emit_one(
|
||||
column_names=list(resource.capitalize()
|
||||
for resource in formatted_global_efficacy),
|
||||
data=[value for value in formatted_global_efficacy.itervalues()],
|
||||
data=[value for value in formatted_global_efficacy.values()],
|
||||
stdout=out,
|
||||
parsed_args=parsed_args,
|
||||
)
|
||||
|
||||
@@ -32,12 +32,13 @@ AUDIT_TEMPLATE_SHORT_LIST_FIELD_LABELS = ['UUID', 'Name', 'Goal', 'Strategy']
|
||||
# Audit
|
||||
AUDIT_FIELDS = ['uuid', 'name', 'created_at', 'updated_at', 'deleted_at',
|
||||
'state', 'audit_type', 'parameters', 'interval', 'goal_name',
|
||||
'strategy_name', 'scope', 'auto_trigger', 'next_run_time']
|
||||
'strategy_name', 'scope', 'auto_trigger', 'next_run_time',
|
||||
'hostname']
|
||||
|
||||
AUDIT_FIELD_LABELS = ['UUID', 'Name', 'Created At', 'Updated At', 'Deleted At',
|
||||
'State', 'Audit Type', 'Parameters', 'Interval', 'Goal',
|
||||
'Strategy', 'Audit Scope', 'Auto Trigger',
|
||||
'Next Run Time']
|
||||
'Next Run Time', 'Hostname']
|
||||
|
||||
AUDIT_SHORT_LIST_FIELDS = ['uuid', 'name', 'audit_type',
|
||||
'state', 'goal_name', 'strategy_name',
|
||||
@@ -49,11 +50,12 @@ AUDIT_SHORT_LIST_FIELD_LABELS = ['UUID', 'Name', 'Audit Type', 'State', 'Goal',
|
||||
# Action Plan
|
||||
ACTION_PLAN_FIELDS = ['uuid', 'created_at', 'updated_at', 'deleted_at',
|
||||
'audit_uuid', 'strategy_name', 'state',
|
||||
'efficacy_indicators', 'global_efficacy']
|
||||
'efficacy_indicators', 'global_efficacy', 'hostname']
|
||||
|
||||
ACTION_PLAN_FIELD_LABELS = ['UUID', 'Created At', 'Updated At', 'Deleted At',
|
||||
'Audit', 'Strategy', 'State',
|
||||
'Efficacy indicators', 'Global efficacy']
|
||||
'Efficacy indicators', 'Global efficacy',
|
||||
'Hostname']
|
||||
|
||||
ACTION_PLAN_SHORT_LIST_FIELDS = ['uuid', 'audit_uuid', 'state',
|
||||
'updated_at', 'global_efficacy']
|
||||
|
||||
Reference in New Issue
Block a user