Cool, thank you!

On 29/06/15 14:08, Gal Sagie wrote:
Yes, look at this patch: https://review.openstack.org/#/c/174588/


On Mon, Jun 29, 2015 at 3:42 PM, Neil Jerram <neil.jer...@metaswitch.com
<mailto:neil.jer...@metaswitch.com>> wrote:

    Hi there,

    For my team's networking backend, we want to catch security group
    updates in our ML2 mechanism driver code.

    Currently we're doing this by monkey patching the AgentNotifierApi:

         # This section monkeypatches the
    AgentNotifierApi.security_groups_rule_updated
         # method to ensure that the Calico driver gets told about
    security group
         # updates at all times. This is a deeply unpleasant hack.
    Please, do as I say,
         # not as I do.
         #
         # For more info, please see issues #635 and #641.
         original_sgr_updated =
    rpc.AgentNotifierApi.security_groups_rule_updated


         def security_groups_rule_updated(self, context, sgids):
             LOG.info("security_groups_rule_updated: %s %s" % (context,
    sgids))
             mech_driver.send_sg_updates(sgids, context)
             original_sgr_updated(self, context, sgids)


         rpc.AgentNotifierApi.security_groups_rule_updated = (
             security_groups_rule_updated
         )

    But, as the comment says, this is a hack.  Is there a better way?

    Many thanks,
             Neil

    __________________________________________________________________________
    OpenStack Development Mailing List (not for usage questions)
    Unsubscribe:
    openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
    <http://openstack-dev-requ...@lists.openstack.org?subject:unsubscribe>
    http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




--
Best Regards ,

The G.


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to