cloud-setup: add device argument to nmcs_add_and_activate()

This will allow us to add & complete connections for existing devices,
such as VNICs on OCI VMs.
This commit is contained in:
Lubomir Rintel
2025-04-07 13:02:21 +02:00
parent 961be7d971
commit 9895540a24
3 changed files with 3 additions and 1 deletions

View File

@@ -821,7 +821,7 @@ _oci_new_vlan_dev(SigTermData *sigterm_data,
config_data->priv.oci.vlan_tag,
parent_hwaddr);
active_connection = nmcs_add_and_activate(nmc, NULL, connection, &error);
active_connection = nmcs_add_and_activate(nmc, NULL, NULL, connection, &error);
if (active_connection == NULL) {
if (!nm_utils_error_is_cancelled(error)) {
_LOGD("config device %s: failure to activate connection: %s", hwaddr, error->message);

View File

@@ -637,6 +637,7 @@ _nmcs_add_and_activate_cb(GObject *source, GAsyncResult *result, gpointer user_d
NMActiveConnection *
nmcs_add_and_activate(NMClient *client,
GCancellable *sigterm_cancellable,
NMDevice *device,
NMConnection *connection,
GError **error)
{

View File

@@ -155,6 +155,7 @@ NMConnection *nmcs_device_get_applied_connection(NMDevice *device,
NMActiveConnection *nmcs_add_and_activate(NMClient *client,
GCancellable *sigterm_cancellable,
NMDevice *device,
NMConnection *connection,
GError **error);