15 lines
357 B
Python
15 lines
357 B
Python
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()
|
|
|