|
19 | 19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 | from __future__ import annotations |
21 | 21 |
|
22 | | -from enum import IntEnum, IntFlag |
| 22 | +from enum import IntEnum, IntFlag, Enum |
23 | 23 |
|
24 | 24 |
|
25 | 25 | class AccessPointCapabilities(IntFlag): |
@@ -494,7 +494,7 @@ class DeviceStateReason(IntEnum): |
494 | 494 | # thus there are more ConnectionTypes than DeviceTypes: |
495 | 495 |
|
496 | 496 | # From NetworkManager-1.35: |
497 | | -class ConnectionType(): |
| 497 | +class ConnectionType(str, Enum): |
498 | 498 | ADSL = "adsl" |
499 | 499 | BLUETOOTH = "bluetooth" |
500 | 500 | BOND = "bond" |
@@ -596,39 +596,6 @@ class DeviceType(IntEnum): |
596 | 596 | VRF = 31 |
597 | 597 |
|
598 | 598 |
|
599 | | -ConnectionTypeByDeviceType = { |
600 | | - "ADSL": "adsl", |
601 | | - "BLUETOOTH": "bluetooth", |
602 | | - "BOND": "bond", |
603 | | - "BRIDGE": "bridge", |
604 | | - "CDMA": "cdma", |
605 | | - "DUMMY": "dummy", |
606 | | - "ETHERNET": "802-3-ethernet", |
607 | | - "INFINIBAND": "infiniband", |
608 | | - "IP_TUNNEL": "ip-tunnel", |
609 | | - "MACSEC": "macsec", |
610 | | - "MACVLAN": "macvlan", |
611 | | - "MODEM": "gsm", |
612 | | - "OLPC_MESH": "802-11-olpc-mesh", |
613 | | - "OVS_BRIDGE": "ovs-bridge", |
614 | | - "OVS_INTERFACE": "ovs-interface", |
615 | | - "OVS_PORT": "ovs-port", |
616 | | - "PPPOE": "pppoe", |
617 | | - "SIXLOWPAN": "6lowpan", |
618 | | - "TEAM": "team", |
619 | | - "TUN": "tun", |
620 | | - "VETH": "veth", |
621 | | - "VLAN": "vlan", |
622 | | - "VPN": "vpn", |
623 | | - "VRF": "vrf", |
624 | | - "VXLAN": "vxlan", |
625 | | - "WIFI": "802-11-wireless", |
626 | | - "WIFI_P2P": "wifi-p2p", |
627 | | - "WIREGUARD": "wireguard", |
628 | | - "WPAN": "wpan", |
629 | | -} |
630 | | - |
631 | | - |
632 | 599 | class DeviceMetered(IntEnum): |
633 | 600 | """Device Metered state |
634 | 601 |
|
|
0 commit comments