Merge lp:~jtv/maas/multi-nodegroupformfield-label into lp:~maas-committers/maas/trunk
Proposed by
Jeroen T. Vermeulen
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1850 |
Proposed branch: | lp:~jtv/maas/multi-nodegroupformfield-label |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
65 lines (+10/-11) 2 files modified
src/maasserver/fields.py (+6/-5) src/maasserver/tests/test_fields.py (+4/-6) |
To merge this branch: | bzr merge lp:~jtv/maas/multi-nodegroupformfield-label |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raphaël Badin (community) | Approve | ||
Review via email: mp+203297@code.launchpad.net |
Commit message
Support multiple managed interfaces in NodeGroupFormFi
Description of the change
It's hard to test explicitly for the case where a nodegroup has multiple managed interfaces, because we don't actually allow that situation yet. But luckily the difference is entirely hidden way inside a unicode.join() call — as far as our code is concerned there is no difference now between one managed interface or several.
I considered adding tests for the fact that unmanaged interfaces are ignored, but I'm not actually sure it's all that important. it seems fairly arbitrary and there were no tests for it before.
Jeroen
To post a comment you must log in.
[0]
52 + for interface in nodegroup. nodegroupinterf ace_set. all():
53 + interface.delete()
nodegroup. nodegroupinterf ace_set. all().delete( ) is more concise.