Merge lp:~julian-edwards/maas/network-gateway-ui into lp:~maas-committers/maas/trunk
Proposed by
Julian Edwards
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Julian Edwards | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 2904 | ||||
Proposed branch: | lp:~julian-edwards/maas/network-gateway-ui | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
170 lines (+25/-4) 8 files modified
src/maasserver/api/networks.py (+2/-1) src/maasserver/api/tests/test_network.py (+3/-0) src/maasserver/api/tests/test_networks.py (+3/-1) src/maasserver/forms.py (+1/-0) src/maasserver/templates/maasserver/network_detail.html (+4/-0) src/maasserver/templates/maasserver/network_list.html (+2/-0) src/maasserver/testing/factory.py (+4/-2) src/maasserver/views/tests/test_networks.py (+6/-0) |
||||
To merge this branch: | bzr merge lp:~julian-edwards/maas/network-gateway-ui | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+233445@code.launchpad.net |
Commit message
Trivial changes to add default_gateway to the web UI pages for viewing, editing and adding Networks. Also ensure default_gateway can be edited in the API.
To post a comment you must log in.
Two nitpicks about this bit you're adding in the factory:
if default_gateway is None and random. choice( (True, False)):
default_ gateway = unicode( IPAddress( network. first + 1))
The factory has a helper for random. choice( (True, False)): pick_bool().
Why are you forcing the gateway to be network.first + 1? I'd use self.pick_ ip_in_network( network) .