Ask Your Question
0

How to write l3-Plugin?

asked 2013-06-28 16:10:43 -0600

cse-patilsachin gravatar image

Hi All,

I have gone through lot of docs about quantum plugin and did not get clear idea about the plugin. I want to extend routing functionality by adding virtual router to openstack. What is the best way to do this?

I am confused between l2 and l3 plugin. Also want to understand what l3-agent and plugin-agent does.

If the plugin(that I need to write) just implements l3 functionlity, then who is going to provide l2 functionlity? Would there be other plugin that will do the l2 job like OpenViewSwitch? If yes, is there way to run/configure two plugins simultaneously. If no, then do I need to implement all the l2 and l3 functionality in my plugin and how can I implement it?

Please guide me!

Thanks in advance, Sachin.

edit retag flag offensive close merge delete

6 answers

Sort by » oldest newest most voted
0

answered 2013-07-10 00:11:28 -0600

Hi

I have been following this question as I am keen on replacing the builtin virtual router functionality with an external solution using F5 Big-IP hardware.

Because I am not technically adding any functionality over and above what is already available with the virtual routers or floating IP's etc, the easiest way I see until Havana is released anyway is just rewriting the L3_agent functions to modify the F5 instead of iptables etc? I am assuming that is how it hangs together? F5 have a python module which makes it seem all relatively straightforward.

I would have to add some functionality to the agent to handle IP addressing for the hardware devices and using Route-Domain in place of namespaces, and remove the metadata-agent dependancy.

Thanks Allister

edit flag offensive delete link more
0

answered 2013-07-03 02:17:17 -0600

In coming future,

1) Migrate L3 router service from mixin to plugin. (Note: this gives enough overview on what you are trying to achive) https://blueprints.launchpad.net/neutron/+spec/quantum-l3-routing-plugin (https://blueprints.launchpad.net/neut...) MUST READ DOCUMENT - https://wiki.openstack.org/wiki/L3_mixin_to_plugin (https://wiki.openstack.org/wiki/L3_mi...)

2) To achieve above requirement, this blueprint is found which says "API framework for loading multiple service plugin". This is an Advanced service framework as part of Quantum. Advanced services framework should allow implementation of additional services to be independent and decoupled from core plugins. https://blueprints.launchpad.net/neutron/+spec/quantum-service-framework (https://blueprints.launchpad.net/neut...) This means, separate independent of L2, routing , Firewall, LbaaS plugin can also be developed separately in future and can be integrated. There will be service_plugins option in quantum.conf to load different plugins instead of today having single option core_plugin in quantum.conf. MUST READ DOCUMENT - https://wiki.openstack.org/wiki/Quantum/ServiceIntegration (https://wiki.openstack.org/wiki/Quant...)

3) Openvswitch plugin has to be modified so that it does not provide L3 functionality. The L3 plugin is specified by the ‘service_plugins’ setting in ‘quantum.conf’ and the l3 agent is configured in the usual way in the ‘l3agent.ini’ file.

Excerpt from quantum.conf:

core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2 service_plugins = quantum.plugins.services.l3_router.l3_router_plugin.L3RouterPlugin

Additional info http://lists.openstack.org/pipermail/openstack-dev/2012-November/002582.html (http://lists.openstack.org/pipermail/...)

edit flag offensive delete link more
0

answered 2013-07-01 06:41:42 -0600

cse-patilsachin gravatar image

Hi Yong,

Thanks you very much for the reply again.

I will study the l3_agent functionality as well as OVSQuantumPluginV2.

If you can point me to some good docs, it will be very helpful for me.

edit flag offensive delete link more
0

answered 2013-06-30 00:40:36 -0600

gongysh gravatar image
  1. you can implement an agent like l3_agent to communicate with neutron server and your third party virtual router / appliance or,
  2. you can write a plugin simulating the OVSQuantumPluginV2 to control your third party virtual router / appliance
edit flag offensive delete link more
0

answered 2013-06-29 16:29:19 -0600

cse-patilsachin gravatar image

Hi yong,

Thank you for the reply.

I want to integrate third party virtual router / appliance with openstack neutron.

Please tell me how I can do this.

Thank You, Sachin.

edit flag offensive delete link more
0

answered 2013-06-28 23:29:07 -0600

gongysh gravatar image

We have already a virtual router in neutron. following are the commands of neutron client: router-create router-interface-add router-port-list router-delete router-interface-delete router-show router-gateway-clear router-list router-update router-gateway-set router-list-on-l3-agent

and please have a look at https://github.com/openstack/quantum/blob/master/quantum/plugins/openvswitch/ovs_quantum_plugin.py (https://github.com/openstack/quantum/...)

in which, we have: class OVSQuantumPluginV2(db_base_plugin_v2.QuantumDbPluginV2, extraroute_db.ExtraRoute_db_mixin, l3_gwmode_db.L3_NAT_db_mixin, sg_db_rpc.SecurityGroupServerRpcMixin, agentschedulers_db.AgentSchedulerDbMixin, portbindings_db.PortBindingMixin):

l3_gwmode_db.L3_NAT_db_mixin is our virtual router.

in addition please see our admin guide

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-06-28 16:10:43 -0600

Seen: 95 times

Last updated: Jul 10 '13