<div dir="ltr">Yes, look at this patch: <a href="https://review.openstack.org/#/c/174588/">https://review.openstack.org/#/c/174588/</a><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 29, 2015 at 3:42 PM, Neil Jerram <span dir="ltr"><<a href="mailto:Neil.Jerram@metaswitch.com" target="_blank">Neil.Jerram@metaswitch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there,<br>
<br>
For my team's networking backend, we want to catch security group updates in our ML2 mechanism driver code.<br>
<br>
Currently we're doing this by monkey patching the AgentNotifierApi:<br>
<br>
    # This section monkeypatches the AgentNotifierApi.security_groups_rule_updated<br>
    # method to ensure that the Calico driver gets told about security group<br>
    # updates at all times. This is a deeply unpleasant hack. Please, do as I say,<br>
    # not as I do.<br>
    #<br>
    # For more info, please see issues #635 and #641.<br>
    original_sgr_updated = rpc.AgentNotifierApi.security_groups_rule_updated<br>
<br>
<br>
    def security_groups_rule_updated(self, context, sgids):<br>
        LOG.info("security_groups_rule_updated: %s %s" % (context, sgids))<br>
        mech_driver.send_sg_updates(sgids, context)<br>
        original_sgr_updated(self, context, sgids)<br>
<br>
<br>
    rpc.AgentNotifierApi.security_groups_rule_updated = (<br>
        security_groups_rule_updated<br>
    )<br>
<br>
But, as the comment says, this is a hack.  Is there a better way?<br>
<br>
Many thanks,<br>
        Neil<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Best Regards ,<br><br>The G. </div>
</div>