Commit Graph

225 Commits

Author SHA1 Message Date
Takashi Kajinami f36830bd32 Fix python shebang
The current shebang requires /usr/bin/python which is not available in
Ubuntu Jammy by default.

Change-Id: Id2a0ce9502cb86867ecd4613f2e6c1b3ccf54786
2023-10-17 16:04:29 +00:00
wangzihao 5ddabc375c Remove six.moves
Remove six.moves Replace the following items with Python 3 style code.
- six.moves.urllib
- six.moves.xrange
- six.moves.range

urlparse instead of url_parse

Change-Id: I2a66e69d7c1401d0bbdb9d8e8b0a7b5400aee6d2
2020-09-27 11:26:03 +08:00
Witold Bedyk 9586972ddd Migrate to stestr for running tests
stestr is recommended by OpenStack Project Testing Interface for running tests
[1]. This change migrates to stestr for running unit tests and coverage
job. Modified `cover` env allows running it as Zuul job and visualising
its results in Gerrit.

[1] https://governance.openstack.org/tc/reference/pti/python.html#python-test-running

Change-Id: I9e8b79d7a18cd36946daff10abb1a2f43b1aa3a1
2018-07-30 10:37:34 +02:00
Julien Danjou 9323f07f97 Remove deprecated storage drivers
Change-Id: I6b262dd440a72f25662b64d938ab9e5328709a97
2017-10-26 09:35:14 +02:00
Julien Danjou 83ffaffcb2 Replace the Gnocchi dispatcher by a publisher
This removes the deprecated Gnocchi dispatcher and replaces it by its
equivalent publisher.

Change-Id: Ie44baf20ccb8de5794f5f0c3d4717f7e56afa63b
2017-10-13 18:18:07 +02:00
liusheng 1a2b90ffd6 Add tool for migrating metric data from ceilometer's storage to gnocchi
Change-Id: I679c8a31864f88420f2e415ab032138c33a8bf56
2017-03-30 13:47:17 +00:00
gord chung bb9b083626 remove test_hbase_table_utils
not referenced since kilo

Change-Id: Ie55e3a4b2b78df9239cc89b3c146145e01479ac6
2017-01-12 17:12:03 +00:00
Julien Danjou 8d23f431ab Remove events storage and API
This now has been moved to Panko.

Change-Id: I179eb0d436752e3bb8abaed714664cf74f5615e6
2017-01-06 16:33:53 +01:00
Mehdi Abaakouk 627ae0514c tools: stop using global conf
Change-Id: I321a957fc28129c2147d5893bbeaa5afe63daa39
2016-12-05 18:04:14 +01:00
zhangshengping2012 33533788c2 Remove ceilometer tool show_data.py since it is not usable
It removed the ceilometer tool show_data.py since it is not
usable.

Change-Id: I8230c3b7f4c14ec406df713b4a0bbb329fe6d66f
Closes-Bug: 1637056
2016-11-08 10:32:20 +08:00
Mehdi Abaakouk 32c5d72647 messaging: stop using global config
Change-Id: I97840aa9d1249deeba91dcdb6a5d23eca2fecdf1
2016-10-11 14:59:52 +02:00
liusheng f99cedf11f Use "topics" instead of "topic" in Notifier initialization
The "topic" parameter of the __init__method of Notifier has been
deprecated and will be removed. see change[1].

[1] Id89957411aa219cff92fafec2f448c81cb57b3ca

Change-Id: If41b0aa4f9afc90d049063bf509723c3a8295db7
2016-06-13 16:24:47 +08:00
ZhiQiang Fan 2b91096add remove log in tools/make_test_{event_}data.py
They are never used, we directly use print instead.

Change-Id: Ia0d94026e0e514ab5a56675e162f98b77c797010
2016-05-12 20:57:36 +08:00
Julien Danjou 25cd1d2385 Remove unused pylintrc
We never used that in the gate and it's unmaintained. Clean that.

