O'Reilly logo

OpenStack Networking Cookbook by Chandan Dutta Chowdhury, Sriram Subramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a basic ML2 mechanism driver

The first step in the journey to write an ML2 mechanism driver is to create a basic driver class. This will also help us understand the code structure.

Getting ready

As mentioned earlier, we will use DevStack in order to write and test our plugin. So, ensure that the DevStack environment is up and running successfully.

How to do it…

  1. With the appropriate credentials, SSH into your DevStack setup.
  2. Ensure that all the driver files from the GitHub repository are copied to /opt/stack/neutron/neutron/plugins/ml2/drivers.
  3. The ch10_ml2_mech_driver.py file will be our main mechanism driver file, as follows:
    How to do it…
  4. The CookbookMechanismDriver ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required