Commit 67fc4de7 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add a few missing fields from opcodes



Due to manual conversion, a few fields were missing from the
conversion, but as they were optional our type equivalence checking
didn't detect this.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 3d7e87b8
......@@ -159,7 +159,7 @@ instance Arbitrary OpCodes.OpCode where
arbitrary <*> arbitrary <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*>
emptyMUD <*> emptyMUD <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary
"OP_CLUSTER_REDIST_CONF" -> pure OpCodes.OpClusterRedistConf
"OP_CLUSTER_ACTIVATE_MASTER_IP" ->
......@@ -195,7 +195,7 @@ instance Arbitrary OpCodes.OpCode where
OpCodes.OpNodeSetParams <$> genNodeNameNE <*> arbitrary <*>
emptyMUD <*> emptyMUD <*> arbitrary <*> arbitrary <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*> genMaybe genNameNE <*>
emptyMUD
emptyMUD <*> arbitrary
"OP_NODE_POWERCYCLE" ->
OpCodes.OpNodePowercycle <$> genNodeNameNE <*> arbitrary
"OP_NODE_MIGRATE" ->
......@@ -296,7 +296,7 @@ instance Arbitrary OpCodes.OpCode where
"OP_BACKUP_EXPORT" ->
OpCodes.OpBackupExport <$> genFQDN <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*>
genMaybe (pure []) <*> genMaybe genNameNE
arbitrary <*> genMaybe (pure []) <*> genMaybe genNameNE
"OP_BACKUP_REMOVE" ->
OpCodes.OpBackupRemove <$> genFQDN
"OP_TEST_ALLOCATOR" ->
......
......@@ -159,6 +159,7 @@ $(genOpCode "OpCode"
, pDrbdHelper
, pDefaultIAllocator
, pMasterNetdev
, pMasterNetmask
, pReservedLvs
, pHiddenOs
, pBlacklistedOs
......@@ -233,6 +234,7 @@ $(genOpCode "OpCode"
, pVmCapable
, pSecondaryIp
, pNdParams
, pPowered
])
, ("OpNodePowercycle",
[ pNodeName
......@@ -441,6 +443,7 @@ $(genOpCode "OpCode"
[ pInstanceName
, pShutdownTimeout
, pExportTargetNode
, pShutdownInstance
, pRemoveInstance
, pIgnoreRemoveFailures
, pExportMode
......
......@@ -56,6 +56,7 @@ module Ganeti.OpParams
, pOutputFields
, pShutdownTimeout
, pShutdownTimeout'
, pShutdownInstance
, pForce
, pIgnoreOfflineNodes
, pNodeName
......@@ -535,6 +536,10 @@ pShutdownTimeout' =
defaultField [| forceNonNeg C.defaultShutdownTimeout |] $
simpleField "timeout" [t| NonNegative Int |]
-- | Whether to shutdown the instance in backup-export.
pShutdownInstance :: Field
pShutdownInstance = defaultTrue "shutdown"
-- | Whether to force the operation.
pForce :: Field
pForce = defaultFalse "force"
......@@ -864,7 +869,8 @@ pMasterNetdev = optionalStringField "master_netdev"
-- | Netmask of the master IP.
pMasterNetmask :: Field
pMasterNetmask = optionalField $ simpleField "master_netmask" [t| Int |]
pMasterNetmask =
optionalField $ simpleField "master_netmask" [t| NonNegative Int |]
-- | List of reserved LVs.
pReservedLvs :: Field
......
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