Thomas Haller
8388f4ea1d
examples: add python/gi example nm-connection-update-stable-id.py
...
The example script touches the stable-id of a connection.
It does so blocking autoconnect, and was originally written
to test that functionality.
2017-12-05 19:57:24 +01:00
Yifan J
797d9c4403
python: make dbus, gi examples, and debug-helper.py python3 ready
...
https://bugzilla.gnome.org/show_bug.cgi?id=791121
2017-12-04 11:21:40 +01:00
Beniamino Galvani
77d3b1555e
examples: add checkpoint example using python gobject-introspection
2017-11-09 10:12:30 +01:00
Thomas Haller
f4458dd157
examples: add python example using VPN import code
...
Show how to load and use the VPN plugins from python.
2017-11-06 18:37:05 +01:00
Thomas Haller
adcbcb15e5
examples: add setting-user-data.py
...
Add an example python script to show and set setting's
user-data. This is useful, as nmcli still doesn't support
user data.
(cherry picked from commit 447c766f52
)
2017-05-06 14:53:09 +02:00
Beniamino Galvani
8af465d579
examples: add DNS example with python and GObject introspection
2016-12-12 22:06:24 +01:00
Thomas Haller
2837da9b30
examples/python: fix "import gi" in example
...
Otherwise there is a warning:
from gi.repository import GLib, NM
__main__:1: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version(NM, 1.0) before import to ensure that the right version gets loaded.
2016-11-16 11:50:30 +01:00
Thomas Haller
351851cf27
build: merge "examples/Makefile.am" into toplevel Makefile
2016-10-21 17:37:57 +02:00
Beniamino Galvani
1ab616b59c
checkpoint: make python example accept multiple devices and timeout
...
Add a timeout parameter and allow passing multiple interfaces to make
the script more useful for testing purposes.
2016-09-26 15:10:39 +02:00
Beniamino Galvani
048801add3
checkpoint: add python D-Bus example
2016-08-17 14:55:34 +02:00
Lubomir Rintel
3a2803b42c
docs: replace spec.html with docbook D-Bus API reference
...
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.
2016-03-26 11:28:19 +01:00
Adrian Likins
6c59443ad5
Fix missing commas in list-devices devtypes dict.
2016-03-02 18:43:28 +01:00
Thomas Haller
1b00009169
device: add new NMDeviceType NM_DEVICE_TYPE_VETH
...
Based-on-patch-by: Jiří Klimeš <jklimes@redhat.com >
2016-02-23 23:15:37 +01:00
Thomas Haller
71962881a8
examples: add missing device-types to examples
...
Based-on-patch-by: Jiří Klimeš <jklimes@redhat.com >
2016-02-23 15:24:39 +01:00
Thomas Haller
14bb9419a0
examples: add README for python-networkmanager NetworkManager library
2015-12-07 16:06:46 +01:00
Thomas Haller
5b732c3b9f
examples: add README for examples/python/gi
2015-12-07 15:59:20 +01:00
Dan Williams
4db851f852
libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices property
...
Mirror new NetworkManager API to return both real devices and
device placeholders.
2015-12-04 12:16:41 +01:00
Thomas Haller
8d1233e67e
python: use gi.require_version() in generate-setting-docs.py and examples
...
gi now emits a warning when not loading a specific library
version [1]:
./generate-setting-docs.py:21: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version(NM, 1.0) before import to ensure that the right version gets loaded.
from gi.repository import NM, GObject
Seems require_version() is reasonably old to just always use it without
breaking on older versions [2].
[1] Related: https://bugzilla.gnome.org/show_bug.cgi?id=727379
[2] https://git.gnome.org/browse/pygobject/commit/?id=76758efb6579752237a0dc4d56cf9518de6c6e55
2015-11-11 10:56:05 +01:00
Beniamino Galvani
bd4df767c6
examples: add python GI example for retrieving LLDP neighbors
2015-10-12 14:44:31 +02:00
Jiří Klimeš
8e3ae81566
examples: generate UUID in add-wifi-eap-connection.py
...
so that it can be run multiple times.
2015-09-17 14:49:04 +02:00
Jiří Klimeš
a25bbde641
examples: add a python example for adding WPA PSK Wi-Fi connection
...
and rename add-system-wifi-connection.py to add-wifi-eap-connection.py
2015-09-17 14:46:19 +02:00
Jiří Klimeš
cb64067b7a
examples: add flags and mode parsing to show-wifi-networks.[lua|py]
2015-08-24 12:33:04 +02:00
Dan Williams
d1d048c93d
examples: add python+dbus example to print active access point
2015-07-08 09:31:22 -05:00
Jiří Klimeš
eebfe56a90
examples: python: add an D-Bus example creating and activating a bond
2015-06-23 15:06:31 +02:00
Jiří Klimeš
1e923cb923
examples: add wifi-hotspot.py script to Makefile.am
...
Fixes: 1af8e2f132
2015-06-23 15:04:43 +02:00
Dan Williams
1af8e2f132
examples: add DBus + Python example for starting/stopping a WiFi hotspot
2015-05-18 15:11:12 -05:00
Srdjan Grubor
0e1fe1fe4e
examples: update Python NM example to print detailed connection state
...
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
2015-03-12 10:39:00 +01:00
Petr Vorel
4213c17b44
examples: python: print into stderr
...
https://mail.gnome.org/archives/networkmanager-list/2015-March/msg00024.html
Signed-off-by: Petr Vorel <petr.vorel@gmail.com >
2015-03-10 12:17:59 +01:00
Thomas Haller
2171084378
examples/trvial: replace tabs by whitespace in python example
2015-03-10 12:17:23 +01:00
Jiří Klimeš
6b5de0ab5f
examples: add a Python example deactivating connections by type (bgo #732826 )
...
https://bugzilla.gnome.org/show_bug.cgi?id=732826
2015-03-05 15:59:52 +01:00
Dan Winship
66936decfa
examples: update python examples
...
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.
2014-11-15 09:31:49 -05:00
Thomas Haller
0923769285
test,examples: fix scripts to avoid 'has_key' for Python 3
...
'has_key' on Dictionaries is removed from Python3 in favor of 'in'.
Signed-off-by: Thomas Haller <thaller@redhat.com >
2014-10-31 16:39:00 +01:00
Jiří Klimeš
85909d080f
examples: fix python GI examples to work after libnm changes
2014-09-05 13:48:56 +02:00
Dan Winship
258e74eb0c
libnm: make the the use of GInitable mandatory
...
Remove _nm_object_ensure_inited(), etc; objects that implement
GInitable are now mandatory-to-init().
Remove constructor() implementations that sometimes return NULL; do
all the relevant checking in init() instead.
Make nm_client_new() and nm_remote_settings_new() take a GCancellable
and a GError**.
2014-08-01 14:34:40 -04:00
Dan Winship
a7c4d53d03
all: port everything to libnm
...
Since the API has not changed at this point, this is mostly just a
matter of updating Makefiles, and changing references to the library
name in comments.
NetworkManager cannot link to libnm due to the duplicated type/symbol
names. So it links to libnm-core.la directly, which means that
NetworkManager gets a separate copy of that code from libnm.so.
Everything else links to libnm.
2014-08-01 14:34:05 -04:00
Dan Williams
5a4e42bc51
examples: add Python dbus example indicating if WWAN is the default connection
2014-06-20 10:54:03 -05:00
Dan Williams
e8fb3864d1
examples: add Python D-Bus and GI examples for updating IPv4 setting method
2014-06-10 16:20:35 -05:00
Jiří Klimeš
524658f8a3
examples: fix Makefile.am to include all Python examples for distribution
2014-03-07 19:54:49 +01:00
Jiří Klimeš
3e44e7a9f8
example: simplify get-active-connections.py by using ID and Type properties
2014-03-05 16:17:13 +01:00
Jiří Klimeš
550ce1e631
examples: add a GOI Python example for getting active connections
2014-03-03 15:15:08 +01:00
Jiří Klimeš
f24eee5ee3
examples: also print type of active connections
2014-03-03 14:28:51 +01:00
Jiří Klimeš
d96d242bc6
examples: a Python GOI example for adding connections persistent vs. not saved
2014-01-24 12:24:01 +01:00
Jiří Klimeš
85272df6eb
examples: update get_ips.py python example for DNS information
2014-01-23 12:56:45 +01:00
Jiří Klimeš
68fe50ff3a
examples: add an python example (using GI) getting device IPs
2014-01-16 17:37:16 +01:00
William Jon McCann
74372f9f11
docs: update documentation links
...
Various GNOME services moved around so links need updating.
2013-12-17 12:07:51 -06:00
Jiří Klimeš
aa54604f59
examples: update examples for new device types
2013-11-29 09:29:56 +01:00
Jiří Klimeš
f820fbeeb3
examples: add an python example (using GI) showing Wi-Fi networks
2013-09-26 16:30:23 +02:00
Jiri Popelka
a20fd994f4
examples: use GLib.MainLoop instead of deprecated GObject.MainLoop in python
...
jklimes:
made the change for new firewall-zone.py example as well.
2013-09-24 13:33:37 +02:00
Jiří Klimeš
8a04ab9135
examples: group python examples - dbus vs. gi
...
Move examples using dbus-python ('dbus' module) and GObject introspection into
their own directories.
2013-09-24 12:52:33 +02:00
Jiří Klimeš
217cb5fbca
examples: add a python example getting/setting zone property using GI
2013-09-24 12:48:55 +02:00