Commit 88127c47 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix disk_template OpInstSetParams parameter



This is not a required field, but rather an optional one; we add a new
parameter and use it instead.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent d2970809
......@@ -383,7 +383,7 @@ $(genOpCode "OpCode"
, pInstBeParams
, pRuntimeMem
, pInstHvParams
, pDiskTemplate
, pOptDiskTemplate
, pRemoteNode
, pOsNameChange
, pInstOsParams
......
......@@ -97,6 +97,7 @@ module Ganeti.OpParams
, pAllowRuntimeChgs
, pInstDisks
, pDiskTemplate
, pOptDiskTemplate
, pFileDriver
, pFileStorageDir
, pVgName
......@@ -732,6 +733,13 @@ pInstDisks = renameField "instDisks" $ simpleField "disks" [t| [IDiskParams] |]
pDiskTemplate :: Field
pDiskTemplate = simpleField "disk_template" [t| DiskTemplate |]
-- | Instance disk template.
pOptDiskTemplate :: Field
pOptDiskTemplate =
optionalField .
renameField "OptDiskTemplate" $
simpleField "disk_template" [t| DiskTemplate |]
-- | File driver.
pFileDriver :: Field
pFileDriver = optionalField $ simpleField "file_driver" [t| FileDriver |]
......
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