From 85a0ff7e4914d42e13675bf837d2eeadb12b5591 Mon Sep 17 00:00:00 2001
From: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Date: Mon, 28 Feb 2011 13:51:05 +0200
Subject: [PATCH] Add DTS_MIRRORED frozenset

Use DTS_MIRRORED to indicate mirrored disk templates that allow
migrations/failover.

DTS_MIRRORED is the union of DTS_EXT_MIRROR and DTS_NET_MIRROR.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/constants.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/constants.py b/lib/constants.py
index 4c55f3ae4..e2143364d 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -379,6 +379,10 @@ DTS_GROWABLE = frozenset([DT_PLAIN, DT_DRBD8, DT_FILE, DT_SHARED_FILE])
 # the set of disk templates that allow adoption
 DTS_MAY_ADOPT = frozenset([DT_PLAIN])
 
+# the set of disk templates that allow migrations
+DTS_MIRRORED = frozenset.union(DTS_NET_MIRROR, DTS_EXT_MIRROR)
+
+
 # logical disk types
 LD_LV = "lvm"
 LD_DRBD8 = "drbd8"
-- 
GitLab