From 22d568c2370fec36b37945103b75289a75067b43 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Tue, 18 Oct 2011 16:41:42 +0100
Subject: [PATCH] xen: abstract a few hardcoded strings as constants

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/hypervisor/hv_xen.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/hypervisor/hv_xen.py b/lib/hypervisor/hv_xen.py
index d2638f94c..3468fbe09 100644
--- a/lib/hypervisor/hv_xen.py
+++ b/lib/hypervisor/hv_xen.py
@@ -34,6 +34,11 @@ from ganeti import netutils
 from ganeti import objects
 
 
+XEND_CONFIG_FILE = "/etc/xen/xend-config.sxp"
+XL_CONFIG_FILE = "/etc/xen/xl.conf"
+VIF_BRIDGE_SCRIPT = "/etc/xen/scripts/vif-bridge"
+
+
 class XenHypervisor(hv_base.BaseHypervisor):
   """Xen generic hypervisor interface
 
@@ -46,9 +51,9 @@ class XenHypervisor(hv_base.BaseHypervisor):
   REBOOT_RETRY_INTERVAL = 10
 
   ANCILLARY_FILES = [
-    "/etc/xen/xend-config.sxp",
-    "/etc/xen/xl.conf",
-    "/etc/xen/scripts/vif-bridge",
+    XEND_CONFIG_FILE,
+    XL_CONFIG_FILE,
+    VIF_BRIDGE_SCRIPT,
     ]
 
   @staticmethod
-- 
GitLab