Dan Kenigsberg has submitted this change and it was merged.
Change subject: clientIF: Decouple HSM and clientIF ......................................................................
clientIF: Decouple HSM and clientIF
clientIF.irs is currently created in clientIF.__init__, coupling clientIF and HSM and creating confusion about irs availability during initialization. There is a small window where irs is constructed but not set yet. This state is invalid; we have only two states, irs enabled or not, and we don't support moving from one state to the other.
This patch separates irs creation from clientIF creation. clientIF is created now with either a fully constructed irs object or None, eliminating the confusing unwanted state.
This change also makes it easier to test clientIF, allowing creating of clientIF with fake irs instance.
If we fail to create irs, we panic instead of running without irs.
Change-Id: I09aba3638d0dcf5aef73864dd0fe8eae1ced70b2 Signed-off-by: Nir Soffer nsoffer@redhat.com Reviewed-on: http://gerrit.ovirt.org/21877 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M vdsm/clientIF.py M vdsm/vdsm 2 files changed, 23 insertions(+), 20 deletions(-)
Approvals: Nir Soffer: Verified Dan Kenigsberg: Looks good to me, approved