Skip to content

Commit

Permalink
Connection Profiles are now contained in networkmanager.settings
Browse files Browse the repository at this point in the history
They should be explicitly imported from there.
This allows better separation between generated and handwritten
code.
  • Loading branch information
igo95862 committed Nov 14, 2022
1 parent da54965 commit e907667
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 155 deletions.
4 changes: 3 additions & 1 deletion examples/async/add-wifi-psk-connection-async.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@
from pprint import pformat
from sdbus_async.networkmanager import (
NetworkManagerSettings as SettingsManager,
ConnectionType,
)
from sdbus_async.networkmanager.settings import (
ConnectionProfile,
ConnectionSettings,
ConnectionType,
Ipv4Settings,
Ipv6Settings,
WirelessSettings,
Expand Down
2 changes: 1 addition & 1 deletion examples/async/netdevinfo-async.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
NetworkManagerAddressData = List[Dict[str, Tuple[str, Any]]]


async def get_most_recent_connection_id(ifname, dev_type) -> Optional[str]:
async def get_most_recent_connection_id(ifname: str, dev_type: str) -> Optional[str]:
"""Return the most-recently used connection_id for this device
Besides getting the currently active connection, this will succeed
Expand Down
2 changes: 1 addition & 1 deletion examples/async/update-connection-async.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import asyncio
import sdbus
from functools import partial
from sdbus_async.networkmanager import ConnectionProfile
from sdbus_async.networkmanager import NetworkManagerSettings
from sdbus_async.networkmanager import NetworkConnectionSettings
from sdbus_async.networkmanager.settings import ConnectionProfile
from pprint import pprint
from typing import Any, Dict

Expand Down
2 changes: 1 addition & 1 deletion examples/block/netdevinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
NetworkManagerAddressData = List[Dict[str, Tuple[str, Any]]]


def get_most_recent_connection_id(ifname, dev_type) -> Optional[str]:
def get_most_recent_connection_id(ifname: str, dev_type: str) -> Optional[str]:
"""Return the most-recently used connection_id for this device
Besides getting the currently active connection, this will succeed
Expand Down
52 changes: 0 additions & 52 deletions sdbus_async/networkmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@
WiFiP2PPeer,
)

from .settings.profile import ConnectionProfile

