Skip to content
Snippets Groups Projects
Commit 3401bd4f authored by Robert Latta's avatar Robert Latta
Browse files

added lab parameter to nokia interface refresh function. RE DBOARD3-894

parent 6e4a8876
No related branches found
No related tags found
No related merge requests found
......@@ -597,7 +597,7 @@ def reload_router_config_nokia(self, hostname, lab=False):
try:
netconf_doc = _reload_router_config_nokia(
hostname, lab, self.log_info, self.log_warning)
refresh_nokia_interface_list(hostname, netconf_doc)
refresh_nokia_interface_list(hostname, netconf_doc, lab)
except Exception as e:
errmsg = f'unhandled exception loading {hostname} info: {e}'
logger.exception(errmsg)
......@@ -651,9 +651,9 @@ def retrieve_and_persist_netconf_config_nokia(
return netconf_str
def refresh_nokia_interface_list(hostname, netconf):
def refresh_nokia_interface_list(hostname, netconf, lab=False):
r = get_next_redis(InventoryTask.config).pipeline()
_refresh_nokia_interface_list(hostname, netconf, r)
_refresh_nokia_interface_list(hostname, netconf, r, lab)
def _refresh_nokia_interface_list(hostname, netconf, redis, lab=False):
......@@ -667,8 +667,7 @@ def _refresh_nokia_interface_list(hostname, netconf, redis, lab=False):
logger.debug(f'removing cached netconf-interfaces for {hostname}')
rp = redis.pipeline()
rp.delete(interfaces_all_key)
for k in redis.scan_iter(
f'{bundles_keybase}:*', count=1000):
for k in redis.scan_iter(f'{bundles_keybase}:*', count=1000):
rp.delete(k)
rp.execute()
rp = redis.pipeline()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment