|
49 | 49 | NetworkManagerDeviceWiredInterfaceAsync, |
50 | 50 | NetworkManagerDeviceWireGuardInterfaceAsync, |
51 | 51 | NetworkManagerDeviceWirelessInterfaceAsync, |
| 52 | + NetworkManagerLoopbackInterfaceAsync, |
52 | 53 | NetworkManagerPPPInterfaceAsync, |
53 | 54 | ) |
54 | 55 | from .interfaces_other import ( |
@@ -862,6 +863,36 @@ def __init__(self, device_path: str, bus: Optional[SdBus] = None) -> None: |
862 | 863 | bus) |
863 | 864 |
|
864 | 865 |
|
| 866 | +class NetworkDeviceLoopback( |
| 867 | + NetworkManagerDeviceInterfaceAsync, |
| 868 | + NetworkManagerDeviceStatisticsInterfaceAsync, |
| 869 | + NetworkManagerLoopbackInterfaceAsync, |
| 870 | +): |
| 871 | + """Loopback device |
| 872 | +
|
| 873 | + Implements :py:class:`NetworkManagerDeviceInterfaceAsync`, \ |
| 874 | + :py:class:`NetworkManagerDeviceStatisticsInterfaceAsync` and \ |
| 875 | + :py:class:`NetworkManagerLoopbackInterfaceAsync` |
| 876 | + """ |
| 877 | + |
| 878 | + def __init__(self, device_path: str, bus: Optional[SdBus] = None) -> None: |
| 879 | + """ |
| 880 | +
|
| 881 | + :param device_path: D-Bus path to device object. \ |
| 882 | + Obtained from \ |
| 883 | + :py:meth:`NetworkManagerInterface.get_devices` or \ |
| 884 | + :py:meth:`NetworkManagerInterface.get_device_by_ip_iface`. |
| 885 | +
|
| 886 | + :param bus: You probably want to set default bus to system bus \ |
| 887 | + or pass system bus directly. |
| 888 | + """ |
| 889 | + super().__init__() |
| 890 | + self._connect( |
| 891 | + NETWORK_MANAGER_SERVICE_NAME, |
| 892 | + device_path, |
| 893 | + bus) |
| 894 | + |
| 895 | + |
865 | 896 | class ActiveConnection(NetworkManagerConnectionActiveInterfaceAsync): |
866 | 897 | """Active connection object |
867 | 898 |
|
|
0 commit comments