f92f77f683656f93fbb71057089c20326e729263
Change I25b4cb0e1b85379ff0c4da9d0c1474380d75ce3a in Queens refactored the statistic_aggregation method and renamed the "aggregate" kwarg to "aggregation", presumably to match the signature of the GnocchiHelper statistic_aggregation method (the commit message does not give details) so a base method could be added to the parent class for all datasource helpers. As a result, the CeilometerHelper calls to its statistic_aggregation started passing the new "granularity" kwarg but failed to match the rename to the "aggregation" kwarg, which breaks the CeilometerHelper. This was missed by the unit tests because the tests were just asserting the erroneous call that the runtime code made. This change fixes the kwarg typo and makes the tests more robust by using the mock spec kwarg to define a spec for the statistic_aggregation mock so that it must be called with the correct parameters defined in the method signature. The test is refactored to reduce duplicate mocking. The same test hardening can and should be done in the gnocchi and monasca helper tests but that should be done in a separate change. Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com> Closes-Bug: #1829542 Change-Id: Idfd099f718873d9056fdc35a97954771c9ae5762
========================
Team and repository tags
========================
.. image:: https://governance.openstack.org/tc/badges/watcher.svg
:target: https://governance.openstack.org/tc/reference/tags/index.html
.. Change things from this point on
..
Except where otherwise noted, this document is licensed under Creative
Commons Attribution 3.0 License. You can view the license at:
https://creativecommons.org/licenses/by/3.0/
=======
Watcher
=======
OpenStack Watcher provides a flexible and scalable resource optimization
service for multi-tenant OpenStack-based clouds.
Watcher provides a robust framework to realize a wide range of cloud
optimization goals, including the reduction of data center
operating costs, increased system performance via intelligent virtual machine
migration, increased energy efficiency and more!
* Free software: Apache license
* Wiki: https://wiki.openstack.org/wiki/Watcher
* Source: https://opendev.org/openstack/watcher
* Bugs: https://bugs.launchpad.net/watcher
* Documentation: https://docs.openstack.org/watcher/latest/
* Release notes: https://docs.openstack.org/releasenotes/watcher/
Description
Languages
Python
99.7%
Shell
0.3%