Merge "Mechanism driver API: resource_provider_uuid5_namespace"

This commit is contained in:
Zuul 2018-08-23 10:07:53 +00:00 committed by Gerrit Code Review
commit 7a7ef66564
2 changed files with 26 additions and 0 deletions

View File

@ -55,6 +55,19 @@ class MechanismDriver(object):
methods that are part of the database transaction.
"""
# Used in generating resource provider UUIDs for physical network
# interfaces. Each mechanism driver supporting Placement should have its
# own UUID v5 namespace (which is a UUID v1 in turn). When set to a
# concrete value use a uuid.UUID() object, not the string format.
# It will be used when hashing RP UUIDs from:
# (mech driver namespace, hostname, physical bridge/interface name)
# When needed generate new namespace UUIDs by:
# python -c 'import uuid ; print uuid.uuid1()'
# See also:
# https://tools.ietf.org/html/rfc4122
# https://stackoverflow.com/a/7816117
resource_provider_uuid5_namespace = None
@abc.abstractmethod
def initialize(self):
"""Perform driver initialization.

View File

@ -0,0 +1,13 @@
---
features:
- |
New MechanismDriver API class property:
``resource_provider_uuid5_namespace``. Mechanism drivers wanting
to support resource provider information reporting to Placement
(eg. reporting resource providers to guarantee some minimum bandwidth
allocated on them later) must set this class property to a UUID
object unique to that mechanism driver. It will be used as a UUID
v5 namespace in generating UUIDs for resource providers. The default
implementation sets it to ``None``, meaning that the mechanism driver
does not support resource provider information reporting to Placement.
Unaffected drivers need not be changed.