Change-Id: I421c5b3084d7ff4d2bd6ab43a7a8a477d4a2c560
2016-05-03 00:05:46 +02:00
ZhiQiang Fan 5ccbea9623 switch to openstack cli instead of keystone cli
keystone cli is dead, let's use openstack cli instead

Change-Id: I43219e4ab41c76e763096f0f87d8bb95ae6d2429
2016-04-19 20:40:22 +08:00
Julien Danjou 38af0f6b64 collector: remove deprecated RPC code
Change-Id: I995398ee239754a4d333460112700caeec516eb5
2015-12-16 15:01:07 +01:00
liusheng 676638ede8 Fix ceilometer-test-event.py script
The ceilometer/tools/ceilometer-test-event.py script has been broken by
changes about yaml configuration loading.

Change-Id: I15b6bb053cf93847886c35e6af5c3eccb2984dba
2015-12-01 11:46:23 +08:00
Mehdi Abaakouk 299d08196a tools: fix default resource metadata for instance
Change-Id: I788efa28ae041c7600cad60a03eb4f039c65e560
2015-11-25 16:11:50 +01:00
Julien Danjou 656da0a6c9 tests: remove testscenario usage for storage drivers
We test only one driver at a time, so there is no need to leverage
scenarios here.

Change-Id: Ieff6e52d5efe46fc7ad5fa66b3fe199b1ac8c460
2015-11-24 13:45:32 +01:00
Julien Danjou 6bc86f75ea Remove alarming code
Since we moved all the alarming code and subsystem to the Aodh project,
remove it from Ceilometer.

Depends-On: I3983128d2d964b0f1f3326948b27f5d94df65a04
Depends-On: I99c9f2be0bbc70f289da5c2ba22698b8b7dc4495
Change-Id: Id169a914c1d1f2f5ad03ebb515d3d052204d5c5c
2015-11-24 13:44:58 +01:00
Jenkins 9e65978154 Merge "Correct the timestamp type when make test samples data" 2015-10-22 10:33:54 +00:00
ZhiQiang Fan 15f44c6946 specify runtime environment for scripts
I68200a23c87ceca5a237da13d9549c0aa82f1b8f has changed two scripts
to be executable, but unfortunately, it forgets to specify runtime
environment for those scripts, which will cause error when trying
to run those scripts directly.

This patch adds python environment specification for them.

Change-Id: Ibbcefb671de76146529b9a6e2debfee154a1aaa7
2015-10-20 23:43:04 +08:00
liusheng 2c1227e09d Correct the timestamp type when make test samples data
When recording samples to database, the timestamp should be
datetime.datetime type, but in make_test_data.py, the timestamp
will be transformed to iso format with unicode type.

Change-Id: Iffb09a293684fb8eab768c7370e8967349032ae5
Closes-Bug: #1504539
2015-10-20 01:39:20 +00:00
ZhiQiang Fan 2bd547b92d make script under tools directory executable
tools/send_test_data.py and tools/test_hbase_table_utils.py can be
run via python $COMMAND, they should be executable as well, just like
other scripts, so developers can save some typing.

Change-Id: I68200a23c87ceca5a237da13d9549c0aa82f1b8f
2015-10-18 05:57:51 -06:00
ZhiQiang Fan 939cb080a1 fix tools/make_test_event_data.py
ceilometer.event.storage.models.Event requires 6 arguments to initialze,
but tools/make_test_event_data.py only provides 5 arguments, so it is
broken now. The missing field is 'raw', which can be safely set to {}.

Change-Id: I4bec3ff66ab9fbec9306be2f1cb0095d148d80fb
Closes-Bug: #1506976
2015-10-17 02:20:31 +08:00
ZhiQiang Fan 662870ca3a remove instance:FLAVOR related code and docs
We have already removed meter instance:FLAVOR, let's clean our
code and docs to avoid unnecessary misleading.

