def allocate_machine(self, params=None):
u"""Allocate an available machine for deployment.
http://maas.ubuntu.com/docs2.0/api.html#machine
:param params:Constraints parameters can be used to
allocate a machine that possesses certain characteristics.
All the constraints are optional and when multiple
constraints are provided, they are combined using 'AND' semantics.
"""
url = u'machines/'
if params is None:
params = dict()
params[u'op'] = u'allocate'
res = self.post(url, params)
return self.error_checking(res)