Skip to content

Script IPAM GUI #14364

Closed Locked Answered by davidgib01
davidgib01 asked this question in Help Wanted!
Nov 28, 2023 · 11 comments · 5 replies
Discussion options

You must be logged in to vote

Here is my final code, I managed to put everything in one script.
I started from scratch with table logic, and the duplicate problem came although when creating new addresses it created them for me in /32 instead of using the mask of the scanned prefix:

import subprocess
from ipaddress import IPv4Network
from ipam.models import IPAddress, Prefix
from ipam.choices import IPAddressStatusChoices
from extras.scripts import Script, IPAddressWithMaskVar
import socket

class NetworkScan(Script):
    class Meta:
        name = "Network IP Scan"
        description = "Scans a specified network, updates IPAM in NetBox based on active addresses"

    network_to_scan = IPAddressWithMaskVar(
        l…

Replies: 11 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@candlerb
Comment options

Comment options

You must be logged in to vote
1 reply
@candlerb
Comment options

Comment options

You must be logged in to vote
1 reply
@candlerb
Comment options

Comment options

You must be logged in to vote
1 reply
@candlerb
Comment options

Comment options

You must be logged in to vote
1 reply
@candlerb
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by davidgib01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants