Martin Sivák has posted comments on this change.
Change subject: Change mom policy related interface to support multi-policy
......................................................................
Patch Set 9: I would prefer that you didn't submit this
(1 inline comment)
If we can't use default arguments because of our domain specific json descriptions, at
least make momIf use it and convert the data in API.
....................................................
File vdsm/momIF.py
Line 58: ret['ksmCpu'] = stats['ksmd_cpu_usage']
Line 59: return ret
Line 60:
Line 61: def setPolicy(self, policyParam):
Line 62: if isinstance(policyParam, dict) and len(policyParam) == 1:
I do not like this much, I would prefer having setPolicy(self, policyStr, name = None)
over the dictionary logic here..
Line 63: policy = policyParam.popitem()
Line 64: self._mom.setNamedPolicy(policy[0], policy[1])
Line 65: else:
Line 66: # mom.setPolicy will raise an exception on failure.
--
To view, visit
http://gerrit.ovirt.org/12466
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I09c40fee74b10d3eb41f4ec3ca18096a9b20dfcd
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck(a)redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Mei Liu <liumbj(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server