Merge ~bladernr/plainbox-provider-checkbox:1711156-cleanup-eth-info-automated into plainbox-provider-checkbox:master

Proposed by Jeff Lane 
Status: Merged
Approved by: Jeff Lane 
Approved revision: ad65e0edac6a08b672a2a636ea449f52c96c8dff
Merged at revision: e8309058614a2d4e464836d1146d731ad132222c
Proposed branch: ~bladernr/plainbox-provider-checkbox:1711156-cleanup-eth-info-automated
Merge into: plainbox-provider-checkbox:master
Diff against target: 14 lines (+2/-2)
1 file modified
bin/network_info (+2/-2)
Reviewer Review Type Date Requested Status
Maciej Kisielewski Approve
Review via email: mp+329123@code.launchpad.net

Description of the change

Simple mod to the network_info script to clean up the output. Old behaviour caused the last line of one NIC's info to be run right into the first line of the next NIC, with a space improperly between lines in relevant data:

Interface: enP2p233s0f0
Connected: Yes
IPv4: 10.228.68.228
IPv6: 1000
MAC: f4:4c:7f:30:ab:14

Connect Speed: 10000
Interface: enP2p233s0f1
Connected: Yes
IPv4: 10.228.68.223
IPv6: 1000
MAC: f4:4c:7f:30:ab:15

Connect Speed: 10000
Interface: enP12p33s0f0
Connected: Yes
IPv4: 10.228.68.219
IPv6: 1000
MAC: ec:38:8f:6a:71:bc

Connect Speed: 1000

Note it runs the Connect Speed from the first nic into the information of hte second nic, and so forth, and gets REALLY confusing later. Now, the output is cleaned up so it will look like this:

Interface: enP2p233s0f0
Connected: Yes
IPv4: 10.228.68.228
IPv6: 1000
MAC: f4:4c:7f:30:ab:14
Connect Speed: 10000

Interface: enP2p233s0f1
Connected: Yes
IPv4: 10.228.68.223
IPv6: 1000
MAC: f4:4c:7f:30:ab:15
Connect Speed: 10000

Interface: enP12p33s0f0
Connected: Yes
IPv4: 10.228.68.219
IPv6: 1000
MAC: ec:38:8f:6a:71:bc
Connect Speed: 1000

Keeping all the data from each NIC in a nice, uniform group, with no confusing spacing issues.

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

LGTM! +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/network_info b/bin/network_info
2index 38d5ada..7dbe609 100755
3--- a/bin/network_info
4+++ b/bin/network_info
5@@ -84,8 +84,8 @@ def main(args):
6 print("IPv6: n/a")
7 except:
8 print("IPv6: n/a")
9- print("MAC: %s\n" % get_mac_address(interface))
10- print("Connect Speed: %s" % get_speed(interface))
11+ print("MAC: %s" % get_mac_address(interface))
12+ print("Connect Speed: %s\n" % get_speed(interface))
13
14 return 0
15

Subscribers

People subscribed via source and target branches