<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git, branch bg/cli-remove-setting</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>cli: support setting removal</title>
<updated>2020-03-23T10:38:50+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2020-03-15T08:37:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0f2a103bd03a90e21f8e202c8316ab175bd20d40'/>
<id>0f2a103bd03a90e21f8e202c8316ab175bd20d40</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm-core: slightly improve sriov setting documentation</title>
<updated>2020-03-23T10:38:50+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2020-03-15T08:49:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=181589341d9d246ea0b16b18f4e8472411f24a27'/>
<id>181589341d9d246ea0b16b18f4e8472411f24a27</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm-core: remove trailing dot from setting description</title>
<updated>2020-03-23T10:30:38+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2020-03-10T10:47:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=aa12bb4fa40f65c8b4ab0bcbbdce0e9be15d0a6a'/>
<id>aa12bb4fa40f65c8b4ab0bcbbdce0e9be15d0a6a</id>
<content type='text'>
The trailing dot is already added when generating the man page.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The trailing dot is already added when generating the man page.
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: merge branch 'th/libnm-dbus-async-calls'</title>
<updated>2020-03-23T08:47:17+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-23T08:47:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c50b4621d4415f9156e969a6a05fb37e1bb02e18'/>
<id>c50b4621d4415f9156e969a6a05fb37e1bb02e18</id>
<content type='text'>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/439
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/439
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: enable macros for marking sync libnm methods as deprecated</title>
<updated>2020-03-23T08:38:24+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-15T14:24:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=431c349b473d01351f0cc9e413405eac1bf04624'/>
<id>431c349b473d01351f0cc9e413405eac1bf04624</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: drop unused code</title>
<updated>2020-03-23T08:38:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-15T14:26:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7c2bcd4bc9453b4d8bbe8e13bb889efea8018949'/>
<id>7c2bcd4bc9453b4d8bbe8e13bb889efea8018949</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: use async method D-Bus for `nmcli radio wifi on|off`</title>
<updated>2020-03-23T08:38:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-14T07:49:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=42edeb62a336a5165770f3d4b301cf1e8fbe636f'/>
<id>42edeb62a336a5165770f3d4b301cf1e8fbe636f</id>
<content type='text'>
Showcase nm_client_dbus_set_property().

Thereby, also print error messages and return an error if
the command fails.

Also, enable PolicyKit authentication (although, I think there are
some bugs with this still).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Showcase nm_client_dbus_set_property().

Thereby, also print error messages and return an error if
the command fails.

Also, enable PolicyKit authentication (although, I think there are
some bugs with this still).
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: use async method D-Bus for `nmcli networking on|off`</title>
<updated>2020-03-23T08:37:53+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-14T07:49:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c6c15c2c2500961f0561785cad1c5dbf5970a198'/>
<id>c6c15c2c2500961f0561785cad1c5dbf5970a198</id>
<content type='text'>
Previously, we would call the synchronous nm_client_networking_set_enabled()
method. There were 3 problems:

1) nmcli ignored the return value, that means, if the request failed with
  access denied it would just silently pretend that it succeeded.

2) nmcli first called nmc_start_polkit_agent_start_try(), but when
  invoking the synchronous method, the main context is busy and a
  polkit request cannot possibly be handled.

3) nm_client_networking_set_enabled() is deprecated.

Fix all of these, by calling the D-Bus method directly.

Policykit authentication requests are only handled partly. There
seems to be an unrelated race/bug. Now it works sometimes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we would call the synchronous nm_client_networking_set_enabled()
method. There were 3 problems:

1) nmcli ignored the return value, that means, if the request failed with
  access denied it would just silently pretend that it succeeded.

2) nmcli first called nmc_start_polkit_agent_start_try(), but when
  invoking the synchronous method, the main context is busy and a
  polkit request cannot possibly be handled.

3) nm_client_networking_set_enabled() is deprecated.

Fix all of these, by calling the D-Bus method directly.

