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
e0f80f03
Commit
e0f80f03
authored
1 year ago
by
Robert Latta
Browse files
Options
Downloads
Patches
Plain Diff
separated task call from implementation. RE. DBOARD3-898
parent
3bd26897
No related branches found
Branches containing commit
Tags
0.108
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
+23
-0
23 additions, 0 deletions
inventory_provider/tasks/worker.py
with
23 additions
and
0 deletions
inventory_provider/tasks/worker.py
+
23
−
0
View file @
e0f80f03
...
...
@@ -568,7 +568,12 @@ def retrieve_and_persist_neteng_managed_device_list(
@log_task_entry_and_exit
def
reload_router_config_try_all
(
self
,
hostname
,
lab
=
False
):
try
:
<<<<<<<
Updated
upstream
reload_router_config_nokia
(
hostname
,
lab
)
=======
_reload_router_config_nokia
(
hostname
,
lab
,
self
.
log_info
,
self
.
log_warning
)
>>>>>>>
Stashed
changes
except
Exception
as
e1
:
self
.
log_warning
(
f
'
error loading
{
hostname
}
info:
{
e1
}
- trying juniper
'
)
...
...
@@ -591,12 +596,17 @@ def reload_router_config_try_all(self, hostname, lab=False):
@log_task_entry_and_exit
def
reload_router_config_nokia
(
self
,
hostname
,
lab
=
False
):
try
:
<<<<<<<
Updated
upstream
self
.
log_info
(
f
'
loading netconf data for
{
"
lab
"
if
lab
else
""
}
{
hostname
}
'
)
netconf_config
=
retrieve_and_persist_netconf_config_nokia
(
hostname
,
lab
,
self
.
log_warning
)
r
=
get_next_redis
(
InventoryTask
.
config
)
refresh_nokia_interface_list
(
hostname
,
netconf_config
,
r
,
lab
)
=======
_reload_router_config_nokia
(
hostname
,
lab
,
self
.
log_info
,
self
.
log_warning
)
>>>>>>>
Stashed
changes
except
Exception
as
e
:
errmsg
=
f
'
unhandled exception loading
{
hostname
}
info:
{
e
}
'
logger
.
exception
(
errmsg
)
...
...
@@ -605,6 +615,19 @@ def reload_router_config_nokia(self, hostname, lab=False):
# TODO: re-raise and handle in some common way for all tasks
@log_task_entry_and_exit
def
_reload_router_config_nokia
(
hostname
,
lab
=
False
,
info_callback
=
lambda
s
:
None
,
warning_callback
=
lambda
s
:
None
):
info_callback
(
f
'
loading netconf data for
{
"
lab
"
if
lab
else
""
}
{
hostname
}
'
)
netconf_doc
=
retrieve_and_persist_netconf_config_nokia
(
hostname
,
lab
,
warning_callback
)
r
=
get_next_redis
(
InventoryTask
.
config
)
refresh_nokia_interface_list
(
hostname
,
netconf_doc
,
r
,
lab
)
def
retrieve_and_persist_netconf_config_nokia
(
hostname
,
lab
=
False
,
update_callback
=
lambda
s
:
None
):
redis_key
=
f
'
netconf-nokia:
{
hostname
}
'
...
...
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