Ask Your Question

Running extensions for vendor specific mechanism drivers in ML2

asked 2014-08-04 05:40:15 -0500


I have a few extensions on my custom monolithic plugin on neutron that I would like to port to work with ML2 when I migrate my plugin to ML2 as a mechanism driver. I understand that Neutron does not currently support extensions for ML2 mechanism drivers ( ), but I would like to know if there are any workarounds possible at the moment.

Thanks in advance for your help!


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-12 04:02:07 -0500

Hey Mithil,

One approach that quickly comes in my head for achieving what you are asking could be by having your plugin which inherits from Ml2Plugin class in neutron.plugins.ml2.plugin. Following is how your class would look:

class MyPlugin(Ml2Plugin):
    def create_foxinsock(self, context, foxinsocks):
        # you have foxinsock containing all your extensions attribute
    [.. rest of the code ..]

Use this class as your core_plugin in /etc/neutron/neutron.conf.

With this, all (create/delete/update/get)_(network/subnet/port) operations would be taken care in Ml2Plugin class. All other extension methods will be handled here. Remember that you should append your extension aliases with that provided in class Ml2Plugin under supported_extension_aliases to load all extensions supported by ML2 as well as by your plugin.

Hope this helps.


edit flag offensive delete link more


Thanks for your answer. This is an interesting approach!

I'm wondering if there could be any unintended side effects though. ML2 does not really know about the existence of these extensions, does it? Let me know your thoughts.

mithilarun gravatar imagemithilarun ( 2014-08-12 09:38:49 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-08-04 05:40:15 -0500

Seen: 291 times

Last updated: Aug 12 '14