diff options
author | jbainbri <jamie.bainbridge@gmail.com> | 2014-05-30 15:47:01 +1000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-06-05 21:24:38 +0100 |
commit | f11621add7ac8c78a1c6dda853f322b7a7602a9c (patch) | |
tree | ec3c697d49aafd7b57b06372ac1a6aa4ab69b3d3 | |
parent | bb3fe913d50221ca5d16b13917dfd48d9f693c5a (diff) | |
download | sos-f11621add7ac8c78a1c6dda853f322b7a7602a9c.tar.gz |
[networking] Add NetworkManager nmcli support
Fixes Issue #293.
Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/networking.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py index 5d3c6532..ac1c8406 100644 --- a/sos/plugins/networking.py +++ b/sos/plugins/networking.py @@ -105,7 +105,10 @@ class Networking(Plugin): "ifenslave -a", "ip mroute show", "ip maddr show", - "ip neigh show" + "ip neigh show", + "nmcli general status", + "nmcli connection show", + "nmcli device status" ]) ip_link_result=self.call_ext_prog("ip -o link") if ip_link_result['status'] == 0: @@ -124,6 +127,16 @@ class Networking(Plugin): if brctl_file: for br_name in self.get_bridge_name(brctl_file): self.add_cmd_output("brctl showstp "+br_name) + + nmcli_con_show_result=self.call_ext_prog("nmcli --terse --fields NAME con show") + if nmcli_con_show_result: + for con in nmcli_con_show_result['output'].splitlines(): + self.add_cmd_output("nmcli connection show "+con) + + nmcli_dev_status_result=self.call_ext_prog("nmcli --terse --fields DEVICE dev status") + if nmcli_dev_status_result: + for dev in nmcli_dev_status_result['output'].splitlines(): + self.add_cmd_output("nmcli device show "+dev) if self.get_option("traceroute"): self.add_cmd_output("/bin/traceroute -n %s" % self.trace_host) |