ooici/coi-services — pull request #1088 by carueda (2013-05-16 23:09:21+00:00)
Title: add diagnostics report in platform agent triggered by event

Upon reception of "special" event each platfform agent generates a report of the current statuses via log.info. This functionality could be extended later as it proves useful, even perhaps introducing a more official command for resource agents in general.

The immediate usage of this functionality is in the context of running the UI. Then, after a platform agent or set of platform agents has been lanched, the following can be entered at the pycc prompt to generate the reports:

><> from ion.agents.platform.status_manager import publish_event_for_diagnostics
><> publish_event_for_diagnostics()

and something like the following will be logged out from each running platform agent:

2013-05-16 15:09:06,754 INFO Dummy-360 ion.agents.platform.status_manager:673 'LJ01D': statuses:
aggstatus : {'AGGREGATE_COMMS': 'STATUS_OK ', 'AGGREGATE_POWER': 'STATUS_OK ', 'AGGREGATE_DATA': 'STATUS_OK ', 'AGGREGATE_LOCATION': 'STATUS_OK '}
09b9091514904d608527f970453da519 : {'AGGREGATE_COMMS': 'STATUS_OK ', 'AGGREGATE_POWER': 'STATUS_OK ', 'AGGREGATE_DATA': 'STATUS_OK ', 'AGGREGATE_LOCATION': 'STATUS_OK '}
7e25d59091464e4f8b042e63df929cb0 : {'AGGREGATE_COMMS': 'STATUS_UNKNOWN ', 'AGGREGATE_POWER': 'STATUS_UNKNOWN ', 'AGGREGATE_DATA': 'STATUS_UNKNOWN ', 'AGGREGATE_LOCATION': 'STATUS_UNKNOWN '}
rollup_status : {'AGGREGATE_COMMS': 'STATUS_OK ', 'AGGREGATE_POWER': 'STATUS_OK ', 'AGGREGATE_DATA': 'STATUS_OK ', 'AGGREGATE_LOCATION': 'STATUS_OK '}