Closed jeffmca-zz closed 9 years ago
Perhaps better way to handle requests like this is to add regexp support in get_host method.
From: Jeff McAdams <notifications@github.com>
To: Infoblox-Development/Infoblox-API-Python Infoblox-API-Python@noreply.github.com Sent: Friday, January 2, 2015 12:26 PM Subject: [Infoblox-API-Python] Add a get_host_by_attrs method (#2)
I needed a method to return a list of hosts, very similar to get_host_by_extattrs, but that didn't assume the use of extensible attributes.My immediate use-case was to return a list of hosts which have a name that matches a regular expression.get_host would only return an individual host, so I wanted something to return a list like get_host_by_extattrs, but ...by_extattrs inserted the "*" that made it only usable for extensible attributes. You can merge this Pull Request by running git pull https://github.com/jeffmca/Infoblox-API-Python masterOr view, comment on, or merge it at: https://github.com/Infoblox-Development/Infoblox-API-Python/pull/2 Commit Summary
File Changes
Patch Links:
I needed a method to return a list of hosts, very similar to get_host_by_extattrs, but that didn't assume the use of extensible attributes.
My immediate use-case was to return a list of hosts which have a name that matches a regular expression.
get_host would only return an individual host, so I wanted something to return a list like get_host_by_extattrs, but ...by_extattrs inserted the "*" that made it only usable for extensible attributes.