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:
@@ -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);
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user