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): ...@@ -1684,6 +1684,7 @@ class OpInstanceSetParams(OpCode):
"Per-instance hypervisor parameters, hypervisor-dependent"), "Per-instance hypervisor parameters, hypervisor-dependent"),
("disk_template", None, ht.TMaybe(_BuildDiskTemplateCheck(False)), ("disk_template", None, ht.TMaybe(_BuildDiskTemplateCheck(False)),
"Disk template for instance"), "Disk template for instance"),
("pnode", None, ht.TMaybeString, "New primary node"),
("remote_node", None, ht.TMaybeString, ("remote_node", None, ht.TMaybeString,
"Secondary node (used when changing disk template)"), "Secondary node (used when changing disk template)"),
("os_name", None, ht.TMaybeString, ("os_name", None, ht.TMaybeString,
......
...@@ -388,6 +388,7 @@ $(genOpCode "OpCode" ...@@ -388,6 +388,7 @@ $(genOpCode "OpCode"
, pRuntimeMem , pRuntimeMem
, pInstHvParams , pInstHvParams
, pOptDiskTemplate , pOptDiskTemplate
, pPrimaryNode
, pRemoteNode , pRemoteNode
, pOsNameChange , pOsNameChange
, pInstOsParams , pInstOsParams
......
...@@ -263,8 +263,9 @@ instance Arbitrary OpCodes.OpCode where ...@@ -263,8 +263,9 @@ instance Arbitrary OpCodes.OpCode where
OpCodes.OpInstanceSetParams <$> genFQDN <*> arbitrary <*> OpCodes.OpInstanceSetParams <$> genFQDN <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*>
pure emptyJSObject <*> arbitrary <*> pure emptyJSObject <*> pure emptyJSObject <*> arbitrary <*> pure emptyJSObject <*>
arbitrary <*> genMaybe genNodeNameNE <*> genMaybe genNameNE <*> arbitrary <*> genMaybe genNodeNameNE <*> genMaybe genNodeNameNE <*>
pure emptyJSObject <*> arbitrary <*> arbitrary <*> arbitrary genMaybe genNameNE <*> pure emptyJSObject <*> arbitrary <*>
arbitrary <*> arbitrary
"OP_INSTANCE_GROW_DISK" -> "OP_INSTANCE_GROW_DISK" ->
OpCodes.OpInstanceGrowDisk <$> genFQDN <*> arbitrary <*> OpCodes.OpInstanceGrowDisk <$> genFQDN <*> arbitrary <*>
arbitrary <*> arbitrary <*> 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