Policykit authentication requests are only handled partly. There
seems to be an unrelated race/bug. Now it works sometimes.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: replace deprecated and synchronous nm_client_set_logging()</title>
<updated>2020-03-23T08:33:52+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-14T07:43:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d99d1dc26525d86a6f0000505fbfd256908cf7a7'/>
<id>d99d1dc26525d86a6f0000505fbfd256908cf7a7</id>
<content type='text'>
This is more a showcase for using nm_client_dbus_call(), than a
real use.

In this case, nmcli was mostly fine to just invoke the synchronous API
and not care about the problems that it had.

Still, replace it, and show the suggested alternative.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is more a showcase for using nm_client_dbus_call(), than a
real use.

In this case, nmcli was mostly fine to just invoke the synchronous API
and not care about the problems that it had.

Still, replace it, and show the suggested alternative.
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: advise using D-Bus instead of deprecated synchronous methods</title>
<updated>2020-03-23T08:33:51+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-13T17:24:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=06da903bb6fd4e35d595c6230a8ecc2a8b7da107'/>
<id>06da903bb6fd4e35d595c6230a8ecc2a8b7da107</id>
<content type='text'>
With 1.22, various synchronous functions for invoking D-Bus methods were
deprecated. The reason was that D-Bus is fundamentally asynchronous, and
providing synchronous API in NMClient is inherently wrong. That is
because NMClient essentially is a cache of the D-Bus API, and invoking
g_dbus_connection_call_sync() messes up the order of events from D-Bus.
In particular, when the synchronous function completes, the content of
the cache does not yet reflect the change.

Since they got deprecated, the question is with what to replace them.

Instead of adding a (e.g.) nm_client_networking_set_enabled_async()
for nm_client_networking_set_enabled(), just expect the user to call
D-Bus directly.

D-Bus itself defines a reasonable API, and with GDBusConnection it
is fine (and convenient) to just call D-Bus operations directly.
Often libraries try to abstract D-Bus by providing convenience
wrappers around D-Bus API. I think that often is wrong and unnecessary.

Note that libnm's NMClient does a lot more than just wrapping simple
D-Bus calls. It provides a complete client-side cache of the D-Bus
interface. As such, what libnm's NMClient does is more than simple
wrappers around D-Bus. NMClient is a reasonable thing to do.

However, it is unnecessary to add API like nm_client_networking_set_enabled_async()
that only calls g_dbus_connection_call(). Don't pretend that we would need such
trivial wrappers in libnm.

Instead, recommend to use g_dbus_connection_call(). Or alternatively,
the convenience wrappers nm_client_dbus_call() and
nm_client_dbus_set_property().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With 1.22, various synchronous functions for invoking D-Bus methods were
deprecated. The reason was that D-Bus is fundamentally asynchronous, and
providing synchronous API in NMClient is inherently wrong. That is
because NMClient essentially is a cache of the D-Bus API, and invoking
g_dbus_connection_call_sync() messes up the order of events from D-Bus.
In particular, when the synchronous function completes, the content of
the cache does not yet reflect the change.

Since they got deprecated, the question is with what to replace them.

Instead of adding a (e.g.) nm_client_networking_set_enabled_async()
for nm_client_networking_set_enabled(), just expect the user to call
D-Bus directly.

D-Bus itself defines a reasonable API, and with GDBusConnection it
is fine (and convenient) to just call D-Bus operations directly.
Often libraries try to abstract D-Bus by providing convenience
wrappers around D-Bus API. I think that often is wrong and unnecessary.

Note that libnm's NMClient does a lot more than just wrapping simple
D-Bus calls. It provides a complete client-side cache of the D-Bus
interface. As such, what libnm's NMClient does is more than simple
wrappers around D-Bus. NMClient is a reasonable thing to do.

However, it is unnecessary to add API like nm_client_networking_set_enabled_async()
that only calls g_dbus_connection_call(). Don't pretend that we would need such
trivial wrappers in libnm.

Instead, recommend to use g_dbus_connection_call(). Or alternatively,
the convenience wrappers nm_client_dbus_call() and
nm_client_dbus_set_property().
</pre>
</div>
</content>
</entry>
</feed>
