On 30 January 2013 13:12, Michael Hanselmann <[email protected]> wrote: > 2013/1/30 Bernardo Dal Seno <[email protected]>: >> --- a/qa/qa_cluster.py >> +++ b/qa/qa_cluster.py >> +def TestSetExclStorCluster(newvalue): >> + """Set the exclusive_storage node parameter at the cluster level. >> + >> + @type newvalue: bool >> + @param newvalue: New value of exclusive_storage >> + >> + """ >> + AssertCommand(["gnt-cluster", "modify", "--node-parameters", >> + "exclusive_storage=%s" % newvalue]) >> + effvalue = _GetBoolClusterField("exclusive_storage") >> + if effvalue != newvalue: >> + raise qa_error.Error("exclusive_storage has the wrong value: %s instead" >> + " of %s" % (effvalue, newvalue)) > > Couldn't this function return the original value, so one can write > code to restore it?
It could, but I've found no actual use for that, so I'd prefer to keep the function void like the other tests. It's easy to add this feature if needed. Or have you found places where it should be used? Bernardo
