Merge lp:~jtv/maas-test/quiet-dhcp-check into lp:maas-test

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: 110
Merged at revision: 110
Proposed branch: lp:~jtv/maas-test/quiet-dhcp-check
Merge into: lp:maas-test
Diff against target: 23 lines (+6/-4)
1 file modified
maastest/detect_dhcp.py (+6/-4)
To merge this branch: bzr merge lp:~jtv/maas-test/quiet-dhcp-check
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Review via email: mp+200987@code.launchpad.net

Commit message

Remove unhelpful message from DHCP check when interface has no IP address.

Description of the change

As suggested by Julian. If the interface has no IP address, there could still be a DHCP server out there but it's less likely.

Jeroen

To post a comment you must log in.
Revision history for this message
Raphaël Badin (rvb) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'maastest/detect_dhcp.py'
2--- maastest/detect_dhcp.py 2013-12-12 09:54:04 +0000
3+++ maastest/detect_dhcp.py 2014-01-09 10:54:41 +0000
4@@ -1,4 +1,4 @@
5-# Copyright 2013 Canonical Ltd. This software is licensed under the
6+# Copyright 2013-2014 Canonical Ltd. This software is licensed under the
7 # GNU Affero General Public License version 3 (see the file LICENSE).
8
9 """Discover DHCP servers on your network.
10@@ -212,8 +212,10 @@
11 # send out repeated requests.
12 transaction_id = request_dhcp(interface)
13 if transaction_id is None:
14- logging.info(
15- "Network interface %s has no IP address. "
16- "Can't scan for DHCP servers.", interface)
17+ # Network interface has no IP address. Our DHCP detection code does
18+ # not work for this case.
19+ # This is a low-priority case because if there were a DHCP server on
20+ # the network this interface is attached to, it might well have an IP
21+ # address in the first place.
22 return set()
23 return receive_offers(transaction_id)

Subscribers

People subscribed via source and target branches