Change-Id: I0c03b93252a263840ff50da6beed6445cc122ac2
Closes-Bug: #1505566
2015-10-13 02:22:08 -07:00
liusheng 861a0ce1c1 Fix make_test_data.sh
For now, the make_test_data.sh cannot work, because of some parameter
mistakes

Change-Id: I9bb02790ad8995bcdd296f9b2412eb3515863a38
2015-10-10 17:06:40 +08:00
Jenkins 6a10d00a38 Merge "Remove enable_notification.sh" 2015-09-29 19:51:40 +00:00
Julien Danjou b646cd2583 Remove enable_notification.sh
This script is not up to date and worthless nowadays.

Change-Id: I62139b0bbcbe46d78d5b7893af082bcdccb80125
2015-09-28 17:31:39 +02:00
Lianhao Lu b5a49e79e3 Ensure the test data sample has correct signature
Set the timestamp to iso format and make sure the test data samples
generated by scripts under tools directory have the correct signature.

Change-Id: I1520450ae4e82459b73cc411a698a6faa91a40e0
Closes-Bug: #1499651
2015-09-25 18:00:18 +08:00
Mehdi Abaakouk 0e476567de Improves send_test_data tools
Improves send_test_data.py tools so they can optionally send samples as
notifications, not just rpc.

Change-Id: Ib3cd809158029b0dbeca0b988e8d998bb2a313a7
2015-07-27 11:29:56 +02:00
Jenkins a2e7fce7a7 Merge "Switch to the oslo_utils.fileutils" 2015-07-20 10:55:17 +00:00
Sergey Vilgelm 889e66eb49 Switch to the oslo_utils.fileutils
fileutils is graduated in the oslo.utils library.
Remove the openstack.common package as well.

Implements: blueprint graduate-fileutils[1]
[1] https://blueprints.launchpad.net/oslo-incubator/+spec/graduate-fileutils

Depends-On: I51ba9076e1fbc16145ee2311f47b7768c16dcb20 (requirements)
Depends-On: I661dd222da6386a7dbcf854958a63e59b13e9ba4 (oslo.utils)

Change-Id: I6ba8f492a257096d27cbe83bfd06e53b7aabfa5d
2015-07-19 23:46:28 +03:00
Qiaowei Ren ca1cd7a616 Add necessary executable permission
Change-Id: I626ed411a1d476a2fa48a8cbea553e59bb8e5f05
2015-07-17 07:33:03 +00:00
Ilya Tyaptin 57a9fc5bce Add running functional scripts for defined backend
This CR allows running "functional" tox job for different backends.
Short description about expected workflow:
1. Gate job run ceilometer/ceilometer/tests/functional/hooks/post_test_hook.py
with <backend> parameter.
2. This script run "tox -efunctional" command with defined variable
CEILOMETER_TEST_BACKEND
3. After in "run-functional-tests.sh" setup script for the backend
and testr are runned.

In this CR running testr with pretty_tox.sh script added because
it allows to use subunit-trace output which developed in tempest-lib
and improve useful of testr output.

Partially implements: blueprint ceilometer-functional-tests
Change-Id: Idb66aca0b46779516db2baec856df8223dbe5c13
2015-06-04 16:29:02 +03:00
Jenkins 348c2263b6 Merge "Stop importing print_function" 2015-05-26 15:43:47 +00:00
Julien Danjou 7559424765 Stop importing print_function
We don't support Python 2.6 anymore so there is no use for that.

Change-Id: Ic1f8aefc4946752b03b25cac7a900f70c68133a5
2015-05-25 10:59:31 +02:00
Julien Danjou 5ac545e356 Remove useless release script in tools
This is not used anymore and can be used from openstack-release-tools anyway.

Change-Id: I4a7820bbef302fc6683b8aa3743f50383869d19f
2015-05-25 08:20:57 +02:00
Victor Stinner de9c4891e7 Python 3: generalize the usage of the six module
* Replace itertools.ifilter() with six.moves.filter()
* Replace itertools.imap() with six.moves.map()
* Replace map(_compare, statistics)
  with [_compare(statistic) for statistic in statistics]
