Sandro Bonazzola has posted comments on this change.

Change subject: agent: update logic and use state machine
......................................................................


Patch Set 2:

(1 comment)

....................................................
File ovirt_hosted_engine_ha/agent/hosted_engine.py
Line 638:     def _handle_entry(self):
Line 639:         """
Line 640:         ENTRY state.  Determine current vm state and switch 
appropriately.
Line 641:         """
Line 642:         local_host_id = self._local_state['host-id']
I'm not against having multiple returns but I think that in simple cases where 
it is possible to have a unique exit point of the method without increasing the 
method complexity it's better avoid multiple returns. It will be easier to run 
code coverage tools while testing the code.
Line 643:         if self._all_host_stats[local_host_id]['engine-status'][:5] 
== 'vm-up':
Line 644:             return self.States.ON, False
Line 645:         else:
Line 646:             return self.States.OFF, False


-- 
To view, visit http://gerrit.ovirt.org/18051
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iad9906d50a5fffb4c9f362b43f0064bf6be4dbde
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-hosted-engine-ha
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to