Martin Polednik has posted comments on this change.
Change subject: vdsProxy pass calls to undefined methods to API and return msg/status ......................................................................
Patch Set 4:
(1 comment)
.................................................... File tests/functional/utils.py Line 81: """ Line 82: if hasattr(self.vdscli, attr): Line 83: def wrapper(*args, **kwargs): Line 84: result = getattr(self.vdscli, attr)(*args, **kwargs) Line 85: self.lastResult = result few functions, such as getAllVmStats or getVdsStats are expected to return additional dict which is then used in tests - in order to do so, they are currently defined in vdsProxy causing API duplication
lastResult allows us to get the result without duplicating the call here (the calls are currently unchaged as i'd rather do that in separate patch)
current version: - define getAllVmStats in vdsProxy to return additional values - call getAllVmStats - use the returned data
with this patch: - call getAllVmStats - get the needed data from lastResult Line 86: return result['status']['code'], result['status']['message'] Line 87: return wrapper Line 88: Line 89: raise AttributeError(attr)