From 7afca87fd4afeed42748710620c2b4c16e90340d Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Wed, 22 Jun 2011 14:14:27 +0100 Subject: [PATCH] LUInstanceCreate: use opcodes.RequireFileStorage Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/cmdlib.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 7efdd8d60..a9344718e 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -7096,9 +7096,8 @@ class LUInstanceCreate(LogicalUnit): raise errors.OpPrereqError("Invalid file driver name '%s'" % self.op.file_driver, errors.ECODE_INVAL) - if (self.op.disk_template == constants.DT_FILE and - not constants.ENABLE_FILE_STORAGE): - raise errors.OpPrereqError("File storage disabled") + if self.op.disk_template == constants.DT_FILE: + opcodes.RequireFileStorage() ### Node/iallocator related checks _CheckIAllocatorOrNode(self, "iallocator", "pnode") -- GitLab