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…
With the appropriate credentials, SSH into your DevStack setup.
Open
/opt/stack/neutron/neutron/plugins/ml2/drivers/ ch10_ml2_mech_driver.py
using an editor.Add a new import statement, as highlighted in the following screenshot:
Update the class declaration statement, as follows:
CookbookMechanismDriver
now extends...