Add methods for network segment range support

This patch introduces the ML2 type driver abstract methods
``initialize_network_segment_range_support`` and
``update_network_segment_range_allocations`` for the network segment
range support when the extension is loaded.

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

Depends-on: https://review.openstack.org/624709
Partially-implements: blueprint network-segment-range-management
Change-Id: I825624b89530e13c326bffeb80fdd49f712a2399
This commit is contained in:
Kailun Qin 2019-02-15 09:55:43 +08:00
parent 4cb9ccef4d
commit 9dfe2e14d0
2 changed files with 27 additions and 0 deletions

View File

@ -652,6 +652,26 @@ class ML2TypeDriver(_TypeDriverBase):
"""
pass
@abc.abstractmethod
def initialize_network_segment_range_support(self):
"""Perform driver network segment range initialization.
Called during the initialization of the ``network-segment-range``
service plugin if enabled, after all drivers have been loaded and the
database has been initialized. This reloads the `default`
network segment ranges when Neutron server starts/restarts.
"""
pass
@abc.abstractmethod
def update_network_segment_range_allocations(self):
"""Update driver network segment range allocations.
This syncs the driver segment allocations when network segment ranges
have been created, updated or deleted.
"""
pass
@six.add_metaclass(abc.ABCMeta)
class NetworkContext(object):

View File

@ -0,0 +1,7 @@
---
features:
- |
Introduce the ML2 type driver abstract methods
``initialize_network_segment_range_support`` and
``update_network_segment_range_allocations``
for the network segment range support when the extension is loaded.