Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
noc
noc
Commits
026d0ab9
Commit
026d0ab9
authored
Sep 28, 2021
by
Andrey Vertiprahov
Browse files
Fix IPv6 addresses discovery on DHCP error.
parent
e6e4068d
Pipeline
#33623
passed with stages
in 24 minutes and 47 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
services/discovery/jobs/box/address.py
View file @
026d0ab9
...
...
@@ -16,7 +16,7 @@ from noc.ip.models.address import Address
from
noc.core.perf
import
metrics
from
noc.core.handler
import
get_handler
from
noc.core.validators
import
is_fqdn
from
noc.core.ip
import
IP
,
IPv4
,
PrefixDB
from
noc.core.ip
import
IP
,
PrefixDB
DiscoveredAddress
=
namedtuple
(
...
...
@@ -201,7 +201,7 @@ class AddressCheck(DiscoveryCheck):
def
get_vpn_id
(
ip
):
try
:
return
vpn_db
[
IP
v4
(
ip
)]
return
vpn_db
[
IP
.
prefix
(
ip
)]
except
KeyError
:
pass
if
self
.
object
.
vrf
:
...
...
@@ -224,7 +224,7 @@ class AddressCheck(DiscoveryCheck):
return
[]
vpn_db
=
PrefixDB
()
for
a
in
addresses
:
vpn_db
[
IP
v4
(
a
[
"address"
]).
first
]
=
a
[
"vpn_id"
]
vpn_db
[
IP
.
prefix
(
a
[
"address"
]).
first
]
=
a
[
"vpn_id"
]
#
self
.
logger
.
debug
(
"Getting DHCP addresses"
)
leases
=
self
.
object
.
scripts
.
get_dhcp_binding
()
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment