CLOUDSTACK-8343:modifying update method in Configurations to take **kwargs

This commit is contained in:
prashant kumar mishra 2015-03-25 11:43:05 +05:30 committed by sanjeev
parent b6d2b62aa7
commit dede9d94fe
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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