flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.
Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.
To avoid similar gate break in future, we need to bump the hacking min
version.
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html
Change-Id: I75bfe1596031c441e0daf7f62a8d81aab279ec9f
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I1dca4b2c7eccf1b19482dde60b88a132935b48b8
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Update local hacking checks for new flake8.
Change-Id: I6396403d0a62f5403fc5b7fb04b6ce790c332c84
Currently we don't have any capability to monitor the internal TLS/SSL
certificates. i.e. SSL certificates used by MySQL for replication, RabbitMQ for
distribution, etc. The cert_check plugin is not adequate for this purpose
becaue it can only check on certficates over HTTPS endpoints. Furthermore,
checking on these internal certificates over the network is cumbersome
because the agent plugin would have to speak specific protocols.
This patch adds a cert_file_check plugin to detect the certificate expiry
(in days from now) for the given X.509 certificate file in PEM format.
Similar to cert_check plugin, this plugin will a metric
'cert_file.cert_expire_days' which contains the number of days from now the
given certificate will be expired. If the certificate has already expired,
this will be a negative number.
Change-Id: Id95cc7115823f972e234417223ab5906b57447cc
Story: 2006753
According to Openstack summit session [1] stestr is maintained
project to which all Openstack projects should migrate.
Let's switch it then.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: Ifb460199c94d748988d4f0e836e90d1dd6f294bc
Signed-off-by: Chuck Short <chucks@redhat.com>
Following commit does several things:
* changes nose to ostestr
* enables coverage
* adds flake8 for tests
* adds bandit
Bandit note:
Multiple asserts of bandit had to be disabled at this
point because fixing them was not obvious. Several simple
asserts like B110 [try_except_pass] were fixed with
Closes-Bug: #1628740
Change-Id: I640857349008178e8a6f565e31ca2fde26ce8da7
This class shall be used to map external metrics from Prometheus, InfluxDB, ...
to well-formed Monasca metrics.
It supports:
* filtering by name (regex)
* renaming of metrics
* renamign of dimensions
* filtering by dimension value
* transforming of dimension values (regex based)
Change-Id: If0a5fdb1126bdfc93a88d5c1c7266d0c152d925f
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: I5df54461c5edf8de3339869cbceef36633c87f69
As an initial step to make monasca-agent coinstallable we
need to converge to use the OpenStack global-requirements
Change-Id: Icdaa769b114f83af3cff2274bd20ea6d74b8f944
Following changes syncs requirements
of monasca-agent project to the openstack's
global requirements.
Needed-by: Ic1e157e7374885378223549644173adbed9c70dc
Change-Id: I0f48a72894ea07a7c67befb575e5cc1decdc3b5f