def cluster_status(self, cluster_info, status, node, job):
        if status == DispyJob.Created:
            self._cluster_lock.acquire()
            cluster_info.jobs_submitted += 1
            cluster_info.jobs[id(job)] = job
            self._cluster_lock.release()
            return
        if status == DispyJob.Finished or status == DispyJob.Terminated or \
           status == DispyJob.Cancelled or status == DispyJob.Abandoned:
            self._cluster_lock.acquire()
            cluster_info.jobs_done += 1
            cluster_info.jobs.pop(id(job), None)
            self._cluster_lock.release()

        if node is not None:
            # even if node closed, keep it; let UI decide how to indicate status
            self._cluster_lock.acquire()
            cluster_info.status[node.ip_addr] = node
            cluster_info.updates[node.ip_addr] = node
            self._cluster_lock.release()
Create an autoscaling stack and invoke a scaling policy.
dataset/ETHPy150Open pgiri/dispy/py2/dispy/httpd.py/DispyHTTPServer.cluster_status--crossover with--dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/heat/stacks.py/HeatStacks.create_stack_and_scale