[openstack-dev] [Neutron] How to write extension

Sławek Kapłoński slawek at kaplonski.pl
Wed Oct 8 18:04:50 UTC 2014


Hello,

Thanks for link to blueprint Mathieu but I'm using now still Havana version of 
openstack.
I need extension which allow me add to private network something like 
"external router" that ovs agent will know that should make vxlan or gre 
tunnel to that external device. Maybe there is some solution which allow me to 
do something like that? :)
@Damon: I read those articles before You send me it but something is wrong for 
me (or I don't understand it). I'm trying to do almost exactly what was 
described on http://control-that-vm.blogspot.com/2014/05/writing-api-extensions-in-neutron.html - I made my file with extension in 
neutron/extensions/my_ext.py and I add name of this extension to ml2 
"supported_extension_aliases". When I now do "neutron ext-list" then I see my 
extension on list but when I send request with curl I have 404 error or error 
500 and in neutron-server logs there is info that ML2 plugin has no method 
"xxx". 
So I don't know, should I add methods added by my plugin to ML2 plugin? Or 
should I add by plugin class to classes from which ml2 inherits?

---
Best regards
Sławek Kapłoński
slawek at kaplonski.pl

Dnia środa 08 październik 2014 14:14:56 Mathieu Rohon pisze:
> Hi,
> 
> please tell us about the extension you want to write, it would really help.
> In ML2, you now have the ability to easily add extensions thanks to this
> work :
> 
> https://blueprints.launchpad.net/neutron/+spec/extensions-in-ml2
> 
> Mathieu
> 
> On Wed, Oct 8, 2014 at 7:52 AM, Damon Wang <damon.devops at gmail.com> wrote:
> > Hi Kapłoński,
> > 
> > I recommend you to read these materials:
> > 
> > Keynotes:
> > https://www.openstack.org/assets/presentation-media/insideneutron2.pdf
> > Video:
> > https://www.openstack.org/summit/openstack-summit-hong-kong-2013/session-v
> > ideos/presentation/deep-dive-into-neutron Post:
> > http://control-that-vm.blogspot.com/2014/05/writing-api-extensions-in-neut
> > ron.html
> > 
> > Regards,
> > Wang Wei
> > 
> > 2014-10-08 3:29 GMT+08:00 Sławek Kapłoński <slawek at kaplonski.pl>:
> >> Hello,
> >> 
> >> Can You send me some examples or link to tutorial how to write extension
> >> to
> >> neutron. I'm using ML2 plugin in neutron and I want to add some new
> >> functionality and API methods to this neutron. So imho I should do it via
> >> extension but how exactly write it that it will work in existing ML2
> >> plugin?
> >> 
> >> ---
> >> Best regards
> >> Sławek Kapłoński
> >> slawek at kaplonski.pl
> >> _______________________________________________
> >> OpenStack-dev mailing list
> >> OpenStack-dev at lists.openstack.org
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> > 
> > _______________________________________________
> > OpenStack-dev mailing list
> > OpenStack-dev at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141008/179c0cff/attachment.pgp>


More information about the OpenStack-dev mailing list