<div dir="ltr">Hi, <div>I'm trying to listen to events of type "compute.instance.*" (e.g. compute.instance.update).</div><div>I tried the following code:</div><div><br></div><div><div>from oslo_config import cfg</div><div>import oslo_messaging</div><div><br></div><div>class NotificationEndpoint(object):</div><div> filter_rule = oslo_messaging.NotificationFilter(publisher_id='compute.*',</div><div> event_type='compute.instance.update',</div><div> context={'ctxt_key': 'regexp'})</div><div><br></div><div> def info(self, ctxt, publisher_id, event_type, payload, metadata):</div><div> print(payload)</div><div><br></div><div> def warn(self, ctxt, publisher_id, event_type, payload, metadata):</div><div> print(payload)</div><div><br></div><div>transport = oslo_messaging.get_transport(cfg.CONF)</div><div>targets = [oslo_messaging.Target(topic='notifications'),</div><div> oslo_messaging.Target(topic='notifications_bis')]</div><div>endpoints = [NotificationEndpoint()]</div><div>pool = "listener-workers"</div><div>server = oslo_messaging.get_notification_listener(transport=transport,</div><div> targets=targets,</div><div> endpoints=endpoints,</div><div> pool=pool)</div><div>server.start()</div><div>server.wait()</div></div><div><br></div><div>then, from Horizon i changed an instance name (which should call <span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre">_send_instance_update_notification</span>) but i didn't get any notification.</div><div><br></div><div>Any ideas?</div><div>Thanks,</div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><pre style="white-space:pre-wrap;font-size:10px;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><div style="font-family:arial,sans-serif;font-size:13px;text-align:-webkit-auto;white-space:normal;margin:0px"><b><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif">Eduard Biceri Matei, Senior Software Developer</span></b></div><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px;text-align:-webkit-auto;white-space:normal;margin:0px"><span style="font-size:13.5pt;font-family:Helvetica,sans-serif"><a href="http://www.cloudfounders.com/" style="color:rgb(17,85,204)" target="_blank"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"><font color="#0045a3">www.cloudfounders.com</font></span></a><div style="display:inline-block;width:16px;height:16px"></div><div style="display:inline-block;width:16px;min-height:16px"></div></span><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"><font color="#1f497d"> | </font><a href="mailto:eduard.matei@cloudfounders.com" style="color:rgb(17,85,204)" target="_blank"><font color="#0045a3">eduard.matei@cloudfounders.com</font></a></span></div><div style="font-family:arial,sans-serif;font-size:13px;text-align:-webkit-auto;white-space:normal;margin:0px"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></div><br><div style="font-family:arial,sans-serif;font-size:13px;text-align:-webkit-auto;white-space:normal;margin:0px"><span lang="EN-US" style="font-size:13.5pt;font-family:Arial,sans-serif;color:rgb(80,0,80)"><u></u> <u></u></span></div><div style="font-family:arial,sans-serif;font-size:13px;text-align:-webkit-auto;white-space:normal;margin:0px"><b><span lang="EN-US" style="font-size:13.5pt;font-family:Arial,sans-serif">CloudFounders, The Private Cloud Software Company</span></b><span lang="EN-US" style="font-size:13.5pt;font-family:Arial,sans-serif"><u></u><u></u></span></div><div style="font-family:arial,sans-serif;font-size:13px;text-align:-webkit-auto;white-space:normal;margin:0px"><span lang="EN-US" style="font-size:13.5pt;font-family:Helvetica,sans-serif"><u></u> <u></u></span></div><div style="font-family:arial,sans-serif;font-size:13px;text-align:-webkit-auto;white-space:normal;margin:0px"><span lang="EN-US" style="font-family:Helvetica,sans-serif;font-size:11px">Disclaimer:<u></u><u></u></span></div><div style="font-family:arial,sans-serif;font-size:13px;text-align:-webkit-auto;white-space:normal;margin:0px"><span lang="EN-US" style="font-size:8.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.</span><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)"><br><span style="font-size:11px">If you are not the named addressee or an employee or agent responsible for delivering this message to the named addressee, you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this email in error we request you to notify us by reply e-mail and to delete all electronic files of the message. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. <br>E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the content of this message, and shall have no liability for any loss or damage suffered by the user, which arise as a result of e-mail transmission.</span></span></div></pre></div></div>
</div></div>