mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
all: use the new NMSettingConnection Controller property
This commit is contained in:
parent
00bc10b8c0
commit
3e4a2ebb3c
|
@ -695,7 +695,8 @@ check_connection_controller(NMConnection *orig, NMConnection *candidate, GHashTa
|
|||
|
||||
props = check_property_in_hash(settings,
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_MASTER);
|
||||
NM_SETTING_CONNECTION_CONTROLLER);
|
||||
|
||||
if (!props)
|
||||
return TRUE;
|
||||
|
||||
|
@ -721,7 +722,7 @@ check_connection_controller(NMConnection *orig, NMConnection *candidate, GHashTa
|
|||
remove_from_hash(settings,
|
||||
props,
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_MASTER);
|
||||
NM_SETTING_CONNECTION_CONTROLLER);
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
|
|
|
@ -248,7 +248,7 @@ controller_update_port_connection(NMDevice *self,
|
|||
NULL);
|
||||
|
||||
g_object_set(nm_connection_get_setting_connection(connection),
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
nm_connection_get_uuid(applied_connection),
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_BOND_SETTING_NAME,
|
||||
|
|
|
@ -610,7 +610,7 @@ master_update_slave_connection(NMDevice *device,
|
|||
}
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
nm_connection_get_uuid(applied_connection),
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_BRIDGE_SETTING_NAME,
|
||||
|
|
|
@ -290,7 +290,7 @@ master_update_slave_connection(NMDevice *device,
|
|||
g_free(port_config);
|
||||
|
||||
g_object_set(nm_connection_get_setting_connection(connection),
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
nm_connection_get_uuid(applied_connection),
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_TEAM_SETTING_NAME,
|
||||
|
|
|
@ -306,7 +306,7 @@ check_if_bond_slave(shvarFile *ifcfg, NMSettingConnection *s_con)
|
|||
}
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
v,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_BOND_SETTING_NAME,
|
||||
|
@ -340,7 +340,7 @@ check_if_team_slave(shvarFile *ifcfg, NMSettingConnection *s_con)
|
|||
}
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
v,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_TEAM_SETTING_NAME,
|
||||
|
@ -512,7 +512,7 @@ make_connection_setting(const char *file,
|
|||
old_value,
|
||||
v);
|
||||
} else {
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_MASTER, v, NULL);
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_CONTROLLER, v, NULL);
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_BRIDGE_SETTING_NAME,
|
||||
|
@ -535,7 +535,7 @@ make_connection_setting(const char *file,
|
|||
old_value,
|
||||
v);
|
||||
} else {
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_MASTER, v, NULL);
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_CONTROLLER, v, NULL);
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -555,7 +555,7 @@ make_connection_setting(const char *file,
|
|||
old_value,
|
||||
v);
|
||||
} else {
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_MASTER, v, NULL);
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_CONTROLLER, v, NULL);
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_VRF_SETTING_NAME,
|
||||
|
|
|
@ -2046,7 +2046,7 @@ test_write_bridge_component(void)
|
|||
TRUE,
|
||||
NM_SETTING_CONNECTION_TYPE,
|
||||
NM_SETTING_WIRED_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"br0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_BRIDGE_SETTING_NAME,
|
||||
|
@ -2357,7 +2357,7 @@ test_read_minimal_slave(void)
|
|||
NM_SETTING_WIRED_SETTING_NAME,
|
||||
&s_con);
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"br0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
"bridge",
|
||||
|
|
|
@ -302,7 +302,7 @@ test_nm_utils_log_connection_diff(void)
|
|||
g_object_set(nm_connection_get_setting_connection(connection2),
|
||||
NM_SETTING_CONNECTION_ID,
|
||||
"id2",
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master2",
|
||||
NULL);
|
||||
nm_utils_log_connection_diff(connection,
|
||||
|
|
|
@ -103,7 +103,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("'%s' value doesn't match '%s=%s'"),
|
||||
priv->parent,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
master);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
|
|
|
@ -1125,11 +1125,11 @@ _nm_connection_detect_slave_type_full(NMSettingConnection *s_con,
|
|||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_MISSING_PROPERTY,
|
||||
_("Slave connections need a valid '%s' property"),
|
||||
NM_SETTING_CONNECTION_MASTER);
|
||||
NM_SETTING_CONNECTION_CONTROLLER);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_MASTER);
|
||||
NM_SETTING_CONNECTION_CONTROLLER);
|
||||
return FALSE;
|
||||
}
|
||||
if (slave_setting_type && connection
|
||||
|
@ -1149,7 +1149,7 @@ _nm_connection_detect_slave_type_full(NMSettingConnection *s_con,
|
|||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_MISSING_PROPERTY,
|
||||
_("Cannot set '%s' without '%s'"),
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
|
@ -1595,7 +1595,7 @@ after_interface_name:
|
|||
NM_CONNECTION_ERROR_MISSING_PROPERTY,
|
||||
_("Detect a slave connection with '%s' set and a port type '%s'. '%s' should "
|
||||
"be set to '%s'"),
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
normerr_missing_slave_type_port,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
normerr_missing_slave_type);
|
||||
|
|
|
@ -136,7 +136,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
nm_setting_connection_get_slave_type(s_con)
|
||||
? NM_SETTING_CONNECTION_SLAVE_TYPE
|
||||
: NM_SETTING_CONNECTION_MASTER);
|
||||
: NM_SETTING_CONNECTION_CONTROLLER);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("'%s' value doesn't match '%s=%s'"),
|
||||
priv->parent,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
master);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
|
|
|
@ -162,7 +162,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_MASTER);
|
||||
NM_SETTING_CONNECTION_CONTROLLER);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,12 +312,12 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("A connection with a '%s' setting must have a master."),
|
||||
_("A connection with a '%s' setting must have a controller."),
|
||||
NM_SETTING_OVS_INTERFACE_SETTING_NAME);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_MASTER);
|
||||
NM_SETTING_CONNECTION_CONTROLLER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -422,7 +422,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_MASTER);
|
||||
NM_SETTING_CONNECTION_CONTROLLER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -624,7 +624,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("'%s' value doesn't match '%s=%s'"),
|
||||
priv->parent,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
master);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
|
|
|
@ -4019,6 +4019,7 @@ test_connection_diff_a_only(void)
|
|||
{NM_SETTING_CONNECTION_PERMISSIONS, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_ZONE, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_MASTER, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_CONTROLLER, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_SECONDARIES, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
|
@ -6235,7 +6236,7 @@ test_connection_normalize_slave_type_1(void)
|
|||
&s_con);
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
"invalid-type",
|
||||
|
@ -6271,7 +6272,7 @@ test_connection_normalize_slave_type_2(void)
|
|||
&s_con);
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
"invalid-type",
|
||||
|
@ -6572,7 +6573,7 @@ test_connection_normalize_ovs_interface_type_system(gconstpointer test_data)
|
|||
switch (TEST_CASE) {
|
||||
case 1:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6593,7 +6594,7 @@ test_connection_normalize_ovs_interface_type_system(gconstpointer test_data)
|
|||
break;
|
||||
case 2:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6616,7 +6617,7 @@ test_connection_normalize_ovs_interface_type_system(gconstpointer test_data)
|
|||
break;
|
||||
case 3:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6634,7 +6635,7 @@ test_connection_normalize_ovs_interface_type_system(gconstpointer test_data)
|
|||
break;
|
||||
case 4:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6650,7 +6651,7 @@ test_connection_normalize_ovs_interface_type_system(gconstpointer test_data)
|
|||
NM_CONNECTION_ERROR_INVALID_PROPERTY);
|
||||
break;
|
||||
case 5:
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_MASTER, "master0", NULL);
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_CONTROLLER, "master0", NULL);
|
||||
|
||||
s_ovs_if = NM_SETTING_OVS_INTERFACE(nm_setting_ovs_interface_new());
|
||||
nm_connection_add_setting(con, NM_SETTING(s_ovs_if));
|
||||
|
@ -6671,7 +6672,7 @@ test_connection_normalize_ovs_interface_type_system(gconstpointer test_data)
|
|||
break;
|
||||
case 6:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_BRIDGE_SETTING_NAME,
|
||||
|
@ -6687,7 +6688,7 @@ test_connection_normalize_ovs_interface_type_system(gconstpointer test_data)
|
|||
break;
|
||||
case 7:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_BRIDGE_SETTING_NAME,
|
||||
|
@ -6735,7 +6736,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
NM_CONNECTION_ERROR_INVALID_PROPERTY);
|
||||
break;
|
||||
case 2:
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_MASTER, "master0", NULL);
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_CONTROLLER, "master0", NULL);
|
||||
nmtst_assert_connection_verifies_after_normalization(con,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_MISSING_PROPERTY);
|
||||
|
@ -6755,7 +6756,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 3:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6778,7 +6779,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
g_assert_cmpstr(nm_setting_ovs_interface_get_interface_type(s_ovs_if), ==, "internal");
|
||||
break;
|
||||
case 4:
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_MASTER, "master0", NULL);
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_CONTROLLER, "master0", NULL);
|
||||
g_object_set(s_ovs_if, NM_SETTING_OVS_INTERFACE_TYPE, "internal", NULL);
|
||||
nmtst_assert_connection_verifies_after_normalization(con,
|
||||
NM_CONNECTION_ERROR,
|
||||
|
@ -6799,7 +6800,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 5:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6822,7 +6823,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 6:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6845,7 +6846,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 7:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6857,7 +6858,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 8:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6869,7 +6870,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 9:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6881,7 +6882,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 10:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6894,7 +6895,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 11:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -6909,7 +6910,7 @@ test_connection_normalize_ovs_interface_type_ovs_interface(gconstpointer test_da
|
|||
break;
|
||||
case 12:
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -10701,7 +10702,7 @@ test_connection_ovs_ifname(gconstpointer test_data)
|
|||
&s_con);
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_BRIDGE_SETTING_NAME,
|
||||
|
@ -10719,7 +10720,7 @@ test_connection_ovs_ifname(gconstpointer test_data)
|
|||
g_assert(s_ovs_iface);
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -10746,7 +10747,7 @@ test_connection_ovs_ifname(gconstpointer test_data)
|
|||
g_assert(s_ovs_iface);
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -10762,7 +10763,7 @@ test_connection_ovs_ifname(gconstpointer test_data)
|
|||
&s_con);
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
@ -10788,7 +10789,7 @@ test_connection_ovs_ifname(gconstpointer test_data)
|
|||
g_assert(s_ovs_iface);
|
||||
|
||||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"master0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||
|
|
|
@ -926,7 +926,7 @@ reader_parse_master(Reader *reader, char *argument, const char *type_name, const
|
|||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
type_name,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
master,
|
||||
NULL);
|
||||
} while (slaves && *slaves != '\0');
|
||||
|
|
|
@ -4554,8 +4554,9 @@ enable_type_settings_and_options(NmCli *nmc, NMConnection *con, GError **error)
|
|||
s_con = nm_connection_get_setting_connection(con);
|
||||
g_return_val_if_fail(s_con, FALSE);
|
||||
|
||||
if (nm_setting_connection_get_slave_type(s_con))
|
||||
enable_options(NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_MASTER, NULL);
|
||||
if (nm_setting_connection_get_slave_type(s_con)) {
|
||||
enable_options(NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_CONTROLLER, NULL);
|
||||
}
|
||||
|
||||
if (NM_IN_STRSET(nm_setting_connection_get_connection_type(s_con),
|
||||
NM_SETTING_BLUETOOTH_SETTING_NAME,
|
||||
|
@ -4922,6 +4923,11 @@ _meta_abstract_get_option_info(const NMMetaAbstractInfo *abstract_info)
|
|||
"master",
|
||||
set_connection_controller,
|
||||
NULL),
|
||||
OPTION_INFO(CONNECTION,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
"controller",
|
||||
set_connection_controller,
|
||||
NULL),
|
||||
OPTION_INFO(BLUETOOTH,
|
||||
NM_SETTING_BLUETOOTH_TYPE,
|
||||
"bt-type",
|
||||
|
@ -8852,7 +8858,7 @@ editor_init_new_connection(NmCli *nmc, NMConnection *connection, const char *por
|
|||
g_object_set(s_con,
|
||||
NM_SETTING_CONNECTION_TYPE,
|
||||
NM_SETTING_WIRED_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
dev_ifname ?: "eth0",
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
port_type,
|
||||
|
|
|
@ -342,7 +342,7 @@ nmc_setting_connection_connect_handlers(NMSettingConnection *setting, NMConnecti
|
|||
g_return_if_fail(NM_IS_SETTING_CONNECTION(setting));
|
||||
|
||||
g_signal_connect(setting,
|
||||
"notify::" NM_SETTING_CONNECTION_MASTER,
|
||||
"notify::" NM_SETTING_CONNECTION_CONTROLLER,
|
||||
G_CALLBACK(connection_controller_changed_cb),
|
||||
connection);
|
||||
}
|
||||
|
|
|
@ -447,7 +447,7 @@ nm_editor_utils_create_connection(GType type, NMConnection *controller, NMClient
|
|||
nm_setting_get_name(s_hw),
|
||||
NM_SETTING_CONNECTION_AUTOCONNECT,
|
||||
!type_data->no_autoconnect,
|
||||
NM_SETTING_CONNECTION_MASTER,
|
||||
NM_SETTING_CONNECTION_CONTROLLER,
|
||||
controller_uuid,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE,
|
||||
controller_setting_type,
|
||||
|
|
Loading…
Reference in a new issue