[node-patches] Change in ovirt-node[master]: config: Add chainability for update() calls

fabiand at fedoraproject.org fabiand at fedoraproject.org
Fri Feb 28 15:14:52 UTC 2014


Fabian Deutsch has submitted this change and it was merged.

Change subject: config: Add chainability for update() calls
......................................................................


config: Add chainability for update() calls

Previously the following pattern was needed to activate configurations:

    cfg = defaults.Keyboard()
    cfg.update(layout="de")
    cfg.transaction().run()

or
    cfg = defaults.Keyboard()
    cfg.update(layout="de")
    cfg.commit()

now it's possible to chain this up to

    defaults.Keyboard().update(layout="de").commit()

This patch also includes a testcase for this (tiny) feature.

Change-Id: I36a101a7ee6f729241cc99663f2a6986c964dcdd
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/config/defaults.py
A tests/nose/defaults.py
2 files changed, 89 insertions(+), 5 deletions(-)



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36a101a7ee6f729241cc99663f2a6986c964dcdd
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the node-patches mailing list