From c148e44813ef2c130889461259cfb2272887f5e0 Mon Sep 17 00:00:00 2001
From: Klaus Aehlig <aehlig@google.com>
Date: Wed, 3 Apr 2013 17:16:00 +0200
Subject: [PATCH] Introduce a constant for the copyable disk templates

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 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/constants.py b/lib/constants.py
index 8dbcae5cb..0fa47de32 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -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])
 
-- 
GitLab