You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notes for later
Given a hostname like 'foo.dmz.corp.phx1.mozilla.com' parse the name into the following objects.
...mozilla.com
In this case:
label = 'foo'
vlan = 'dmz'
site = 'phx1.corp'
With this info, do:
phx1 = Site.objects.get(name='phx1')
corp_phx1 = Site.objects.get(name='corp', parent=phx1)
vlan = Vlan.objects.get(name='dmz')
networks = vlan.network_set.filter(site=corp_phx1)
for network in networks:
for range in network.range_set.all():
# If the range has a free ip, use it!
Make a function to be able to figure out the vlan/ip address information from hostname and assign an available ip address
The text was updated successfully, but these errors were encountered: