Commit bd9ef845 authored by Hrvoje Ribicic's avatar Hrvoje Ribicic
Browse files

Fix non-running test and remove custom_nicparams rename



Due to a missing base class, the test that was supposed to check if
RAPI instance parameter renames during modifications are working did
not execute. As the instances are not covered by the QA tests, the
tests failed to show that custom nicparams cannot actually be set
through RAPI at the time. Given that the instance interface is
asymmetric beyond simple repairs, this is fine in 2.10. This patch
sets the test to execute, removes the setting of custom_nicparams in
the test, and removes the renaming of the param in the RAPI request.
Signed-off-by: default avatarHrvoje Ribicic <riba@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent a278ef7f
......@@ -1368,7 +1368,6 @@ class R_2_instances_name_modify(baserlib.OpcodeResource):
PUT_RENAME = {
"custom_beparams": "beparams",
"custom_hvparams": "hvparams",
"custom_nicparams": "nicparams",
}
def GetPutOpInput(self):
......
......@@ -558,7 +558,7 @@ class TestInstanceDiskGrow(unittest.TestCase):
self.assertRaises(IndexError, cl.GetNextSubmittedJob)
class TestInstanceModify():
class TestInstanceModify(unittest.TestCase):
def testCustomParamRename(self):
clfactory = _FakeClientFactory(_FakeClient)
......@@ -566,7 +566,6 @@ class TestInstanceModify():
data = {
"custom_beparams": {},
"custom_hvparams": {},
"custom_nicparams": {},
}
handler = _CreateHandler(rlib2.R_2_instances_name_modify, [name], {}, data,
......@@ -582,7 +581,6 @@ class TestInstanceModify():
self.assertTrue(isinstance(op, opcodes.OpInstanceSetParams))
self.assertEqual(op.beparams, {})
self.assertEqual(op.hvparams, {})
self.assertEqual(op.nicparams, {})
self.assertRaises(IndexError, cl.GetNextSubmittedJob)
......
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