Browse Source

Merge "Remove MEMOIZE from get_pod_ip"

tags/2.0.0.0rc1
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
27954f3f47
1 changed files with 0 additions and 16 deletions
  1. +0
    -16
      kuryr_kubernetes/controller/drivers/utils.py

+ 0
- 16
kuryr_kubernetes/controller/drivers/utils.py View File

@@ -16,7 +16,6 @@
import urllib

from openstack import exceptions as os_exc
from oslo_cache import core as cache
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
@@ -34,20 +33,6 @@ LOG = log.getLogger(__name__)

CONF = cfg.CONF

pod_ip_caching_opts = [
cfg.BoolOpt('caching', default=True),
cfg.IntOpt('cache_time', default=3600),
]

CONF.register_opts(pod_ip_caching_opts, "pod_ip_caching")

cache.configure(CONF)
pod_ip_cache_region = cache.create_region()
MEMOIZE = cache.get_memoization_decorator(
CONF, pod_ip_cache_region, "pod_ip_caching")

cache.configure_cache_region(CONF, pod_ip_cache_region)


def get_network_id(subnets):
ids = list(set(net.id for net in subnets.values()))
@@ -275,7 +260,6 @@ def create_security_group_rule_body(
return security_group_rule_body


@MEMOIZE
def get_pod_ip(pod):
try:
pod_metadata = pod['metadata']['annotations']


Loading…
Cancel
Save