From dede9d94fe302b9a63ae82357cb14cd9355f9b3b Mon Sep 17 00:00:00 2001 From: prashant kumar mishra Date: Wed, 25 Mar 2015 11:43:05 +0530 Subject: [PATCH] CLOUDSTACK-8343:modifying update method in Configurations to take **kwargs --- test/integration/component/maint/test_bugs.py | 4 ++-- tools/marvin/marvin/lib/base.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/integration/component/maint/test_bugs.py b/test/integration/component/maint/test_bugs.py index 89b3bc91fa0..96d0f77e593 100644 --- a/test/integration/component/maint/test_bugs.py +++ b/test/integration/component/maint/test_bugs.py @@ -164,8 +164,8 @@ class Test42xBugsMgmtSvr(cloudstackTestCase): # "apply.allocation.algorithm.to.pods" back to false Configurations.update( self.apiClient, - "apply.allocation.algorithm.to.pods", - "false" + name="apply.allocation.algorithm.to.pods", + value="false" ) # TODO:cleanup: Restart management server return diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 7f609e740ef..3cb04fe6071 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -3636,12 +3636,11 @@ class Configurations: """Manage Configuration""" @classmethod - def update(cls, apiclient, name, value=None): + def update(cls, apiclient, **kwargs): """Updates the specified configuration""" cmd = updateConfiguration.updateConfigurationCmd() - cmd.name = name - cmd.value = value + [setattr(cmd, k, v) for k, v in kwargs.items()] apiclient.updateConfiguration(cmd) @classmethod