* Replace obj.iterkeys() with six.iterkeys(obj)
* Replace obj.iteritems() with six.iteritems(obj)
* Replace xrange() with six.moves.xrange(), or with range() for small
  ranges
* Replace the repr module with six.moves.reprlib

Change-Id: Iaaa328cc15355182bde444a1aeaa4385691c8f90
2015-05-15 22:41:52 +02:00
gordon chung 7fc0d1e6c7 add event listener to collector
enable a listener in collector that listens to events queue. this
patch also renames 'metering_*' options which are now used by both
events and samples.

Change-Id: I6250c91e913864c3973e2d93022e38ad8bed8328
Implements: blueprint notification-pipelines
2015-02-02 11:00:47 -05:00
Julien Danjou a5f8d66d6e Upgrade to hacking 0.10
Change-Id: Ia567c3aeb7f8516d0834dc8e4c3852e43a687043
2015-01-23 17:43:04 +01:00
Julien Danjou eed463659f Remove the Nova notifier
This has not been tested for months and doesn't work anymore. There's no
way people are using it, so let's drop it until someone starts fixing it
again.

Change-Id: I7d6472a1924320c890dec47c41bf22db07a36efc
2015-01-23 12:35:23 +01:00
Dina Belova fc7e781344 Use oslo_config instead of deprecated oslo.config
Change-Id: I85d5c8d3d9f00f86fd14500be0da1289f5672614
2015-01-15 12:51:18 +04:00
ZhiQiang Fan c7f12a4224 Use oslo_utils instead of deprecated oslo.utils
oslo.utils 1.2.0 has changed its namespace from oslo.utils to
oslo_utils, the old import style of oslo.utils still can work but
it is deprecated.

Change-Id: I8832259624f15a8040f6de35136db7dd6d217f02
2015-01-10 21:04:23 +08:00
Ilya Tyaptin 2ea548f10f Add test data generator via oslo messaging
This script is helpful for emulate real workflow.
Generate and send sample batches with different resources and
configurable counter_name.

Change-Id: I3ab6472c99abfe28e8c200ada2da91e97abed1d2
2014-12-25 15:42:26 +04:00
Jenkins 4d1563b131 Merge "Clean up bin directory" 2014-12-19 10:24:55 +00:00
Lianhao Lu b1b6c17516 Clean up bin directory
Move ceilometer-test-event.py from directory bin to directory tools,
since it's for test purpose.

Change-Id: I3485a27ae66e255fbc460d0548be9dbb5700fa42
2014-12-18 15:00:12 +08:00
Lena Novokshonova f1c8428006 Improve tools/make_test_data.sh correctness
This change allows the script tools/make_test_data.sh and
tools/make_test_data.py to work correctly by handing
exceptions appropriately.


Change-Id: Ib054c3e10d617686928bf03f94c5ff868905afde
Closes-bug: 1389684
2014-12-17 10:15:11 +00:00
Balazs Gibizer 062ac3313d Enable pep8 on ./tools directory
This patch fixes the pep8 issues of the tool scripts and
configures tox to run pep8 on the tools directory.

Change-Id: Ifed21e19dd2b382790a1e2a90d5153a8845c4b64
2014-11-25 15:52:40 +01:00
Balazs Gibizer 16faba1ad8 Adapting pylint runner to the new message format
Parseable output format and --include-ids parameter are deprecated
and ignored in the pylint version used on the gate.
These functions are replaced by the --msg-template parameter.

This patch changes the runner to use the new parameter so that the
job can run properly on the gate

Closes-Bug: #1394606
Change-Id: Ia3e531923caa3f4e9a0dd03e0a4f5ef1a6d3dafb
2014-11-21 09:54:01 +01:00