[openstack-dev] How to implement and configure a new Neutron vpnaas driver from scratch?

Bo Lin linb at vmware.com
Tue Feb 18 08:18:04 UTC 2014


I wonder whether your neutron server codes have added the " VPNaaS integration with service type framework " change on https://review.openstack.org/#/c/41827/21 , if not, the service_provider option is useless. You need to include the change before developing your own driver. 

QA (In my opinion and sth may be missing): 
- What is the difference between service drivers and device drivers? 
service drivers are driven by vpn service plugin and are responsible for casting rpc request (CRUD of vpnservices) to and do callbacks from vpn agent. 
device drivers are driven by vpn agent and are responsible for implementing specific vpn operations and report vpn running status. 

- Could I implement only one of them? 
device driver must be implemented based on your own device. Unless the default ipsec service driver is definitely appropriate, suggest you implement both of them. After including "VPNaaS integration with service type framework", the service driver work is simple. 

- Whe re I need to put my Python implementation in my OpenStack instance? 
Do you mean let your instance runs your new codes? The default source codes dir is /opt/stack/neutron, you need to put your new changes into the dir and restart the neutron server. 

- How could I configure my OpenStack instance to use this implementation? 
1. Add your new codes into source dir 
2. Add appropriate vpnaas service_provider into neutron.conf and add appropriate "vpn_device_driver" option into vpn_agent.ini 
3. restart n-svc and q-vpn 

Hope help you. 

----- Original Message -----

From: "Julio Carlos Barrera Juez" <juliocarlos.barrera at i2cat.net> 
To: "OpenStack Development Mailing List" <openstack-dev at lists.openstack.org> 
Sent: Monday, February 17, 2014 7:18:44 PM 
Subject: [openstack-dev] How to implement and configure a new Neutron vpnaas driver from scratch? 

Hi. 

I have asked in the Q&A website without success ( https://ask.openstack.org/en/question/12072/how-to-implement-and-configure-a-new-vpnaas-driver-from-scratch/ ). 

I want to develop a vpnaas implementation. It seems that since Havana, there are plugins, services and device implementations. I like the plugin and his current API, then I don't need to reimplement it. Now I want yo implement a vpnaas driver, and I see I have two main parts to take into account: the service_drivers and the device_drivers. IPsec/OpenSwan implementation is the unique sample I've found. 

I'm using devstack to test my experiments. 

I tried to implement VpnDriver Python class extending the main API methods like IPsecVPNDriver does. I placed basic implementation files at the same level of IPsec/OpenSwan does and configured Neutron adding this line to /etc/neutron/neutron.conf file: 

service_provider = VPN:VPNaaS:neutron.services.vpn.service_drivers.our_python_filename.OurClassName:default 

I restarted Neutron related services in my devstack instance, but it seemed it didn't work. 



- What is the difference between service drivers and device drivers? 
- Could I implement only one of them? 
- Whe re I need to put my Python implementation in my OpenStack instance? 
- How could I configure my OpenStack instance to use this implementation? 



I didn't find almost any documentation about these topics. 

Thank you very much. 

_______________________________________________ 
OpenStack-dev mailing list 
OpenStack-dev at lists.openstack.org 
https://urldefense.proofpoint.com/v1/url?u=http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=F5etm0B6kVJ9jleIhCvNyA%3D%3D%0A&m=9uhm%2F59JRfiZ3CXzuhBOpqcTqWk8APswRGJFZ8H2Tos%3D%0A&s=46fe06049efb1d29a85b63f7ce101cd69695a368c3da6ea3a91bcd7d2b71ce59 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140218/d5fc6021/attachment.html>


More information about the OpenStack-dev mailing list