Compare commits

...

5 Commits
2.0.0 ... 2.1.0

Author SHA1 Message Date
Zuul
6681724daa Merge "Add hostname field to support HA" 2018-07-26 13:45:54 +00:00
Alexander Chadin
8d62995cf4 Add hostname field to support HA
Change-Id: Ic099070f93edbea738e58f7686d10f354df69532
2018-07-17 18:01:39 +03:00
Dao Cong Tien
d82be4c8c4 Invalid doc for Client exceptions
There is no BaseException any more.

Change-Id: I9bf4613fa27cfc6d62a466afe703d907e8aa737a
2018-07-11 14:54:17 +07:00
Andreas Jaeger
152804168d Don't run voting jobs in gate
Non-voting jobs should not be in gate queue at all, remove them.
They are wasting needlessly our resources since they get ignored.

Mark the job explictely as non-voting, since another change will make
the job voting by default - which allows to make it easily voting here.

See also https://review.openstack.org/580110

Change-Id: I73fd45772ba9c793dad3221c852af4e9606362e1
2018-07-04 11:46:11 +02:00
Doug Hellmann
4a4add3dcc fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ie9d1d45811450e3feadd0dd3d027d3a20370f206
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 17:58:20 -04:00
8 changed files with 24 additions and 12 deletions

View File

@@ -1,9 +1,9 @@
- project:
check:
jobs:
- watcherclient-tempest-functional
- watcherclient-tempest-functional:
voting: false
- openstack-tox-lower-constraints
gate:
jobs:
- watcherclient-tempest-functional
- openstack-tox-lower-constraints

View File

@@ -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

View File

@@ -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]

View File

@@ -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

View File

@@ -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

View File

@@ -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': ''
}

View File

@@ -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': '',
}

View File

@@ -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']