from .types import (
NetworkManagerConnectionProperties,
NetworkManagerSetting,
Expand Down Expand Up @@ -388,56 +386,6 @@
'NetworkManagerDnsManager',
'NetworkManagerSettings',
'WiFiP2PPeer',
# .settings
'AdslSettings',
'BluetoothSettings',
'BondSettings',
'BondPortSettings',
'BridgeSettings',
'BridgePortSettings',
'CdmaSettings',
'ConnectionSettings',
'AddressData', 'RouteData', 'WireguardPeers',
'DcbSettings',
'EthernetSettings',
'GsmSettings',
'HostnameSettings',
'Ieee8021XSettings',
'InfinibandSettings',
'IpTunnelSettings',
'Ipv4Settings',
'Ipv6Settings',
'LowpanSettings',
'MacsecSettings',
'MacvlanSettings',
'MatchSettings',
'OlpcMeshSettings',
'OvsBridgeSettings',
'OvsDpdkSettings',
'OvsExternalIdsSettings',
'OvsInterfaceSettings',
'OvsPatchSettings',
'OvsPortSettings',
'PppSettings',
'PppoeSettings',
'ConnectionProfile',
'ProxySettings',
'SerialSettings',
'TeamSettings',
'TeamPortSettings',
'TunSettings',
'UserSettings',
'VethSettings',
'VlanSettings',
'VpnSettings',
'VrfSettings',
'VxlanSettings',
'WifiP2PSettings',
'WimaxSettings',
'WireguardSettings',
'WirelessSettings',
'WirelessSecuritySettings',
'WpanSettings',
# .types
'NetworkManagerConnectionProperties',
'NetworkManagerSetting',
Expand Down
99 changes: 0 additions & 99 deletions sdbus_block/networkmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,55 +194,6 @@
NetworkManagerSettings,
WiFiP2PPeer,
)
from .settings.adsl import AdslSettings
from .settings.bluetooth import BluetoothSettings
from .settings.bond import BondSettings
from .settings.bond_port import BondPortSettings
from .settings.bridge import BridgeSettings
from .settings.bridge_port import BridgePortSettings
from .settings.cdma import CdmaSettings
from .settings.connection import ConnectionSettings
from .settings.datatypes import AddressData, RouteData, WireguardPeers
from .settings.dcb import DcbSettings
from .settings.ethernet import EthernetSettings
from .settings.gsm import GsmSettings
from .settings.hostname import HostnameSettings
from .settings.ieee802_1x import Ieee8021XSettings
from .settings.infiniband import InfinibandSettings
from .settings.ip_tunnel import IpTunnelSettings
from .settings.ipv4 import Ipv4Settings
from .settings.ipv6 import Ipv6Settings
from .settings.lowpan import LowpanSettings
from .settings.macsec import MacsecSettings
from .settings.macvlan import MacvlanSettings
from .settings.match import MatchSettings
from .settings.olpc_mesh import OlpcMeshSettings
from .settings.ovs_bridge import OvsBridgeSettings
from .settings.ovs_dpdk import OvsDpdkSettings
from .settings.ovs_external_ids import OvsExternalIdsSettings
from .settings.ovs_interface import OvsInterfaceSettings
from .settings.ovs_patch import OvsPatchSettings
from .settings.ovs_port import OvsPortSettings
from .settings.ppp import PppSettings
from .settings.pppoe import PppoeSettings
from .settings.profile import ConnectionProfile
from .settings.proxy import ProxySettings
from .settings.serial import SerialSettings
from .settings.team import TeamSettings
from .settings.team_port import TeamPortSettings
from .settings.tun import TunSettings
from .settings.user import UserSettings
from .settings.veth import VethSettings
from .settings.vlan import VlanSettings
from .settings.vpn import VpnSettings
from .settings.vrf import VrfSettings
from .settings.vxlan import VxlanSettings
from .settings.wifi_p2p import WifiP2PSettings
from .settings.wimax import WimaxSettings
from .settings.wireguard import WireguardSettings
from .settings.wireless import WirelessSettings
from .settings.wireless_security import WirelessSecuritySettings
from .settings.wpan import WpanSettings
from .types import (
NetworkManagerConnectionProperties,
NetworkManagerSetting,
Expand Down Expand Up @@ -434,56 +385,6 @@
'NetworkManagerDnsManager',
'NetworkManagerSettings',
'WiFiP2PPeer',
# .settings
'AdslSettings',
'BluetoothSettings',
'BondSettings',
'BondPortSettings',
'BridgeSettings',
'BridgePortSettings',
'CdmaSettings',
'ConnectionSettings',
'AddressData', 'RouteData', 'WireguardPeers',
'DcbSettings',
'EthernetSettings',
'GsmSettings',
'HostnameSettings',
'Ieee8021XSettings',
'InfinibandSettings',
'IpTunnelSettings',
'Ipv4Settings',
'Ipv6Settings',
'LowpanSettings',
'MacsecSettings',
'MacvlanSettings',
'MatchSettings',
'OlpcMeshSettings',
'OvsBridgeSettings',
'OvsDpdkSettings',
'OvsExternalIdsSettings',
'OvsInterfaceSettings',
'OvsPatchSettings',
'OvsPortSettings',
'PppSettings',
'PppoeSettings',
'ConnectionProfile',
'ProxySettings',
'SerialSettings',
'TeamSettings',
'TeamPortSettings',
'TunSettings',
'UserSettings',
'VethSettings',
'VlanSettings',
'VpnSettings',
'VrfSettings',
'VxlanSettings',
'WifiP2PSettings',
'WimaxSettings',
'WireguardSettings',
'WirelessSettings',
'WirelessSecuritySettings',
'WpanSettings',
# .types
'NetworkManagerConnectionProperties',
'NetworkManagerSetting',
Expand Down

0 comments on commit e907667

Please sign in to comment.