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? old = TestSetExclStorCluster(True) try: … finally: TestSetExclStorCluster(old) Michael -- You received this message because you are subscribed to the Google Groups "ganeti-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
