'Acquire a lease for ``dataset3`` and ``node3`` with given expiration.
:param expires: ``None`` or seconds to expire.
:param response_code: Expected response code.
:return: ``Deferred`` that fires once lease is acquired.'

def acquire_lease(self, expires, response_code=CREATED):

    lease_json = {u'dataset_id': unicode(self.dataset3), u'node_uuid': unicode(self.node3), u'expires': expires}
    return self.assertResult('POST', '/configuration/leases', request_body=lease_json, expected_code=response_code, expected_result=lease_json)
