

def _launch_for_cluster(self, handler, cluster_id):
    if self.clusters:
        cluster_id = self._get_cluster_by_id(cluster_id).id
        resp = self.app.put(reverse(handler, kwargs={
            'cluster_id': cluster_id,
        }), headers=handler.default_headers)
        return self.db.query(Task).filter_by(uuid=resp.json_body['uuid']).first()
    else:
        raise NotImplementedError('Nothing to deploy - try creating cluster')

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py EnvironmentManager._launch_for_cluster/VarMisuse@58/79 `self`->`handler`