Commit Graph

14 Commits

Author SHA1 Message Date
likui c84e98d6b6 Remove six
Replace the following items with Python 3 style code.

- six.PY2
- six.add_metaclass
- six.string_types
- six.text_type
- six.moves
- six.StringIO
- six.wraps
- six.integer_types

Story: 2008305
Task: 41191

Change-Id: I68710421b69d4049c9e990451da491dc14251fb5
2020-11-13 16:16:58 +01:00
Chuck Short b8bb2ff4c3 Add python36 support
Use the six library to get monasca-agent to work with
python2.7 and python3.

Story: 2004148
Task: 27621

Change-Id: I0de315967dd5a745741fda0c53ce8cc85cda8cc5
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-10-25 09:09:53 -04:00
Jui Chandwaskar c983708637 Add Apache License
Added Apache 2.0 License for missed files

Change-Id: I72217d3cf0089434a9bbe1e5dfd57224a803704e
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
2018-04-14 11:50:07 +00:00
loooosy 978157fe32 Replace six.iteritems() with .items()
update  where ```iteritems``` is used
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ic82c26e0f37bd3ecea98bc85bd98bd62c8d762a2
2017-04-03 22:52:26 +08:00
iswarya_vakati d70eaced8d Remove unused logging import
Change-Id: I0240233b7b69e110208c41f5b4c65c6351bc6f63
2017-02-20 17:36:07 +00:00
Tony Xu 47560f56a6 Change assertTrue(isinstance()) by optimal assert
Use assertIsInstance() instead of assertTrue(isinstance())

Change-Id: Ib1d84eb1245d822bac0c0ee5fac7a086fabadcdc
2016-10-25 10:38:29 +08:00
zhangyanxian 59936c7b38 Fix some typo in the files
alwayws should be always
messges should be messages

Change-Id: I64fe8378efb6dd069047852d40ea310b71b28429
2016-07-22 03:26:08 +00:00
Jenkins d10d55cc90 Merge "Migrate from MySQLDB to pymysql" 2016-04-22 15:10:58 +00:00
Artur Basiak 0af745ff63 Migrate from MySQLDB to pymysql
Replacing MySQLDB with PyMySQL.

PyMySQL is a drop-in replacement for MySQLdb
and released under MIT License instead of GPL
(OpenStack incompatible
http://governance.openstack.org/reference/licensing.html).

Change-Id: I76ecac112c9a5a373f2f0362de77f9e32e97511c
2016-04-20 08:58:27 +00:00
Michael James Hoppal ff5e9c7d7c Refactor agent
Remove windows related code as we do not support running on
windows

Remove the idea of check status as it was added code and complexity
that we did not gain much from.

Remove some functions at the AgentCheck level that either added another
layer of complexity that we did not get any functionality from or functions
that we didnt use like events

Change-Id: I4b6bc4f9d38e6b4f4fe5c632f885b84aaff7fd08
2016-04-13 16:50:44 -06:00
Jenkins 9ad14a48aa Merge "Remove watchdog from the agent" 2015-09-16 04:45:55 +00:00
Michael James Hoppal 977b07a29c Remove watchdog from the agent
The watchdog is causing problems by restarting the agent
even if it does not need to. Also we are not gaining
anything by running it. In result we are removing
watchdog completely from the agent.

Change-Id: I45b80e28d81749c98dff7273d7756e10db23da70
2015-08-25 08:07:08 -06:00
Tim Kuhlman f3b24fc0ac Fixed default process metrics.
The fix is from David Kennedy and then I added a much needed simple test
to make sure it stays fixed.

Change-Id: I79a562fd82834751fcd0bac7dd3b79d2d857696b
2015-08-24 13:06:35 -06:00
Joe Keen ffd53d8536 Updating unit tests
Change-Id: I56a884962902a0633cd6dded0c1d877a116715b9
2015-08-20 15:04:00 -06:00