Discussion:
[Netdot-users] Using API to search for IPBlock custom attributes
Sparks, Alan (GSTS-SDO)
2017-07-14 20:14:48 UTC
Permalink
I'm researching how I could implement something like the following in Netdot using pynetdot. Can't find any hints Googling, so...

I'm considering "tagging" IP blocks using the custom attributes functionality. For instance, to tag which region the block is assigned to, production or nonproduction, etc. Was looking for some way to search IP blocks then for those attributes, to find the specific container I need to allocate from.

I haven't been able to find anything on how (or if I could) search with pynetdot (or the API) for an ipblock with a given custom attribute name and value. Has anyone done that? Otherwise, it would appear I'd have to enumerate all the containers and their attributes and filter by hand. Was hoping there's a better way.

Any suggestions on what I might look at appreciated.
-Alan
Matej Vadnjal
2017-08-07 06:10:47 UTC
Permalink
Hi Alan

I haven't tested this, but I think you could filter for the wanted
IpblockAttr and then get all subnets that have that attribute from that.

Kind regards
Matej
I’m researching how I could implement something like the following in
Netdot using pynetdot. Can’t find any hints Googling, so…
I’m considering “tagging” IP blocks using the custom attributes
functionality. For instance, to tag which region the block is
assigned to, production or nonproduction, etc. Was looking for some
way to search IP blocks then for those attributes, to find the
specific container I need to allocate from.
I haven’t been able to find anything on how (or if I could) search
with pynetdot (or the API) for an ipblock with a given custom
attribute name and value. Has anyone done that? Otherwise, it would
appear I’d have to enumerate all the containers and their attributes
and filter by hand. Was hoping there’s a better way.
Any suggestions on what I might look at appreciated.
-Alan
_______________________________________________
Netdot-users mailing list
https://osl.uoregon.edu/mailman/listinfo/netdot-users
Loading...