diff --git a/neutron_lib/plugins/ml2/api.py b/neutron_lib/plugins/ml2/api.py index 1597aa68e..c6883c901 100644 --- a/neutron_lib/plugins/ml2/api.py +++ b/neutron_lib/plugins/ml2/api.py @@ -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): diff --git a/releasenotes/notes/mechanismdriver-connectivity-00dc679a3f307345.yaml b/releasenotes/notes/mechanismdriver-connectivity-00dc679a3f307345.yaml new file mode 100644 index 000000000..466004bd3 --- /dev/null +++ b/releasenotes/notes/mechanismdriver-connectivity-00dc679a3f307345.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Add ``connectivity`` property to ``MechanismDriver``. For more information, + see + [`Boot a VM with an unaddressed port `_].