We will conclude this chapter with a recipe that shows you how to process API requests for a Port. In real-world applications, the Port-related operations are used more frequently when compared to a Network or Subnet. As there are different types of Ports, this recipe will show you how to identify the Port type from the API requests.
Ensure that your DevStack setup is up and running, with
cookbook as one of the mechanism drivers, as shown in the earlier recipe.
/opt/stack/neutron/neutron/plugins/ml2/drivers/ ch10_ml2_mech_driver.pyusing an editor.