summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-10-15 13:47:29 -0400
committerDan Winship <danw@gnome.org>2014-10-22 08:29:08 -0400
commit4f75ff92b4d5a52d453b77b050f38f8c3e421256 (patch)
treed252b2868076933b6888604ab96ae76e93d91ef8 /tools
parent69099f3e80dde14b4556c95fbdde7f01b913cdbc (diff)
downloadNetworkManager-4f75ff92b4d5a52d453b77b050f38f8c3e421256.tar.gz
libnm-core, libnm, devices: merge client and daemon NMDeviceError
Merge libnm's NMDeviceError and the daemon's NMDeviceError into a single enum (in nm-errors.h). Register the domain with D-Bus, and add a test that the client side decodes it correctly. The daemon's NM_DEVICE_ERROR_CONNECTION_INVALID gets absorbed into libnm's NM_DEVICE_ERROR_INVALID_CONNECTION, and NM_DEVICE_ERROR_UNSUPPORTED_DEVICE_TYPE gets dropped, since it was only returned from one place, which is now using NM_DEVICE_ERROR_FAILED, since (a) it ought to be a "can't happen", and (b) the only caller of that function just logs error->message and then frees the error without ever looking at the code.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test-networkmanager-service.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py
index 9be2e8541b..2973fd992e 100755
--- a/tools/test-networkmanager-service.py
+++ b/tools/test-networkmanager-service.py
@@ -113,6 +113,9 @@ class ExportedObj(dbus.service.Object):
###################################################################
IFACE_DEVICE = 'org.freedesktop.NetworkManager.Device'
+class NotSoftwareException(dbus.DBusException):
+ _dbus_error_name = IFACE_DEVICE + '.NotSoftware'
+
PD_UDI = "Udi"
PD_IFACE = "Interface"
PD_DRIVER = "Driver"
@@ -170,6 +173,12 @@ class Device(ExportedObj):
def Disconnect(self):
pass
+ @dbus.service.method(dbus_interface=IFACE_DEVICE, in_signature='', out_signature='')
+ def Delete(self):
+ # We don't currently support any software device types, so...
+ raise NotSoftwareException()
+ pass
+
def __notify(self, propname):
props = self._get_dbus_properties(IFACE_DEVICE)
changed = { propname: props[propname] }