On 30 January 2013 18:25, Michael Hanselmann <[email protected]> wrote: > 2013/1/30 Bernardo Dal Seno <[email protected]>: >> --- a/qa/qa-sample.json >> +++ b/qa/qa-sample.json >> + "# Cluster value of the exclusive-storage flag": null, >> + "exclusive-storage": null, > > I'm not sure I understand. What is this doing, and what is > “_exclusive_storage” used for? Please clarify in the commit message.
For some things I've put/changed comments inside the code. So, I've appended this to the commit message: Also, it's now possible to specify the initial value of the exclusive_storage flag in the configuration file. and changed this: diff --git a/qa/qa-sample.json b/qa/qa-sample.json index d7d4324..d50360c 100644 --- a/qa/qa-sample.json +++ b/qa/qa-sample.json @@ -21,7 +21,7 @@ "primary_ip_version": 4, "# Name of the LVM group for the cluster": null, "vg-name": "xenvg", - "# Cluster value of the exclusive-storage flag": null, + "# Cluster-level value of the exclusive-storage flag": null, "exclusive-storage": null, "# Network interface for master role": null, diff --git a/qa/qa_config.py b/qa/qa_config.py index 86838ce..3641892 100644 --- a/qa/qa_config.py +++ b/qa/qa_config.py @@ -35,6 +35,7 @@ import qa_error _INSTANCE_CHECK_KEY = "instance-check" _ENABLED_HV_KEY = "enabled-hypervisors" +# Key to store the cluster-wide value of the exclusive storage flag _EXCLUSIVE_STORAGE_KEY = "_exclusive_storage" @@ -244,14 +245,14 @@ def SetInstanceTemplate(inst, template): def SetExclusiveStorage(value): - """Set the exclusive_storage flag value for the cluster. + """Set the expected value of the exclusive_storage flag for the cluster. """ cfg[_EXCLUSIVE_STORAGE_KEY] = bool(value) def GetExclusiveStorage(): - """Get the exclusive_storage flag for the cluster. + """Get the expected value of the exclusive_storage flag for the cluster. """ val = cfg.get(_EXCLUSIVE_STORAGE_KEY) Bernardo
