summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2012-08-24 09:48:19 +0200
committerJiří Klimeš <jklimes@redhat.com>2012-08-24 09:48:19 +0200
commit3fe99e7ebf9c4b75807037b9095c0fa25991d052 (patch)
treebda3e06cd865a3ed56a77b4602f6fd97ade873f7 /examples
parentb39804ae6b978b84b6a5369fd1e10498bdadf37f (diff)
downloadNetworkManager-3fe99e7ebf9c4b75807037b9095c0fa25991d052.tar.gz
examples: update examples for new device types
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/python/list-devices.py10
-rwxr-xr-xexamples/ruby/list-devices.rb10
-rwxr-xr-xexamples/shell/list-devices.sh8
3 files changed, 20 insertions, 8 deletions
diff --git a/examples/python/list-devices.py b/examples/python/list-devices.py
index c2e12ed3f5..11985b1cf9 100755
--- a/examples/python/list-devices.py
+++ b/examples/python/list-devices.py
@@ -15,7 +15,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright (C) 2011 Red Hat, Inc.
+# Copyright (C) 2011 - 2012 Red Hat, Inc.
#
import dbus, sys
@@ -23,11 +23,15 @@ import dbus, sys
# This example lists basic information about network interfaces known to NM
devtypes = { 1: "Ethernet",
- 2: "WiFi",
+ 2: "Wi-Fi",
5: "Bluetooth",
6: "OLPC",
7: "WiMAX",
- 8: "Modem" }
+ 8: "Modem",
+ 9: "InfiniBand",
+ 10: "Bond",
+ 11: "VLAN",
+ 12: "ADSL" }
states = { 0: "Unknown",
10: "Unmanaged",
diff --git a/examples/ruby/list-devices.rb b/examples/ruby/list-devices.rb
index 5831a12687..a3bf90f5c3 100755
--- a/examples/ruby/list-devices.rb
+++ b/examples/ruby/list-devices.rb
@@ -16,7 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright (C) 2011 Red Hat, Inc.
+# Copyright (C) 2011 - 2012 Red Hat, Inc.
#
require 'dbus'
@@ -26,11 +26,15 @@ require 'dbus'
#
devtypes = { 1 => "Ethernet",
- 2 => "WiFi",
+ 2 => "Wi-Fi",
5 => "Bluetooth",
6 => "OLPC",
7 => "WiMAX",
- 8 => "Modem" }
+ 8 => "Modem",
+ 9 => "InfiniBand",
+ 10 => "Bond",
+ 11 => "VLAN",
+ 12 => "ADSL" }
states = { 0 => "Unknown",
10 => "Unmanaged",
diff --git a/examples/shell/list-devices.sh b/examples/shell/list-devices.sh
index e7b4d306fe..4cf9c59919 100755
--- a/examples/shell/list-devices.sh
+++ b/examples/shell/list-devices.sh
@@ -16,7 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright (C) 2011 Red Hat, Inc.
+# Copyright (C) 2011 - 2012 Red Hat, Inc.
#
#
@@ -35,11 +35,15 @@ devtype_to_name()
{
case $1 in
1) echo "Ethernet" ;;
- 2) echo "WiFi" ;;
+ 2) echo "Wi-Fi" ;;
5) echo "Bluetooth" ;;
6) echo "OLPC" ;;
7) echo "WiMAX" ;;
8) echo "Modem" ;;
+ 9) echo "InfiniBand" ;;
+ 10) echo "Bond" ;;
+ 11) echo "VLAN" ;;
+ 12) echo "ADSL" ;;
*) echo "Unknown" ;;
esac
}