Merge lp:~rvb/maas/agent-bug-1239488-list into lp:~maas-committers/maas/trunk
Proposed by
Raphaël Badin
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1710 | ||||
Proposed branch: | lp:~rvb/maas/agent-bug-1239488-list | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Prerequisite: | lp:~rvb/maas/agent-bug-1239488-acquire | ||||
Diff against target: |
84 lines (+48/-1) 2 files modified
src/maasserver/api.py (+6/-0) src/maasserver/tests/test_api_nodes.py (+42/-1) |
||||
To merge this branch: | bzr merge lp:~rvb/maas/agent-bug-1239488-list | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | Approve | ||
Review via email:
|
Commit message
Change the API's list() method so that it accepts an optional agent_name parameter to filter the returned nodes.
To post a comment you must log in.
LGTM. One minor tweak for don't-make- me-think- ness:
[1]
33 + factory. make_node( agent_name= factory. make_name( 'agent- name')) make_name( 'agent- name') make_node( agent_name= agent_name)
34 + agent_name = factory.
35 + node = factory.
I'm assuming that this first factory.make_node() is to create a node that won't show up in the list. That's fine, but let's do something like:
factory. make_node( agent_name= factory. make_name( 'this-wont- be-listed' ))
Otherwise dimwits like your reviewer will get confused by the two calls to factory. make_name( 'agent- name').