Is this a right way to change l3 plugin?

asked 2016-08-09 05:57:49 -0500

kramer gravatar image


My openstack is mitaka. L3 plugin is

When connecting a subnet with a router, I want to get the mapping relationship for (router_id: subnet). I want to get the information from L3 plugin. So I did some change in the code.

I added a method in like below:

def add_router_interface(self, context, router_id, interface_info):
    router_interface_info = super(L3RouterPlugin, self).add_router_interface(context, router_id, interface_info)
    self.notify_router_interface_action(context, router_interface_info, 'add')

    # todo : to get the mapping relationship.
    return router_interface_info

I do not know if this is the right way to do this thing. Please give some advice

edit retag flag offensive close merge delete