Skip to content

Add a get_host_by_attrs method #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

jeffmca-zz
Copy link

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.

Jeff McAdams and others added 2 commits January 2, 2015 15:15
Returns a list of hosts with the matching attribute

Almost identical to get_host_by_extattrs but doesn't insert the "*" to
reference extensible attributes.  Can be used to query based on extattrs
by inserting the "*" manually, or just use get_host_by_attrs.
Add "get_host_by_attrs" to doc message in class Infoblox
@igor-feoktistov
Copy link
Contributor

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:  #2
Commit Summary

  • Add get_host_by_attrs.
  • Add "get_host_by_attrs" to doc message in class Infoblox

File Changes

  • M infoblox.py (37)

Patch Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants