Don't emit a notification for the root domain
This change stops keystone from emitting a notification when the resource is the root domain <<keystone.domain.root>>. Currently nothing should be invoking the root domain as an initiator outside of tests, once the root domain is properly exposed this can be removed. Change-Id: Ic8bfd57a7e6e44342cf3748a6be3824de5aed1a0
This commit is contained in:
parent
b7c8738822
commit
5d1a97394d
|
@ -74,6 +74,7 @@ _SUBSCRIBERS = {}
|
|||
_notifier = None
|
||||
SERVICE = 'identity'
|
||||
|
||||
ROOT_DOMAIN = '<<keystone.domain.root>>'
|
||||
|
||||
CONF = keystone.conf.CONF
|
||||
|
||||
|
@ -420,6 +421,13 @@ def _create_cadf_payload(operation, resource_type, resource_id,
|
|||
target_uri = taxonomy.UNKNOWN
|
||||
else:
|
||||
target_uri = CADF_TYPE_MAP.get(resource_type)
|
||||
|
||||
# TODO(gagehugo): The root domain ID is typically hidden, there isn't a
|
||||
# reason to emit a notification for it. Once we expose the root domain
|
||||
# (and handle the CADF UUID), remove this.
|
||||
if resource_id == ROOT_DOMAIN:
|
||||
return
|
||||
|
||||
target = resource.Resource(typeURI=target_uri,
|
||||
id=resource_id)
|
||||
|
||||
|
|
Loading…
Reference in New Issue