Move declaration of int_br_device_count earlier
_report_state is being called by setup_rpc so int_br_device_count needs
to be initialized earlier. To avoid
AttributeError: object has no attribute 'int_br_device_count'
This wasn't caught by unit tests for 3 separate reason
o The reference to self.int_br_device_count is wrapped in
except Exception: log / pass
- This reference has been moved outside of the try/except
o Unit tests set report_interval to 0 so the heartbeat wasn't called
during unit tests.
- now removed
o The function passed into FixedIntervalLoopingCall isn't started
anyways so wasn't calling self._report_state
- replaced FixedIntervalLoopingCall with a mock that calls the
function once.
Fixes bug #
1221054
Change-Id: I572af4ee017c1f7f016c8f9981ca54d1301442d1