Revision 36d450e8 snf-cyclades-gtools/synnefo/ganeti/eventd.py

b/snf-cyclades-gtools/synnefo/ganeti/eventd.py
188 188
        self.client.exchange_declare(settings.EXCHANGE_GANETI, type='topic')
189 189

  
190 190
        self.op_handlers = {"INSTANCE": self.process_instance_op,
191
                            "NETWORK": self.process_network_op}
191
                            "NETWORK": self.process_network_op,
192
                            "CLUSTER": self.process_cluster_op}
192 193
                            # "GROUP": self.process_group_op}
193 194

  
194 195
    def process_IN_CLOSE_WRITE(self, event):
......
329 330

  
330 331
        return msg, routekey
331 332

  
333
    def process_cluster_op(self, op, job_id):
334
        """ Process OP_CLUSTER_* opcodes.
332 335

  
333
    # def process_group_op(self, op, job_id):
334
    #     """ Process OP_GROUP_* opcodes.
336
        """
337

  
338
        input = op.input
339
        op_id = input.OP_ID
340

  
341
        self.logger.debug("Job: %d: %s %s", job_id, op_id, op.status)
335 342

  
336
    #     """
337
    #     return None, None
343
        msg = {'operation':    op_id,
344
               'type':         "ganeti-cluster-status"}
345

  
346
        routekey = "ganeti.event.cluster"
347

  
348
        return msg, routekey
338 349

  
339 350

  
340 351
def find_cluster_name():

Also available in: Unified diff