Merge "Revert "Add network parameter to some of the ML2 API methods""

This commit is contained in:
Zuul 2021-06-10 15:15:00 +00:00 committed by Gerrit Code Review
commit c2879ec173
2 changed files with 7 additions and 21 deletions

View File

@ -516,15 +516,13 @@ class _TypeDriverBase(object, metaclass=abc.ABCMeta):
"""
@abc.abstractmethod
def get_mtu(self, physical, network=None):
def get_mtu(self, physical):
"""Get driver's network MTU.
:param physical: name of the physical network
:param network: network parameters dictionary
:returns: mtu maximum transmission unit
Returns the mtu for the network based on the config values,
the network type and the network attributes.
Returns the mtu for the network based on the config values and
the network type.
"""
@ -552,14 +550,12 @@ class TypeDriver(_TypeDriverBase, metaclass=abc.ABCMeta):
"""
@abc.abstractmethod
def reserve_provider_segment(self, session, segment, filters=None,
network=None):
def reserve_provider_segment(self, session, segment, filters=None):
"""Reserve resource associated with a provider network segment.
:param session: database session
:param segment: segment dictionary
:param filters: a dictionary that is used as search criteria
:param network: network parameters dictionary
:returns: segment dictionary
Called inside transaction context on session to reserve the
@ -569,12 +565,11 @@ class TypeDriver(_TypeDriverBase, metaclass=abc.ABCMeta):
"""
@abc.abstractmethod
def allocate_tenant_segment(self, session, filters=None, network=None):
def allocate_tenant_segment(self, session, filters=None):
"""Allocate resource for a new tenant network segment.
:param session: database session
:param filters: a dictionary that is used as search criteria
:param network: network parameters dictionary
:returns: segment dictionary using keys defined above
Called inside transaction context on session to allocate a new
@ -623,14 +618,12 @@ class ML2TypeDriver(_TypeDriverBase, metaclass=abc.ABCMeta):
"""
@abc.abstractmethod
def reserve_provider_segment(self, context, segment, filters=None,
network=None):
def reserve_provider_segment(self, context, segment, filters=None):
"""Reserve resource associated with a provider network segment.
:param context: instance of neutron context with DB session
:param segment: segment dictionary
:param filters: a dictionary that is used as search criteria
:param network: network parameters dictionary
:returns: segment dictionary
Called inside transaction context on session to reserve the
@ -640,12 +633,11 @@ class ML2TypeDriver(_TypeDriverBase, metaclass=abc.ABCMeta):
"""
@abc.abstractmethod
def allocate_tenant_segment(self, context, filters=None, network=None):
def allocate_tenant_segment(self, context, filters=None):
"""Allocate resource for a new tenant network segment.
:param context: instance of neutron context with DB session
:param filters: a dictionary that is used as search criteria
:param network: network parameters dictionary
:returns: segment dictionary using keys defined above
Called inside transaction context on session to allocate a new

View File

@ -1,6 +0,0 @@
---
other:
- |
Methods ``get_mtu``, ``reserve_provider_segment`` and
``allocate_tenant_segment`` from the base ML2 TypeDriver class
now accepts dictionary with network parameters as an argument.