Merge "Fix batching for floating ips and ports"
This commit is contained in:
commit
3b3cc08d01
|
@ -1764,9 +1764,11 @@ class OpenStackCloud(
|
||||||
:returns: A list of port ``munch.Munch``.
|
:returns: A list of port ``munch.Munch``.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# If pushdown filters are specified, bypass local caching.
|
# If pushdown filters are specified and we do not have batched caching
|
||||||
if filters:
|
# enabled, bypass local caching and push down the filters.
|
||||||
|
if filters and self._PORT_AGE == 0:
|
||||||
return self._list_ports(filters)
|
return self._list_ports(filters)
|
||||||
|
|
||||||
# Translate None from search interface to empty {} for kwargs below
|
# Translate None from search interface to empty {} for kwargs below
|
||||||
filters = {}
|
filters = {}
|
||||||
if (time.time() - self._ports_time) >= self._PORT_AGE:
|
if (time.time() - self._ports_time) >= self._PORT_AGE:
|
||||||
|
@ -2364,8 +2366,9 @@ class OpenStackCloud(
|
||||||
:returns: A list of floating IP ``munch.Munch``.
|
:returns: A list of floating IP ``munch.Munch``.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# If pushdown filters are specified, bypass local caching.
|
# If pushdown filters are specified and we do not have batched caching
|
||||||
if filters:
|
# enabled, bypass local caching and push down the filters.
|
||||||
|
if filters and self._FLOAT_AGE == 0:
|
||||||
return self._list_floating_ips(filters)
|
return self._list_floating_ips(filters)
|
||||||
|
|
||||||
if (time.time() - self._floating_ips_time) >= self._FLOAT_AGE:
|
if (time.time() - self._floating_ips_time) >= self._FLOAT_AGE:
|
||||||
|
|
Loading…
Reference in New Issue