From 09c897f61c2ca61c1904f6d2092f7c64a5732fa1 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 30 Jan 2024 19:50:38 +0900 Subject: [PATCH] Remove unused cache_key_mangler ... so that we can remove usage of md5, which is not FIPs compliant. Change-Id: I1e10e028ff716ba5ba72997b72750d3c7876d66d --- ceilometer/cache_utils.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/ceilometer/cache_utils.py b/ceilometer/cache_utils.py index f7d2adad03..cbfe9c9621 100644 --- a/ceilometer/cache_utils.py +++ b/ceilometer/cache_utils.py @@ -14,23 +14,16 @@ # under the License. """Simple wrapper for oslo_cache.""" -import uuid - -from ceilometer import keystone_client from keystoneauth1 import exceptions as ka_exceptions from oslo_cache import core as cache from oslo_cache import exception from oslo_log import log -from oslo_utils.secretutils import md5 + +from ceilometer import keystone_client # Default cache expiration period CACHE_DURATION = 600 -NAME_ENCODED = __name__.encode('utf-8') -CACHE_NAMESPACE = uuid.UUID( - bytes=md5(NAME_ENCODED, usedforsecurity=False).digest() -) - LOG = log.getLogger(__name__) @@ -101,9 +94,3 @@ def get_cache_region(conf): except exception.ConfigurationError as e: LOG.error("failed to configure oslo_cache: %s", str(e)) - - -def cache_key_mangler(key): - """Construct an opaque cache key.""" - - return uuid.uuid5(CACHE_NAMESPACE, key).hex