Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
dashboardv3
inventory-provider
Commits
2db51071
Commit
2db51071
authored
4 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
added hostname to some relevant task status strings
parent
0545fbf9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inventory_provider/tasks/worker.py
+9
-7
9 additions, 7 deletions
inventory_provider/tasks/worker.py
with
9 additions
and
7 deletions
inventory_provider/tasks/worker.py
+
9
−
7
View file @
2db51071
...
...
@@ -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 config
uration
for
{
hostname
}
'
)
def
_erase_next_db
(
config
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment