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>
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
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
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
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
The fix is from David Kennedy and then I added a much needed simple test
to make sure it stays fixed.
Change-Id: I79a562fd82834751fcd0bac7dd3b79d2d857696b