Replies: 1 comment
-
Is it somehow a general problem as I can not iterate through the IPAddress object.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to filter IP addresses if name contains a certain string and tenant.id. I tried this one:
ips = IPAddress.objects.filter(interface__device__name__contains=ip_filter, tenant_id=t.id)
Is this the proper way to filter IP addresses? I am using this in a custom script - but the script takes a long time and runs to a timeout.
Device and VMs I can succesfully filter like this:
Device.objects.filter(name__contains=dev_filter, tenant_id=t.id)
VirtualMachine.objects.filter(name__contains=vm_filter, tenant_id=t.id)
Thank you..
Beta Was this translation helpful? Give feedback.
All reactions