Merge lp:~tribaal/maas/api-list-nodes-filter-by-hostname into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1733 |
Proposed branch: | lp:~tribaal/maas/api-list-nodes-filter-by-hostname |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
51 lines (+21/-1) 2 files modified
src/maasserver/api.py (+6/-0) src/maasserver/tests/test_api_nodes.py (+15/-1) |
To merge this branch: | bzr merge lp:~tribaal/maas/api-list-nodes-filter-by-hostname |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+194819@code.launchpad.net |
Commit message
Add a 'hostname' parameter to the list nodes API call. The parameter should
be a list of hostnames to filter nodes by, similar to the already existing
'mac_address' parameter.
Description of the change
This branch adds a "hostname" parameter (a list) to the list nodes API call.
It behaves in a similar fashion to the "mac_address" parameter in that it acts as a filter for the list of nodes returned. We need it because in our current situation it is much more convenient for us to filter by hostnames instead of Mac addresses (which we would like to remain "random").
The linked bug was edited to cover the more general case of treating an invalid filter as an error instead of an absence of filters, but we are less interested in that functionality right now.
As I am not 100% familiar with your development process, please do not hesitate to tell me what other steps I should take to make this land :)
Looks good to me, thanks for this.