With python 3.x, classes can use the metaclass= logic
to not require usage of the six library.
Subsequent patches will replace other six usages.
Change-Id: I02b6fbbdc70b228e1734c6085ae4e06a484a556e
Remove usage of local config object in Vitrage
services and tests. Instead, it's been replaced
with the global CONF object. The structure of the
code becomes more like in other OpenStack projects.
Also, this change provides an opportunity to
introduce migrations and tests for them.
Story: 2004059
Task: 27065
Change-Id: I37544a350adf8ca38a6fc4ff5d0fd96e38a3f922
As part of Rocky fast-failover support,
vitrage-graph is now reloaded from the
database. This causes an issue with
datasources using caches, that can become
outdated in two cases
- After vitrage-graph restart. This is
handled by the consistency service.
- If more than one vitrage-collector is used.
The solution/workaround for Rocky is to let
the consistency enforcer delete outdated
entities for datasources that specifically
request it.
For Stein, we should move this handling to
the processor (so the entities will be
deleted immediately) and delete all the
caches
Change-Id: I953137dc870f48ed42acba93789bb947809c41cc
LOG.exception adds traceback and exception information automatically, so
we don't need to add it explicitly.
Change-Id: I58ea46917b84c7d0ec72f52dfbb451fc85d2e8eb
According to [1] files with no code shouldn’t contain any license header
or comments, and must be left completely empty. This patch cleaups the
code and enables H104 checking in the tox 'pep8' environment.
[1] https://docs.openstack.org/hacking/latest/user/hacking.html#openstack-licensing
Change-Id: I2528af3579b0426fff24796e94978fcba5001f6e
Rename vitrage properties to start with the vitrage prefix
so it will be easier work with and to recognize.
Change-Id: Ia8afaa1a13897927984a9c8d8d9b85343ef69c01
- misleading name `load_files` for a method does not load file, renamed
- exception already handled, unnecessary arg validation when calling removed
- log exception to error for diagnostic
- check directory existance before listing
Change-Id: I35c19989338fd0411f253279412a88a608d4f131