diff --git a/test.py b/test.py index e69de29..b7d7ca5 100644 --- a/test.py +++ b/test.py @@ -0,0 +1,14 @@ +from extras.scripts import * +from ipam.models import IPAddress + + +class Testing(Script): + + def run(self, data, commit): + ip_object = IPAddress.objects.get(address="10.1.1.1/16") + + if ip_object: + ip_object.description = "Testing" + ip_object.custom_field_data["test"] = "Testing" + ip_object.save() +