Change in vdsm[master]: tool: Make configurators more Pythonic

danken at redhat.com danken at redhat.com
Mon Sep 1 21:01:53 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: tool: Make configurators more Pythonic
......................................................................


tool: Make configurators more Pythonic

The configurations used to have Java like getters, which make the code
more clumsy then it should be. This patch convert the getters to read
only properties.

The types returned by the getters were mutable, which may lead to
calling code to modify the returned value without any error. Now the
configurators return immutable types.

There was no documentation about the purpose and the semantics of the
getters, which makes it harder for new developer to modify this part.
Now ModuleConfigure document these properties.

There should be no change in the behavior.

Change-Id: I16092da09d6763a8222bc941bd7d1501a7bb3bff
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/31741
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
Reviewed-by: mooli tayer <mtayer at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/tool/configurator.py
M lib/vdsm/tool/configurators/__init__.py
M lib/vdsm/tool/configurators/certificates.py
M lib/vdsm/tool/configurators/libvirt.py
M lib/vdsm/tool/configurators/sanlock.py
M tests/toolTests.py
6 files changed, 69 insertions(+), 42 deletions(-)

Approvals:
  Nir Soffer: Verified
  Yaniv Bronhaim: Looks good to me, but someone else must approve
  Antoni Segura Puimedon: Looks good to me, but someone else must approve
  mooli tayer: Looks good to me, but someone else must approve
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I16092da09d6763a8222bc941bd7d1501a7bb3bff
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list