Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Commit c4a5913

Browse files
Sliimseveas
authored andcommitted
Add new devices type
According to the NetworkManager documentation: https://developer.gnome.org/NetworkManager/stable/nm-dbus-types.html#NMDeviceType There is 4 new device type: NM_DEVICE_TYPE_WPAN = 27 - a IEEE 802.15.4 (WPAN) MAC Layer Device NM_DEVICE_TYPE_6LOWPAN = 28 - 6LoWPAN interface NM_DEVICE_TYPE_WIREGUARD = 29 - a WireGuard interface NM_DEVICE_TYPE_WIFI_P2P = 30 - an 802.11 Wi-Fi P2P device (Since: 1.16) This changes add contants and classes for these devices and add them in the device_class dict. Fix #68 #76 See also #80
1 parent 094c935 commit c4a5913

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

NetworkManager.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,11 @@ def device_class(typ):
389389
NM_DEVICE_TYPE_PPP: PPP,
390390
NM_DEVICE_TYPE_OVS_INTERFACE: OvsIf,
391391
NM_DEVICE_TYPE_OVS_PORT: OvsPort,
392-
NM_DEVICE_TYPE_OVS_BRIDGE: OvsBridge
392+
NM_DEVICE_TYPE_OVS_BRIDGE: OvsBridge,
393+
NM_DEVICE_TYPE_WPAN: Wpan,
394+
NM_DEVICE_TYPE_6LOWPAN: SixLoWpan,
395+
NM_DEVICE_TYPE_WIREGUARD: WireGuard,
396+
NM_DEVICE_TYPE_WIFI_P2P: WifiP2p
393397
}[typ]
394398

395399
class Adsl(Device): pass
@@ -416,6 +420,10 @@ class PPP(Device): pass
416420
class OvsIf(Device): pass
417421
class OvsPort(Device): pass
418422
class OvsBridge(Device): pass
423+
class Wpan(Device): pass
424+
class SixLoWpan(Device): pass
425+
class WireGuard(Device): pass
426+
class WifiP2p(Device): pass
419427

420428
class NSP(TransientNMDbusInterface):
421429
interface_names = ['org.freedesktop.NetworkManager.Wimax.NSP']

0 commit comments

Comments
 (0)