import script fixes for current db
This commit is contained in:
parent
429a772f57
commit
48499d9436
|
@ -38,9 +38,8 @@ def main():
|
||||||
parser = _parser()
|
parser = _parser()
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
defContact = Contact.objects.get(handle="DURC1-DN")
|
defContact = Contact.objects.get(handle="UNKNOWN-DN")
|
||||||
defContact
|
defMnt = Maintainer.objects.get(handle="DARKNET-MNT")
|
||||||
defMnt = Maintainer.objects.get(handle="DARK1-MNT")
|
|
||||||
blocks = [
|
blocks = [
|
||||||
ASBlock.objects.get(handle="TRA1-ASB"),
|
ASBlock.objects.get(handle="TRA1-ASB"),
|
||||||
ASBlock.objects.get(handle="UAB1-ASB")
|
ASBlock.objects.get(handle="UAB1-ASB")
|
||||||
|
@ -49,7 +48,8 @@ def main():
|
||||||
InetNum.objects.get(handle="TRA1-NET"),
|
InetNum.objects.get(handle="TRA1-NET"),
|
||||||
InetNum.objects.get(handle="DEF4-NET"),
|
InetNum.objects.get(handle="DEF4-NET"),
|
||||||
InetNum.objects.get(handle="DEF6-NET"),
|
InetNum.objects.get(handle="DEF6-NET"),
|
||||||
InetNum.objects.get(handle="UNR1-NET"),
|
InetNum.objects.get(handle="MISC6-NET"),
|
||||||
|
InetNum.objects.get(handle="LTRA1-NET"),
|
||||||
InetNum.objects.get(handle="MAIN4-NET"),
|
InetNum.objects.get(handle="MAIN4-NET"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ def main():
|
||||||
obj.description = "Object has been imported from old DB and has not yet been edited"
|
obj.description = "Object has been imported from old DB and has not yet been edited"
|
||||||
obj.save()
|
obj.save()
|
||||||
obj.mnt_by.add(defMnt)
|
obj.mnt_by.add(defMnt)
|
||||||
|
obj.admin_c.add(defContact)
|
||||||
obj.save()
|
obj.save()
|
||||||
|
|
||||||
for net in data["network"]:
|
for net in data["network"]:
|
||||||
|
@ -117,6 +118,7 @@ def main():
|
||||||
obj.save()
|
obj.save()
|
||||||
|
|
||||||
obj.mnt_by.add(defMnt)
|
obj.mnt_by.add(defMnt)
|
||||||
|
obj.admin_c.add(defContact)
|
||||||
if origin:
|
if origin:
|
||||||
obj.origin_as.add(origin)
|
obj.origin_as.add(origin)
|
||||||
obj.save()
|
obj.save()
|
||||||
|
|
Loading…
Reference in New Issue