Update test.py
This commit is contained in:
parent
88eb37fc56
commit
41cfbd950a
14
test.py
14
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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user