Modify Disk.GetNodes() to support LD_FILE
authorManuel Franceschini <manuel.franceschini@gmail.com>
Tue, 25 Mar 2008 17:48:41 +0000 (17:48 +0000)
committerManuel Franceschini <manuel.franceschini@gmail.com>
Tue, 25 Mar 2008 17:48:41 +0000 (17:48 +0000)
Reviewed-by: iustinp

lib/objects.py

index b782c26..74c0c7e 100644 (file)
@@ -363,7 +363,8 @@ class Disk(ConfigObject):
     devices needs to (or can) be assembled.
 
     """
-    if self.dev_type == constants.LD_LV or self.dev_type == constants.LD_MD_R1:
+    if self.dev_type in [constants.LD_LV, constants.LD_MD_R1,
+                         constants.LD_FILE]:
       result = [node]
     elif self.dev_type in constants.LDS_DRBD:
       result = [self.logical_id[0], self.logical_id[1]]