Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenStack Networking Cookbook

You're reading from   OpenStack Networking Cookbook Harness the power of OpenStack Networking for public and private clouds using 90 hands-on recipes

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785286100
Length 282 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Sriram Subramanian Sriram Subramanian
Author Profile Icon Sriram Subramanian
Sriram Subramanian
Chandan Dutta Chandan Dutta
Author Profile Icon Chandan Dutta
Chandan Dutta
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Getting Started with OpenStack Networking FREE CHAPTER 2. Using Open vSwitch for VLAN-Based Networks 3. Exploring Other Network Types in Neutron 4. Exploring Overlay Networks with Neutron 5. Managing IP Addresses in Neutron 6. Using Routing Services in Neutron 7. Using Neutron Security and Firewall Services 8. Using HAProxy for Load Balancing 9. Monitoring OpenStack Networks 10. Writing Your Own Neutron ML2 Mechanism Driver 11. Troubleshooting Tips for Neutron 12. Advanced Topics Index

Processing API requests for a Network


Vendors and third-party application developers write custom ML2 mechanism drivers in order to integrate their products and applications with OpenStack. The main aspect of writing mechanism drivers is the implementation of specific methods related to the Network, Subnet, and Port. In this recipe, we will see how to process API requests specifically for a Network.

Getting ready

In this recipe, we will enhance our basic mechanism driver code and add two new methods in order to process API requests for a Network. Ensure that your DevStack setup is up and running, with cookbook as one of the mechanism drivers, as shown in the previous recipe.

How to do it…

  1. With the appropriate credentials, SSH into your DevStack setup.

  2. Open /opt/stack/neutron/neutron/plugins/ml2/drivers/ ch10_ml2_mech_driver.py using an editor.

  3. Add a new import statement, as highlighted in the following screenshot:

  4. Update the class declaration statement, as follows:

  5. CookbookMechanismDriver now extends...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime