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(a)redhat.com>
Reviewed-on:
http://gerrit.ovirt.org/21877
Reviewed-by: Dan Kenigsberg <danken(a)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
--
To view, visit
http://gerrit.ovirt.org/21877
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I09aba3638d0dcf5aef73864dd0fe8eae1ced70b2
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server