06-30-2014 08:22 PM
G'Day everyone. I can search for Host records with the name containing a keyword (for example loopback) by doing this:
>>> Host.find(session).whereRegex('name', '(loopback)' ).all()
[<Host name=bba-320-tsv-01-loopback1.net.uow.edu.au ipv4addrs=[<HostIPv4 ipv4addr.....
How would I go about exlcuding any host with loopback in its name?
>>> Host.find(session).whereRegex('name', '(!loopback)' ).all()
Alternatively, is there a programatic way of pulling down the entire zone file? If I search for everything it won't return in JSON as it's >1000 records. Would I need to ignore the API alltogether and setup a zone transfer?