nmcli 1.3.0__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nmcli-1.3.0 → nmcli-1.5.0}/PKG-INFO +66 -58
- {nmcli-1.3.0 → nmcli-1.5.0}/README.md +65 -57
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_connection.py +6 -3
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/data/device.py +1 -1
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/data/general.py +34 -3
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/dummy/_connection.py +7 -1
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli.egg-info/PKG-INFO +66 -58
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli.egg-info/SOURCES.txt +0 -1
- {nmcli-1.3.0 → nmcli-1.5.0}/setup.py +1 -1
- nmcli-1.3.0/LICENSE.txt +0 -21
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/__init__.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_const.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_device.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_exception.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_general.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_helper.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_networking.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_radio.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/_system.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/data/__init__.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/data/connection.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/data/hotspot.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/data/radio.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/dummy/__init__.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/dummy/_device.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/dummy/_general.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/dummy/_networking.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/dummy/_radio.py +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli/py.typed +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli.egg-info/dependency_links.txt +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/nmcli.egg-info/top_level.txt +0 -0
- {nmcli-1.3.0 → nmcli-1.5.0}/setup.cfg +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nmcli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: A python wrapper library for the network-manager cli client
|
|
5
5
|
Home-page: https://github.com/ushiboy/nmcli
|
|
6
6
|
Author: ushiboy
|
|
7
7
|
License: MIT
|
|
8
|
-
Description: nmcli
|
|
9
|
-
=====
|
|
8
|
+
Description: # nmcli
|
|
10
9
|
|
|
11
10
|
nmcli is a python wrapper library for the network-manager cli client.
|
|
12
11
|
|
|
@@ -38,62 +37,61 @@ Description: nmcli
|
|
|
38
37
|
|
|
39
38
|
## Dependency
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
- NetworkManager
|
|
41
|
+
- `sudo apt install network-manager` (Debian)
|
|
42
|
+
- User who can execute nmcli with sudo with NOPASSWD
|
|
43
|
+
- If sudo is not needed (like root user), use `disable_use_sudo` at the beginning of the process.
|
|
45
44
|
|
|
46
45
|
## Compatibility table
|
|
47
46
|
|
|
48
|
-
| Object
|
|
49
|
-
|
|
50
|
-
| general
|
|
51
|
-
| general
|
|
52
|
-
| general
|
|
53
|
-
| general
|
|
54
|
-
| general
|
|
55
|
-
| networking |
|
|
56
|
-
| networking | on
|
|
57
|
-
| networking | off
|
|
58
|
-
| networking | connectivity | supported
|
|
59
|
-
| radio
|
|
60
|
-
| radio
|
|
61
|
-
| radio
|
|
62
|
-
| radio
|
|
63
|
-
| connection |
|
|
64
|
-
| connection | show
|
|
65
|
-
| connection | up
|
|
66
|
-
| connection | down
|
|
67
|
-
| connection | add
|
|
68
|
-
| connection | modify
|
|
69
|
-
| connection | clone
|
|
70
|
-
| connection | edit
|
|
71
|
-
| connection | delete
|
|
72
|
-
| connection | reload
|
|
73
|
-
| connection | load
|
|
74
|
-
| connection | import
|
|
75
|
-
| connection | export
|
|
76
|
-
| device
|
|
77
|
-
| device
|
|
78
|
-
| device
|
|
79
|
-
| device
|
|
80
|
-
| device
|
|
81
|
-
| device
|
|
82
|
-
| device
|
|
83
|
-
| device
|
|
84
|
-
| device
|
|
85
|
-
| device
|
|
86
|
-
| device
|
|
87
|
-
| device
|
|
88
|
-
| device
|
|
89
|
-
| device
|
|
90
|
-
| device
|
|
91
|
-
| agent
|
|
92
|
-
| agent
|
|
93
|
-
| agent
|
|
94
|
-
| agent
|
|
95
|
-
| monitor
|
|
96
|
-
|
|
47
|
+
| Object | Command | Status |
|
|
48
|
+
| ---------- | ------------ | ------------- |
|
|
49
|
+
| general | | supported |
|
|
50
|
+
| general | status | supported |
|
|
51
|
+
| general | hostname | supported |
|
|
52
|
+
| general | permissions | not supported |
|
|
53
|
+
| general | logging | not supported |
|
|
54
|
+
| networking | | supported |
|
|
55
|
+
| networking | on | supported |
|
|
56
|
+
| networking | off | supported |
|
|
57
|
+
| networking | connectivity | supported |
|
|
58
|
+
| radio | | supported |
|
|
59
|
+
| radio | all | supported |
|
|
60
|
+
| radio | wifi | supported |
|
|
61
|
+
| radio | wwan | supported |
|
|
62
|
+
| connection | | supported |
|
|
63
|
+
| connection | show | supported |
|
|
64
|
+
| connection | up | supported |
|
|
65
|
+
| connection | down | supported |
|
|
66
|
+
| connection | add | supported |
|
|
67
|
+
| connection | modify | supported |
|
|
68
|
+
| connection | clone | not supported |
|
|
69
|
+
| connection | edit | not supported |
|
|
70
|
+
| connection | delete | supported |
|
|
71
|
+
| connection | reload | supported |
|
|
72
|
+
| connection | load | not supported |
|
|
73
|
+
| connection | import | not supported |
|
|
74
|
+
| connection | export | not supported |
|
|
75
|
+
| device | | supported |
|
|
76
|
+
| device | status | supported |
|
|
77
|
+
| device | show | supported |
|
|
78
|
+
| device | set | not supported |
|
|
79
|
+
| device | connect | supported |
|
|
80
|
+
| device | reapply | supported |
|
|
81
|
+
| device | modify | not supported |
|
|
82
|
+
| device | disconnect | supported |
|
|
83
|
+
| device | delete | supported |
|
|
84
|
+
| device | monitor | not supported |
|
|
85
|
+
| device | wifi | supported |
|
|
86
|
+
| device | wifi connect | supported |
|
|
87
|
+
| device | wifi rescan | supported |
|
|
88
|
+
| device | wifi hotspot | supported |
|
|
89
|
+
| device | lldp | not supported |
|
|
90
|
+
| agent | | not supported |
|
|
91
|
+
| agent | secret | not supported |
|
|
92
|
+
| agent | polkit | not supported |
|
|
93
|
+
| agent | all | not supported |
|
|
94
|
+
| monitor | | not supported |
|
|
97
95
|
|
|
98
96
|
## API
|
|
99
97
|
|
|
@@ -162,8 +160,10 @@ Description: nmcli
|
|
|
162
160
|
|
|
163
161
|
Show details for specified connections.
|
|
164
162
|
|
|
163
|
+
Use `show_secrets` argument to reveal associated secrets as well.
|
|
164
|
+
|
|
165
165
|
```
|
|
166
|
-
nmcli.connection.show(name: str) -> ConnectionDetails
|
|
166
|
+
nmcli.connection.show(name: str, show_secrets: bool = False) -> ConnectionDetails
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
#### nmcli.connection.reload
|
|
@@ -246,7 +246,6 @@ Description: nmcli
|
|
|
246
246
|
|
|
247
247
|
The `wait` argument applies the same effect to the command as the `--wait` option. If it is omitted, the default behavior is followed.
|
|
248
248
|
|
|
249
|
-
|
|
250
249
|
```
|
|
251
250
|
nmcli.device.delete(ifname: str, wait: int = None) -> None
|
|
252
251
|
```
|
|
@@ -466,6 +465,15 @@ Description: nmcli
|
|
|
466
465
|
|
|
467
466
|
## Change Log
|
|
468
467
|
|
|
468
|
+
### 1.5.0
|
|
469
|
+
|
|
470
|
+
- Added show_secrets option to `nmcli.connection.show`
|
|
471
|
+
|
|
472
|
+
### 1.4.0
|
|
473
|
+
|
|
474
|
+
- Supported unsupported cases of `DeviceWifi.parse`.
|
|
475
|
+
- Fixed the problem that `nmcli.general` does not work on nmcli client after version 1.48.x.
|
|
476
|
+
|
|
469
477
|
### 1.3.0
|
|
470
478
|
|
|
471
479
|
- Added rescan parameter to `nmcli.device.wifi`.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
nmcli
|
|
2
|
-
=====
|
|
1
|
+
# nmcli
|
|
3
2
|
|
|
4
3
|
nmcli is a python wrapper library for the network-manager cli client.
|
|
5
4
|
|
|
@@ -31,62 +30,61 @@ except Exception as e:
|
|
|
31
30
|
|
|
32
31
|
## Dependency
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
- NetworkManager
|
|
34
|
+
- `sudo apt install network-manager` (Debian)
|
|
35
|
+
- User who can execute nmcli with sudo with NOPASSWD
|
|
36
|
+
- If sudo is not needed (like root user), use `disable_use_sudo` at the beginning of the process.
|
|
38
37
|
|
|
39
38
|
## Compatibility table
|
|
40
39
|
|
|
41
|
-
| Object
|
|
42
|
-
|
|
43
|
-
| general
|
|
44
|
-
| general
|
|
45
|
-
| general
|
|
46
|
-
| general
|
|
47
|
-
| general
|
|
48
|
-
| networking |
|
|
49
|
-
| networking | on
|
|
50
|
-
| networking | off
|
|
51
|
-
| networking | connectivity | supported
|
|
52
|
-
| radio
|
|
53
|
-
| radio
|
|
54
|
-
| radio
|
|
55
|
-
| radio
|
|
56
|
-
| connection |
|
|
57
|
-
| connection | show
|
|
58
|
-
| connection | up
|
|
59
|
-
| connection | down
|
|
60
|
-
| connection | add
|
|
61
|
-
| connection | modify
|
|
62
|
-
| connection | clone
|
|
63
|
-
| connection | edit
|
|
64
|
-
| connection | delete
|
|
65
|
-
| connection | reload
|
|
66
|
-
| connection | load
|
|
67
|
-
| connection | import
|
|
68
|
-
| connection | export
|
|
69
|
-
| device
|
|
70
|
-
| device
|
|
71
|
-
| device
|
|
72
|
-
| device
|
|
73
|
-
| device
|
|
74
|
-
| device
|
|
75
|
-
| device
|
|
76
|
-
| device
|
|
77
|
-
| device
|
|
78
|
-
| device
|
|
79
|
-
| device
|
|
80
|
-
| device
|
|
81
|
-
| device
|
|
82
|
-
| device
|
|
83
|
-
| device
|
|
84
|
-
| agent
|
|
85
|
-
| agent
|
|
86
|
-
| agent
|
|
87
|
-
| agent
|
|
88
|
-
| monitor
|
|
89
|
-
|
|
40
|
+
| Object | Command | Status |
|
|
41
|
+
| ---------- | ------------ | ------------- |
|
|
42
|
+
| general | | supported |
|
|
43
|
+
| general | status | supported |
|
|
44
|
+
| general | hostname | supported |
|
|
45
|
+
| general | permissions | not supported |
|
|
46
|
+
| general | logging | not supported |
|
|
47
|
+
| networking | | supported |
|
|
48
|
+
| networking | on | supported |
|
|
49
|
+
| networking | off | supported |
|
|
50
|
+
| networking | connectivity | supported |
|
|
51
|
+
| radio | | supported |
|
|
52
|
+
| radio | all | supported |
|
|
53
|
+
| radio | wifi | supported |
|
|
54
|
+
| radio | wwan | supported |
|
|
55
|
+
| connection | | supported |
|
|
56
|
+
| connection | show | supported |
|
|
57
|
+
| connection | up | supported |
|
|
58
|
+
| connection | down | supported |
|
|
59
|
+
| connection | add | supported |
|
|
60
|
+
| connection | modify | supported |
|
|
61
|
+
| connection | clone | not supported |
|
|
62
|
+
| connection | edit | not supported |
|
|
63
|
+
| connection | delete | supported |
|
|
64
|
+
| connection | reload | supported |
|
|
65
|
+
| connection | load | not supported |
|
|
66
|
+
| connection | import | not supported |
|
|
67
|
+
| connection | export | not supported |
|
|
68
|
+
| device | | supported |
|
|
69
|
+
| device | status | supported |
|
|
70
|
+
| device | show | supported |
|
|
71
|
+
| device | set | not supported |
|
|
72
|
+
| device | connect | supported |
|
|
73
|
+
| device | reapply | supported |
|
|
74
|
+
| device | modify | not supported |
|
|
75
|
+
| device | disconnect | supported |
|
|
76
|
+
| device | delete | supported |
|
|
77
|
+
| device | monitor | not supported |
|
|
78
|
+
| device | wifi | supported |
|
|
79
|
+
| device | wifi connect | supported |
|
|
80
|
+
| device | wifi rescan | supported |
|
|
81
|
+
| device | wifi hotspot | supported |
|
|
82
|
+
| device | lldp | not supported |
|
|
83
|
+
| agent | | not supported |
|
|
84
|
+
| agent | secret | not supported |
|
|
85
|
+
| agent | polkit | not supported |
|
|
86
|
+
| agent | all | not supported |
|
|
87
|
+
| monitor | | not supported |
|
|
90
88
|
|
|
91
89
|
## API
|
|
92
90
|
|
|
@@ -155,8 +153,10 @@ nmcli.connection.down(name: str, wait: int = None) -> None
|
|
|
155
153
|
|
|
156
154
|
Show details for specified connections.
|
|
157
155
|
|
|
156
|
+
Use `show_secrets` argument to reveal associated secrets as well.
|
|
157
|
+
|
|
158
158
|
```
|
|
159
|
-
nmcli.connection.show(name: str) -> ConnectionDetails
|
|
159
|
+
nmcli.connection.show(name: str, show_secrets: bool = False) -> ConnectionDetails
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
#### nmcli.connection.reload
|
|
@@ -239,7 +239,6 @@ Delete the software devices.
|
|
|
239
239
|
|
|
240
240
|
The `wait` argument applies the same effect to the command as the `--wait` option. If it is omitted, the default behavior is followed.
|
|
241
241
|
|
|
242
|
-
|
|
243
242
|
```
|
|
244
243
|
nmcli.device.delete(ifname: str, wait: int = None) -> None
|
|
245
244
|
```
|
|
@@ -459,6 +458,15 @@ nmcli.set_lang(lang: str) -> None
|
|
|
459
458
|
|
|
460
459
|
## Change Log
|
|
461
460
|
|
|
461
|
+
### 1.5.0
|
|
462
|
+
|
|
463
|
+
- Added show_secrets option to `nmcli.connection.show`
|
|
464
|
+
|
|
465
|
+
### 1.4.0
|
|
466
|
+
|
|
467
|
+
- Supported unsupported cases of `DeviceWifi.parse`.
|
|
468
|
+
- Fixed the problem that `nmcli.general` does not work on nmcli client after version 1.48.x.
|
|
469
|
+
|
|
462
470
|
### 1.3.0
|
|
463
471
|
|
|
464
472
|
- Added rescan parameter to `nmcli.device.wifi`.
|
|
@@ -31,7 +31,7 @@ class ConnectionControlInterface:
|
|
|
31
31
|
def down(self, name: str, wait: int = None) -> None:
|
|
32
32
|
raise NotImplementedError
|
|
33
33
|
|
|
34
|
-
def show(self, name: str) -> ConnectionDetails:
|
|
34
|
+
def show(self, name: str, show_secrets: bool = False) -> ConnectionDetails:
|
|
35
35
|
raise NotImplementedError
|
|
36
36
|
|
|
37
37
|
def reload(self) -> None:
|
|
@@ -88,8 +88,11 @@ class ConnectionControl(ConnectionControlInterface):
|
|
|
88
88
|
wait) + ['connection', 'down', name]
|
|
89
89
|
self._syscmd.nmcli(cmd)
|
|
90
90
|
|
|
91
|
-
def show(self, name: str) -> ConnectionDetails:
|
|
92
|
-
|
|
91
|
+
def show(self, name: str, show_secrets: bool = False) -> ConnectionDetails:
|
|
92
|
+
cmd = ['connection', 'show', name]
|
|
93
|
+
if show_secrets:
|
|
94
|
+
cmd += ["--show-secrets"]
|
|
95
|
+
r = self._syscmd.nmcli(cmd)
|
|
93
96
|
results = {}
|
|
94
97
|
for row in r.split('\n'):
|
|
95
98
|
m = re.search(r'^(\S+):\s*([\S\s]+)\s*', row)
|
|
@@ -64,7 +64,7 @@ class DeviceWifi:
|
|
|
64
64
|
t = text.replace("\\:", "\uFFFE").replace(
|
|
65
65
|
":", "\uFFFF").replace("\uFFFE", ":")
|
|
66
66
|
m = re.search(
|
|
67
|
-
r'^(\*|\s)\uFFFF(.*)\uFFFF(.*)\uFFFF(.*)\uFFFF(\d+)\uFFFF(\d+)\sMHz\uFFFF(\d+)\
|
|
67
|
+
r'^(\*|\s)\uFFFF(.*)\uFFFF(.*)\uFFFF(.*)\uFFFF(\d+)\uFFFF(\d+)\sMHz\uFFFF(\d+)\s(?:Mb|Mbit)\/s\uFFFF(\d+)\uFFFF(.*)$', t)
|
|
68
68
|
if m:
|
|
69
69
|
in_use, ssid, bssid, mode, chan, freq, rate, signal, security = m.groups()
|
|
70
70
|
return DeviceWifi(in_use == '*', ssid, bssid, mode,
|
|
@@ -25,12 +25,43 @@ class General:
|
|
|
25
25
|
'wwan': self.wwan
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
# case 1:
|
|
29
|
+
# STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN METERED
|
|
30
|
+
# connected full enabled enabled missing enabled no (guessed)
|
|
31
|
+
#
|
|
32
|
+
# case 2:
|
|
33
|
+
# unknown none enabled enabled enabled disabled
|
|
34
|
+
#
|
|
35
|
+
# case 3:
|
|
36
|
+
# connected (local only) full disabled enabled enabled enabled
|
|
37
|
+
#
|
|
38
|
+
# see: https://regex101.com/r/zW1hHE/1
|
|
39
|
+
|
|
28
40
|
@classmethod
|
|
29
41
|
def parse(cls, text: str) -> General:
|
|
30
|
-
|
|
31
|
-
r'^
|
|
42
|
+
pattern = (
|
|
43
|
+
r'^'
|
|
44
|
+
+ r'(?P<state>.+)'
|
|
45
|
+
+ r' '
|
|
46
|
+
+ r'(?P<connectivity>\S+)'
|
|
47
|
+
+ r'\s+'
|
|
48
|
+
+ r'(?P<wifi_hw>\S+)'
|
|
49
|
+
+ r' '
|
|
50
|
+
+ r'(?P<wifi>\S+)'
|
|
51
|
+
+ r' '
|
|
52
|
+
+ r'(?P<wwan_hw>\S+)'
|
|
53
|
+
+ r' '
|
|
54
|
+
+ r'(?P<wwan>\S+)'
|
|
55
|
+
+ r'(?: (?P<metered>.+)?)?'
|
|
56
|
+
+ r'$'
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# The execution result will have a trailing space,
|
|
60
|
+
# so trim it and then match it to the pattern.
|
|
61
|
+
m = re.search(pattern, text.rstrip())
|
|
62
|
+
|
|
32
63
|
if m:
|
|
33
|
-
state, connectivity, wifi_hw, wifi, wwan_hw, wwan = m.groups()
|
|
64
|
+
state, connectivity, wifi_hw, wifi, wwan_hw, wwan, _metered = m.groups()
|
|
34
65
|
return General(NetworkManagerState(state),
|
|
35
66
|
NetworkConnectivity(connectivity),
|
|
36
67
|
wifi_hw == 'enabled',
|
|
@@ -27,6 +27,10 @@ class DummyConnectionControl(ConnectionControlInterface):
|
|
|
27
27
|
def down_args(self):
|
|
28
28
|
return self._down_args
|
|
29
29
|
|
|
30
|
+
@property
|
|
31
|
+
def show_args(self):
|
|
32
|
+
return self._show_args
|
|
33
|
+
|
|
30
34
|
@property
|
|
31
35
|
def called_reload(self) -> int:
|
|
32
36
|
return self._called_reload
|
|
@@ -43,6 +47,7 @@ class DummyConnectionControl(ConnectionControlInterface):
|
|
|
43
47
|
self._delete_args: List[Tuple] = []
|
|
44
48
|
self._up_args: List[Tuple] = []
|
|
45
49
|
self._down_args: List[Tuple] = []
|
|
50
|
+
self._show_args: List[Tuple] = []
|
|
46
51
|
self._called_reload = 0
|
|
47
52
|
|
|
48
53
|
def __call__(self) -> List[Connection]:
|
|
@@ -74,8 +79,9 @@ class DummyConnectionControl(ConnectionControlInterface):
|
|
|
74
79
|
self._raise_error_if_needed()
|
|
75
80
|
self._down_args.append((name, wait))
|
|
76
81
|
|
|
77
|
-
def show(self, name: str) -> ConnectionDetails:
|
|
82
|
+
def show(self, name: str, show_secrets: bool = False) -> ConnectionDetails:
|
|
78
83
|
self._raise_error_if_needed()
|
|
84
|
+
self._show_args.append((name, show_secrets))
|
|
79
85
|
if not self._result_show is None:
|
|
80
86
|
return self._result_show
|
|
81
87
|
raise ValueError("'result_show' is not properly initialized")
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nmcli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: A python wrapper library for the network-manager cli client
|
|
5
5
|
Home-page: https://github.com/ushiboy/nmcli
|
|
6
6
|
Author: ushiboy
|
|
7
7
|
License: MIT
|
|
8
|
-
Description: nmcli
|
|
9
|
-
=====
|
|
8
|
+
Description: # nmcli
|
|
10
9
|
|
|
11
10
|
nmcli is a python wrapper library for the network-manager cli client.
|
|
12
11
|
|
|
@@ -38,62 +37,61 @@ Description: nmcli
|
|
|
38
37
|
|
|
39
38
|
## Dependency
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
- NetworkManager
|
|
41
|
+
- `sudo apt install network-manager` (Debian)
|
|
42
|
+
- User who can execute nmcli with sudo with NOPASSWD
|
|
43
|
+
- If sudo is not needed (like root user), use `disable_use_sudo` at the beginning of the process.
|
|
45
44
|
|
|
46
45
|
## Compatibility table
|
|
47
46
|
|
|
48
|
-
| Object
|
|
49
|
-
|
|
50
|
-
| general
|
|
51
|
-
| general
|
|
52
|
-
| general
|
|
53
|
-
| general
|
|
54
|
-
| general
|
|
55
|
-
| networking |
|
|
56
|
-
| networking | on
|
|
57
|
-
| networking | off
|
|
58
|
-
| networking | connectivity | supported
|
|
59
|
-
| radio
|
|
60
|
-
| radio
|
|
61
|
-
| radio
|
|
62
|
-
| radio
|
|
63
|
-
| connection |
|
|
64
|
-
| connection | show
|
|
65
|
-
| connection | up
|
|
66
|
-
| connection | down
|
|
67
|
-
| connection | add
|
|
68
|
-
| connection | modify
|
|
69
|
-
| connection | clone
|
|
70
|
-
| connection | edit
|
|
71
|
-
| connection | delete
|
|
72
|
-
| connection | reload
|
|
73
|
-
| connection | load
|
|
74
|
-
| connection | import
|
|
75
|
-
| connection | export
|
|
76
|
-
| device
|
|
77
|
-
| device
|
|
78
|
-
| device
|
|
79
|
-
| device
|
|
80
|
-
| device
|
|
81
|
-
| device
|
|
82
|
-
| device
|
|
83
|
-
| device
|
|
84
|
-
| device
|
|
85
|
-
| device
|
|
86
|
-
| device
|
|
87
|
-
| device
|
|
88
|
-
| device
|
|
89
|
-
| device
|
|
90
|
-
| device
|
|
91
|
-
| agent
|
|
92
|
-
| agent
|
|
93
|
-
| agent
|
|
94
|
-
| agent
|
|
95
|
-
| monitor
|
|
96
|
-
|
|
47
|
+
| Object | Command | Status |
|
|
48
|
+
| ---------- | ------------ | ------------- |
|
|
49
|
+
| general | | supported |
|
|
50
|
+
| general | status | supported |
|
|
51
|
+
| general | hostname | supported |
|
|
52
|
+
| general | permissions | not supported |
|
|
53
|
+
| general | logging | not supported |
|
|
54
|
+
| networking | | supported |
|
|
55
|
+
| networking | on | supported |
|
|
56
|
+
| networking | off | supported |
|
|
57
|
+
| networking | connectivity | supported |
|
|
58
|
+
| radio | | supported |
|
|
59
|
+
| radio | all | supported |
|
|
60
|
+
| radio | wifi | supported |
|
|
61
|
+
| radio | wwan | supported |
|
|
62
|
+
| connection | | supported |
|
|
63
|
+
| connection | show | supported |
|
|
64
|
+
| connection | up | supported |
|
|
65
|
+
| connection | down | supported |
|
|
66
|
+
| connection | add | supported |
|
|
67
|
+
| connection | modify | supported |
|
|
68
|
+
| connection | clone | not supported |
|
|
69
|
+
| connection | edit | not supported |
|
|
70
|
+
| connection | delete | supported |
|
|
71
|
+
| connection | reload | supported |
|
|
72
|
+
| connection | load | not supported |
|
|
73
|
+
| connection | import | not supported |
|
|
74
|
+
| connection | export | not supported |
|
|
75
|
+
| device | | supported |
|
|
76
|
+
| device | status | supported |
|
|
77
|
+
| device | show | supported |
|
|
78
|
+
| device | set | not supported |
|
|
79
|
+
| device | connect | supported |
|
|
80
|
+
| device | reapply | supported |
|
|
81
|
+
| device | modify | not supported |
|
|
82
|
+
| device | disconnect | supported |
|
|
83
|
+
| device | delete | supported |
|
|
84
|
+
| device | monitor | not supported |
|
|
85
|
+
| device | wifi | supported |
|
|
86
|
+
| device | wifi connect | supported |
|
|
87
|
+
| device | wifi rescan | supported |
|
|
88
|
+
| device | wifi hotspot | supported |
|
|
89
|
+
| device | lldp | not supported |
|
|
90
|
+
| agent | | not supported |
|
|
91
|
+
| agent | secret | not supported |
|
|
92
|
+
| agent | polkit | not supported |
|
|
93
|
+
| agent | all | not supported |
|
|
94
|
+
| monitor | | not supported |
|
|
97
95
|
|
|
98
96
|
## API
|
|
99
97
|
|
|
@@ -162,8 +160,10 @@ Description: nmcli
|
|
|
162
160
|
|
|
163
161
|
Show details for specified connections.
|
|
164
162
|
|
|
163
|
+
Use `show_secrets` argument to reveal associated secrets as well.
|
|
164
|
+
|
|
165
165
|
```
|
|
166
|
-
nmcli.connection.show(name: str) -> ConnectionDetails
|
|
166
|
+
nmcli.connection.show(name: str, show_secrets: bool = False) -> ConnectionDetails
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
#### nmcli.connection.reload
|
|
@@ -246,7 +246,6 @@ Description: nmcli
|
|
|
246
246
|
|
|
247
247
|
The `wait` argument applies the same effect to the command as the `--wait` option. If it is omitted, the default behavior is followed.
|
|
248
248
|
|
|
249
|
-
|
|
250
249
|
```
|
|
251
250
|
nmcli.device.delete(ifname: str, wait: int = None) -> None
|
|
252
251
|
```
|
|
@@ -466,6 +465,15 @@ Description: nmcli
|
|
|
466
465
|
|
|
467
466
|
## Change Log
|
|
468
467
|
|
|
468
|
+
### 1.5.0
|
|
469
|
+
|
|
470
|
+
- Added show_secrets option to `nmcli.connection.show`
|
|
471
|
+
|
|
472
|
+
### 1.4.0
|
|
473
|
+
|
|
474
|
+
- Supported unsupported cases of `DeviceWifi.parse`.
|
|
475
|
+
- Fixed the problem that `nmcli.general` does not work on nmcli client after version 1.48.x.
|
|
476
|
+
|
|
469
477
|
### 1.3.0
|
|
470
478
|
|
|
471
479
|
- Added rescan parameter to `nmcli.device.wifi`.
|
nmcli-1.3.0/LICENSE.txt
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 ushiboy
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|