Commit d2204b1a authored by Klaus Aehlig's avatar Klaus Aehlig Committed by Guido Trotter
Browse files

Add parameter pnode to OpInstanceSetParams



This parameter will be used to set the new primary node
of an instance, assuming that the disks have been moved
by other means (outside ganeti's control).
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 8d53117b
......@@ -1684,6 +1684,7 @@ class OpInstanceSetParams(OpCode):
"Per-instance hypervisor parameters, hypervisor-dependent"),
("disk_template", None, ht.TMaybe(_BuildDiskTemplateCheck(False)),
"Disk template for instance"),
("pnode", None, ht.TMaybeString, "New primary node"),
("remote_node", None, ht.TMaybeString,
"Secondary node (used when changing disk template)"),
("os_name", None, ht.TMaybeString,
......
......@@ -388,6 +388,7 @@ $(genOpCode "OpCode"
, pRuntimeMem
, pInstHvParams
, pOptDiskTemplate
, pPrimaryNode
, pRemoteNode
, pOsNameChange
, pInstOsParams
......
......@@ -263,8 +263,9 @@ instance Arbitrary OpCodes.OpCode where
OpCodes.OpInstanceSetParams <$> genFQDN <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*>
pure emptyJSObject <*> arbitrary <*> pure emptyJSObject <*>
arbitrary <*> genMaybe genNodeNameNE <*> genMaybe genNameNE <*>
pure emptyJSObject <*> arbitrary <*> arbitrary <*> arbitrary
arbitrary <*> genMaybe genNodeNameNE <*> genMaybe genNodeNameNE <*>
genMaybe genNameNE <*> pure emptyJSObject <*> arbitrary <*>
arbitrary <*> arbitrary
"OP_INSTANCE_GROW_DISK" ->
OpCodes.OpInstanceGrowDisk <$> genFQDN <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary
......
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