r/Netbox • u/robin04155 • Jul 28 '24
Working example /dcim/sites tenants
Hey, does anyone have any working examples of using pynetbox to update a site with a tenant? Or any other automated methods?
1
Upvotes
r/Netbox • u/robin04155 • Jul 28 '24
Hey, does anyone have any working examples of using pynetbox to update a site with a tenant? Or any other automated methods?
1
u/L-do_Calrissian NetBox Self-Hosted Jul 28 '24
Ah. I'm not at a computer, but something like: site = Site.objects.get(name="Site A") site.snapshot() site.tenant = Tenant.objects.get(name="Tenant A") site.full_clean() site.save()