Introduce a constant for the copyable disk templates
authorKlaus Aehlig <aehlig@google.com>
Wed, 3 Apr 2013 15:16:00 +0000 (17:16 +0200)
committerBernardo Dal Seno <bdalseno@google.com>
Wed, 3 Apr 2013 17:14:28 +0000 (19:14 +0200)
This list contains the disk templates suitable for moving
an instance by copying the files. A requirement is that
they're not accessed externally or shared between nodes;
in particular, sharedfile is not suitable.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>

lib/constants.py

index 8dbcae5..0fa47de 100644 (file)
@@ -425,6 +425,14 @@ DTS_FILEBASED = compat.UniqueFrozenset([
   DT_SHARED_FILE,
   ])
 
+# the set of disk templates that can be moved by copying
+# Note: a requirement is that they're not accessed externally or shared between
+# nodes; in particular, sharedfile is not suitable.
+DTS_COPYABLE = compat.UniqueFrozenset([
+  DT_FILE,
+  DT_PLAIN,
+  ])
+
 # the set of disk templates that are supported by exclusive_storage
 DTS_EXCL_STORAGE = compat.UniqueFrozenset([DT_PLAIN])