diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2013-11-29 09:29:56 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2013-11-29 09:29:56 +0100 |
commit | aa54604f5974a9dd47d80f0e952cc88ae1036636 (patch) | |
tree | f425866eb5f84ee4115dddae8e43808fd4b1897d /examples | |
parent | 888a2618ea038d3e5a755f6205eac63c10ae83f6 (diff) | |
download | NetworkManager-aa54604f5974a9dd47d80f0e952cc88ae1036636.tar.gz |
examples: update examples for new device types
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/python/dbus/list-devices.py | 7 | ||||
-rwxr-xr-x | examples/ruby/list-devices.rb | 7 | ||||
-rwxr-xr-x | examples/shell/list-devices.sh | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/examples/python/dbus/list-devices.py b/examples/python/dbus/list-devices.py index 11985b1cf9..b8e0058be5 100755 --- a/examples/python/dbus/list-devices.py +++ b/examples/python/dbus/list-devices.py @@ -22,6 +22,7 @@ import dbus, sys # This example lists basic information about network interfaces known to NM +# For the types see include/NetworkManager.h devtypes = { 1: "Ethernet", 2: "Wi-Fi", 5: "Bluetooth", @@ -31,7 +32,11 @@ devtypes = { 1: "Ethernet", 9: "InfiniBand", 10: "Bond", 11: "VLAN", - 12: "ADSL" } + 12: "ADSL", + 13: "Bridge", + 14: "Generic", + 15: "Team" + } states = { 0: "Unknown", 10: "Unmanaged", diff --git a/examples/ruby/list-devices.rb b/examples/ruby/list-devices.rb index a3bf90f5c3..710ccedc08 100755 --- a/examples/ruby/list-devices.rb +++ b/examples/ruby/list-devices.rb @@ -25,6 +25,7 @@ require 'dbus' # This example lists basic information about network interfaces known to NM # +# For the types see include/NetworkManager.h devtypes = { 1 => "Ethernet", 2 => "Wi-Fi", 5 => "Bluetooth", @@ -34,7 +35,11 @@ devtypes = { 1 => "Ethernet", 9 => "InfiniBand", 10 => "Bond", 11 => "VLAN", - 12 => "ADSL" } + 12 => "ADSL", + 13 => "Bridge", + 14 => "Generic", + 15 => "Team" + } states = { 0 => "Unknown", 10 => "Unmanaged", diff --git a/examples/shell/list-devices.sh b/examples/shell/list-devices.sh index 4cf9c59919..dba82261c0 100755 --- a/examples/shell/list-devices.sh +++ b/examples/shell/list-devices.sh @@ -31,6 +31,7 @@ DEVICE_IFACE="org.freedesktop.NetworkManager.Device" NM_GET_DEVICES="org.freedesktop.NetworkManager.GetDevices" DBUS_PROPERTIES_GET="org.freedesktop.DBus.Properties.Get" +# For the types see include/NetworkManager.h devtype_to_name() { case $1 in @@ -44,6 +45,9 @@ devtype_to_name() 10) echo "Bond" ;; 11) echo "VLAN" ;; 12) echo "ADSL" ;; + 13) echo "Bridge" ;; + 14) echo "Generic" ;; + 15) echo "Team" ;; *) echo "Unknown" ;; esac } |