Revert "cli: verify connections before sending them over to daemon"

Just calling nm_connection_verify() is not correct. We need
nm_connection_normalize() because otherwise we miss out on places
where we have common normalization steps implemented to fix a
connection. This is also what server-side is done.

Revert the patch, as it breaks CI tests.

I wonder also whether this is the right place. There are already
several places in "clients/cli/connections.c" that call verify()
and normalize(). These places should be unified so that there is
one place where we complete the connection. And it probably should be
done as a separate step before the add_new_connection()/update_connection()
calls.

This reverts commit ca58bcca0c.
This commit is contained in:
Thomas Haller 2019-02-06 11:43:02 +01:00
parent d25ed0820c
commit e357d15023

View file

@ -4834,17 +4834,6 @@ add_new_connection (gboolean persistent,
GAsyncReadyCallback callback,
gpointer user_data)
{
GError *error = NULL;
if ( !nm_connection_verify (connection, &error)
|| !nm_connection_verify_secrets (connection, &error)) {
g_simple_async_report_take_gerror_in_idle (G_OBJECT (client),
callback,
user_data,
error);
return;
}
nm_client_add_connection_async (client, connection, persistent,
NULL, callback, user_data);
}
@ -4855,18 +4844,6 @@ update_connection (gboolean persistent,
GAsyncReadyCallback callback,
gpointer user_data)
{
GError *error = NULL;
if ( !nm_connection_verify (NM_CONNECTION (connection), &error)
|| !nm_connection_verify_secrets (NM_CONNECTION (connection), &error)) {
g_simple_async_report_take_gerror_in_idle (G_OBJECT (connection),
callback,
user_data,
error);
return;
}
nm_remote_connection_commit_changes_async (connection, persistent,
NULL, callback, user_data);
}