Add "connectivity" property to "MechanismDriver"

This property will return the type of the driver: "l2", "l3" or
"legacy".

bp boot-vm-with-unaddressed-port
Related-Bug: #1959125
Related-Bug: #1821058

Change-Id: I5730c68e4e860028efa0541b0098c439c14524d7
This commit is contained in:
Rodolfo Alonso Hernandez 2022-01-26 17:23:54 +00:00
parent 725aac3ed6
commit c2166f9af6
2 changed files with 18 additions and 0 deletions

View File

@ -14,6 +14,8 @@
import abc
from neutron_lib.api.definitions import portbindings
# The following keys are used in the segment dictionaries passed via
# the driver API.
@ -469,6 +471,16 @@ class MechanismDriver(object, metaclass=abc.ABCMeta):
"""
return extensions
@property
def connectivity(self):
"""Return the mechanism driver connectivity type
The possible values are "l2", "l3" and "legacy" (default).
:returns: a string in ("l2", "l3", "legacy")
"""
return portbindings.CONNECTIVITY_LEGACY
class _TypeDriverBase(object, metaclass=abc.ABCMeta):

View File

@ -0,0 +1,6 @@
---
features:
- |
Add ``connectivity`` property to ``MechanismDriver``. For more information,
see
[`Boot a VM with an unaddressed port <https://blueprints.launchpad.net/nova/+spec/boot-vm-with-unaddressed-port>`_].