Dan Kenigsberg has submitted this change and it was merged.
Change subject: config: Make it easy to create default config
......................................................................
config: Make it easy to create default config
Previously a default config object was created by invoking a private
function, modifying the global config, before reading the configuration
from the config file. This design make it impossible to create a default
config object for testing, or to reload the configuration while vdsm is
running.
This patch replace the private function with public function accepting
a config object. Now you can create a default config object by creating
a new config parser and setting the defaults:
fake_config = ConfigParser.ConfigParser()
config.set_defaults(fake_config)
fake_config.set('irs', 'repository', '/my/fake/repository')
Change-Id: I80ec628d1da5c0466af28cb73564c6e63fd5ca65
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/25504
Reviewed-by: Yaniv Bronhaim <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M lib/vdsm/config.py.in
1 file changed, 2 insertions(+), 4 deletions(-)
Approvals:
Nir Soffer: Verified
Yaniv Bronhaim: Looks good to me, but someone else must approve
Dan Kenigsberg: Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/25504
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I80ec628d1da5c0466af28cb73564c6e63fd5ca65
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches