def create_domains(self): private = View(name="private") private.save() public = View(name="public") public.save() d0 = create_fake_zone("dc.mozilla.com", suffix="") s = d0.soa d = Domain(name='vlan.dc.mozilla.com') d.save() d.soa = s d.save() Domain(name='arpa').save() Domain(name='in-addr.arpa').save() # Create Reverse Domains d = create_fake_zone("10.in-addr.arpa", suffix="") d = create_fake_zone("66.in-addr.arpa", suffix="") vlan = Vlan(name='vlan', number=99) vlan.save() site = Site(name='dc') site.save() network = Network(network_str="10.0.0.0/8", ip_type='4') network2 = Network(network_str="66.66.66.0/24", ip_type='4') network2.update_network() network2.save() network.vlan = vlan network.site = site network.update_network() network.save() r = Range( start_str='10.99.99.1', end_str='10.99.99.254', network=network,) r.clean() r.save() r = Range( start_str='66.66.66.1', end_str='66.66.66.254', network=network2,) r.clean() r.save()
def create_domains(self): private = View(name="private") private.save() public = View(name="public") public.save() Domain(name='com').save() Domain(name='mozilla.com').save() Domain(name='dc.mozilla.com').save() Domain(name='vlan.dc.mozilla.com').save() Domain(name='arpa').save() Domain(name='in-addr.arpa').save() Domain(name='10.in-addr.arpa').save() Domain(name='66.in-addr.arpa').save() vlan = Vlan(name='vlan', number=99) vlan.save() site = Site(name='dc') site.save() network = Network(network_str="10.0.0.0/8", ip_type='4') network2 = Network(network_str="66.66.66.0/24", ip_type='4') network2.update_network() network2.save() network.vlan = vlan network.site = site network.update_network() network.save() r = Range( start_str='10.99.99.1', end_str='10.99.99.254', network=network,) r.clean() r.save() r = Range( start_str='66.66.66.1', end_str='66.66.66.254', network=network2,) r.clean() r.save()