summaryrefslogtreecommitdiff
path: root/examples/python/dbus
Commit message (Collapse)AuthorAgeFilesLines
* feat: add example for wifi sae connectionliaohanqin2022-06-161-0/+36
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1247
* docs: update URL for latest online documentationThomas Haller2021-09-246-6/+6
|
* python: remove unused importsThomas Haller2021-05-271-1/+2
| | | | | They are flagged by lgtm.com. Avoid the warning by dropping unused includes.
* examples: drop confusing UID handling in "vpn.py" exampleThomas Haller2021-05-271-8/+0
| | | | | | | | | | | | | | | | First of all, the "os.setuid()" call is never reached. lgtm.com warns about that, and warnings are annoying because they require investigation. This code is only in the example, so that the user would understand that they should edit the source and set the desired UID. But you can only call setuid() if you have CAP_SETUID, so commonly this anyway doesn't work -- unless you are root already, and then you actually don't need it either. Let's drop this code from the example. Maybe this example really should be dropped. Does the "dbus" python module even still work? Doesn't for me...
* examples: fix usage of input() with Python2Thomas Haller2021-05-261-0/+6
| | | | | | | | | | | | input() in Python2 evaluated the string and was thus unsafe. On Python2, the right choice is raw_input. In Python3, input does what raw_input did. Work around this. The main "problem" is that lgtm.com flags this as error. The fix in the example is not important, but getting a low number of warnings is.
* examples: avoid deprecated PropertiesChanged signal in "create-bond.py" exampleThomas Haller2021-05-141-7/+11
|
* examples: minor bugfix comparing device state in "python/dbus/show-bssids.py"Thomas Haller2021-01-261-1/+1
|
* examples: add comment about scanning to "python/dbus/show-bssids.py" exampleThomas Haller2021-01-181-0/+5
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/630
* all: update deprecated SPDX license identifiersThomas Haller2021-01-0518-18/+18
| | | | | | | | | | | | | | | | These SPDX license identifiers are deprecated ([1]). Update them. [1] https://spdx.org/licenses/ sed \ -e '1 s%^/\* SPDX-License-Identifier: \(GPL-2.0\|LGPL-2.1\)+ \*/$%/* SPDX-License-Identifier: \1-or-later */%' \ -e '1,2 s%^\(--\|#\|//\) SPDX-License-Identifier: \(GPL-2.0\|LGPL-2.1\)+$%\1 SPDX-License-Identifier: \2-or-later%' \ -i \ $(git grep -l SPDX-License-Identifier -- \ ':(exclude)shared/c-*/' \ ':(exclude)shared/n-*/' \ ':(exclude)shared/systemd/src' \ ':(exclude)src/systemd/src')
* Correct python black rulesFrederic Martinsons2020-10-291-2/+2
| | | | Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
* all: changes from python 2 syntax to python3 and removing dead codeSayed Shah2020-08-0315-120/+70
| | | | | | | There were python 2 methods that are not used anymore so now it's in python 3. Added helper fuctions so that the code is more clear https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/540
* all: reformat python files with python blackSayed Shah2020-06-1518-344/+468
| | | | | | Part of !537. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/537
* examples: remove unused code from "examples/python/dbus/vpn.py"Thomas Haller2020-05-071-1/+0
| | | | | lgtm.com says "The value assigned to local variable all_connections is never used". Just drop the entire statement. It's not right there.
* examples: avoid "x == None" checks in python examplesThomas Haller2020-05-071-1/+1
| | | | lgmt.com says "Testing for None should use the is operator".
* examples: remove unused imports from python examplesThomas Haller2020-05-073-3/+3
|
* examples: fix copy/paste comment error from another scriptDavid Drinn2020-04-111-1/+1
| | | | https://github.com/NetworkManager/NetworkManager/pull/361
* all: SPDX header conversionLubomir Rintel2019-09-1018-252/+18
| | | | | $ find * -type f |xargs perl contrib/scripts/spdx.pl $ git rm contrib/scripts/spdx.pl
* all: drop emacs file variables from source filesThomas Haller2019-06-116-6/+0
| | | | | | | | | | | | | | | | | | | | | | We no longer add these. If you use Emacs, configure it yourself. Also, due to our "smart-tab" usage the editor anyway does a subpar job handling our tabs. However, on the upside every user can choose whatever tab-width he/she prefers. If "smart-tabs" are used properly (like we do), every tab-width will work. No manual changes, just ran commands: F=($(git grep -l -e '-\*-')) sed '1 { /\/\* *-\*- *[mM]ode.*\*\/$/d }' -i "${F[@]}" sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}" Check remaining lines with: git grep -e '-\*-' The ultimate purpose of this is to cleanup our files and eventually use SPDX license identifiers. For that, first get rid of the boilerplate lines.
* all: say Wi-Fi instead of "wifi" or "WiFi"Lubomir Rintel2018-11-292-2/+2
| | | | | | | | Correct the spelling across the *entire* tree, including translations, comments, etc. It's easier that way. Even the places where it's not exposed to the user, such as tests, so that we learn how is it spelled correctly.
* docs: misc. typosluz.paz2018-09-151-1/+1
| | | | | | Found via `codespell -q 3 --skip="*.po"` https://github.com/NetworkManager/NetworkManager/pull/203
* all: drop trailing spacesThomas Haller2018-02-073-4/+4
|
* all: replace non-leading tabs with spacesThomas Haller2018-02-071-1/+1
| | | | | | We commonly only allow tabs at the beginning of a line, not afterwards. The reason for this style is so that the code looks formated right with tabstop=4 and tabstop=8.
* python: make dbus, gi examples, and debug-helper.py python3 readyYifan J2017-12-0416-65/+65
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=791121
* build: merge "examples/Makefile.am" into toplevel Makefileth/non-recursive-make-bgo772985Thomas Haller2016-10-211-18/+0
|
* checkpoint: make python example accept multiple devices and timeoutBeniamino Galvani2016-09-261-22/+34
| | | | | Add a timeout parameter and allow passing multiple interfaces to make the script more useful for testing purposes.
* checkpoint: add python D-Bus exampleBeniamino Galvani2016-08-171-0/+63
|
* docs: replace spec.html with docbook D-Bus API referenceLubomir Rintel2016-03-261-1/+1
| | | | | | May use a lot of improvement (actually documenting the names and objects that use the interfaces in question), but at least this looks a lot better on developer.gnome.org.
* Fix missing commas in list-devices devtypes dict.Adrian Likins2016-03-021-5/+5
|
* device: add new NMDeviceType NM_DEVICE_TYPE_VETHThomas Haller2016-02-231-0/+1
| | | | Based-on-patch-by: Jiří Klimeš <jklimes@redhat.com>
* examples: add missing device-types to examplesThomas Haller2016-02-231-0/+4
| | | | Based-on-patch-by: Jiří Klimeš <jklimes@redhat.com>
* examples: generate UUID in add-wifi-eap-connection.pyJiří Klimeš2015-09-171-2/+2
| | | | so that it can be run multiple times.
* examples: add a python example for adding WPA PSK Wi-Fi connectionJiří Klimeš2015-09-173-1/+58
| | | | and rename add-system-wifi-connection.py to add-wifi-eap-connection.py
* examples: add python+dbus example to print active access pointDan Williams2015-07-082-1/+68
|
* examples: python: add an D-Bus example creating and activating a bondJiří Klimeš2015-06-232-1/+116
|
* examples: add wifi-hotspot.py script to Makefile.amJiří Klimeš2015-06-231-1/+2
| | | | Fixes: 1af8e2f132f64a9f3c012a57f4b67422ccf62ad5
* examples: add DBus + Python example for starting/stopping a WiFi hotspotDan Williams2015-05-181-0/+112
|
* examples: update Python NM example to print detailed connection stateSrdjan Grubor2015-03-121-6/+19
| | | | | | | Current Python NM example has a very crude connection state output and the global NM connectivity is not used in them either. https://bugzilla.gnome.org/show_bug.cgi?id=746045
* examples: python: print into stderrPetr Vorel2015-03-101-1/+1
| | | | | | https://mail.gnome.org/archives/networkmanager-list/2015-March/msg00024.html Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
* examples/trvial: replace tabs by whitespace in python exampleThomas Haller2015-03-101-2/+2
|
* examples: update python examplesDan Winship2014-11-155-44/+136
| | | | | | | | | | Update the raw D-Bus python examples to use newer APIs where appropriate (and split the add-connection example into 1.0-only and 0.9-compatible versions). Update the gi-based python examples for the various API changes since they were last updated. Also add a comment to the ruby add-connection example pointing out that it's still using the old settings APIs.
* test,examples: fix scripts to avoid 'has_key' for Python 3Thomas Haller2014-10-311-1/+1
| | | | | | 'has_key' on Dictionaries is removed from Python3 in favor of 'in'. Signed-off-by: Thomas Haller <thaller@redhat.com>
* examples: add Python dbus example indicating if WWAN is the default connectionDan Williams2014-06-202-1/+80
|
* examples: add Python D-Bus and GI examples for updating IPv4 setting methodDan Williams2014-06-102-1/+84
|
* examples: fix Makefile.am to include all Python examples for distributionJiří Klimeš2014-03-071-1/+1
|
* examples: also print type of active connectionsJiří Klimeš2014-03-031-1/+1
|
* docs: update documentation linksWilliam Jon McCann2013-12-171-1/+1
| | | | Various GNOME services moved around so links need updating.
* examples: update examples for new device typesJiří Klimeš2013-11-291-1/+6
|
* examples: group python examples - dbus vs. giJiří Klimeš2013-09-2411-0/+867
Move examples using dbus-python ('dbus' module) and GObject introspection into their own directories.