Commit 7afca87f authored by Guido Trotter's avatar Guido Trotter
Browse files

LUInstanceCreate: use opcodes.RequireFileStorage


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 4304964a
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment