As a parameter with default value, it will be backwards compatible on the wire. Inside our code, however, we have to adapt the various calls to the constructor.
Signed-off-by: Klaus Aehlig <[email protected]> --- src/Ganeti/HTools/Cluster.hs | 4 +++- src/Ganeti/OpCodes.hs | 1 + test/hs/Test/Ganeti/OpCodes.hs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Ganeti/HTools/Cluster.hs b/src/Ganeti/HTools/Cluster.hs index b1646f0..1cbcef4 100644 --- a/src/Ganeti/HTools/Cluster.hs +++ b/src/Ganeti/HTools/Cluster.hs @@ -1685,7 +1685,9 @@ iMoveToJob nl il idx move = , OpCodes.opIgnoreIpolicy = False , OpCodes.opMigrationCleanup = False , OpCodes.opIallocator = Nothing - , OpCodes.opAllowFailover = True } + , OpCodes.opAllowFailover = True + , OpCodes.opIgnoreHvversions = True + } opFA n = opF { OpCodes.opTargetNode = lookNode n } -- not drbd opR n = OpCodes.OpInstanceReplaceDisks { OpCodes.opInstanceName = iname diff --git a/src/Ganeti/OpCodes.hs b/src/Ganeti/OpCodes.hs index d06786f..872500f 100644 --- a/src/Ganeti/OpCodes.hs +++ b/src/Ganeti/OpCodes.hs @@ -599,6 +599,7 @@ $(genOpCode "OpCode" , pMigrationCleanup , pIallocator , pAllowFailover + , pIgnoreHVVersions ], "instance_name") , ("OpInstanceMove", diff --git a/test/hs/Test/Ganeti/OpCodes.hs b/test/hs/Test/Ganeti/OpCodes.hs index 98f9d3b..9bf4b0a 100644 --- a/test/hs/Test/Ganeti/OpCodes.hs +++ b/test/hs/Test/Ganeti/OpCodes.hs @@ -158,7 +158,7 @@ instance Arbitrary OpCodes.OpCode where OpCodes.OpInstanceMigrate <$> genFQDN <*> return Nothing <*> arbitrary <*> arbitrary <*> genMaybe genNodeNameNE <*> return Nothing <*> arbitrary <*> arbitrary <*> arbitrary <*> - genMaybe genNameNE <*> arbitrary + genMaybe genNameNE <*> arbitrary <*> arbitrary "OP_TAGS_GET" -> arbitraryOpTagsGet "OP_TAGS_SEARCH" -> -- 2.1.0.rc2.206.gedb03e5
