Skip to content
Snippets Groups Projects
Commit 2db51071 authored by Erik Reid's avatar Erik Reid
Browse files

added hostname to some relevant task status strings

parent 0545fbf9
No related branches found
No related tags found
No related merge requests found
......@@ -471,7 +471,7 @@ def reload_router_config(self, hostname):
state=states.STARTED,
meta={
'hostname': hostname,
'message': 'loading router netconf data'
'message': f'loading netconf data for {hostname}'
})
# get the timestamp for the current netconf data
......@@ -495,8 +495,9 @@ def reload_router_config(self, hostname):
assert new_netconf_timestamp, \
'no timestamp available for new netconf data'
if new_netconf_timestamp == current_netconf_timestamp:
logger.debug('no netconf change timestamp change, aborting')
return self.success(f'no change (timestamp not updated)')
msg = f'no timestamp change for {hostname} netconf data'
logger.debug(msg)
return self.success(msg)
# clear cached classifier responses for this router, and
# refresh peering data
......@@ -504,7 +505,7 @@ def reload_router_config(self, hostname):
state=states.STARTED,
meta={
'hostname': hostname,
'message': 'refreshing peers & clearing cache'
'message': f'refreshing peers & clearing cache for {hostname}'
})
refresh_ix_public_peers(hostname, netconf_doc)
refresh_vpn_rr_peers(hostname, netconf_doc)
......@@ -516,19 +517,20 @@ def reload_router_config(self, hostname):
community = juniper.snmp_community_string(netconf_doc)
if not community:
raise InventoryTaskError(
'error extracting community string for %r' % hostname)
f'error extracting community string for {hostname}')
else:
self.update_state(
state=states.STARTED,
meta={
'hostname': hostname,
'message': 'refreshing snmp interface indexes'
'message': f'refreshing snmp interface indexes for {hostname}'
})
# load snmp data, in this thread
snmp_refresh_interfaces.apply(args=[hostname, community])
clear_cached_classifier_responses(None)
return self.success(f'updated config for {hostname}')
return self.success(f'updated configuration for {hostname}')
def _erase_next_db(config):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment