summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2018-01-12 18:33:59 +0100
committerFrancesco Giudici <fgiudici@redhat.com>2018-01-15 17:41:08 +0100
commitf2fc274586b2665c7df09642e9abc33c6a37fc29 (patch)
treeab0d4feaafb0ffc37550ec959cfa199f2caea1e3
parent1cf1843f9c511c36352cc15d5d8c94af2e307e91 (diff)
downloadNetworkManager-f2fc274586b2665c7df09642e9abc33c6a37fc29.tar.gz
cli: get team defaults from setting header files
this allows centralizing default values definition and allows quicker and safer update of default values.
-rw-r--r--clients/common/nm-meta-setting-desc.c8
-rw-r--r--libnm-core/nm-utils.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index a028c9a3fa..8e46b336af 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -6625,7 +6625,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
- .value = 50,
+ .value = NM_SETTING_TEAM_RUNNER_TX_BALANCER_INTERVAL_DEFAULT,
.nick = "default",
}
),
@@ -6642,7 +6642,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
- .value = 255,
+ .value = NM_SETTING_TEAM_RUNNER_SYS_PRIO_DEFAULT,
.nick = "default",
}
),
@@ -6698,7 +6698,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM_PORT[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
- .value = -1,
+ .value = NM_SETTING_TEAM_PORT_QUEUE_ID_DEFAULT,
.nick = "default",
}
),
@@ -6723,7 +6723,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM_PORT[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
- .value = 255,
+ .value = NM_SETTING_TEAM_PORT_LACP_PRIO_DEFAULT,
.nick = "default",
}
),
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index dbb7a99919..61f0733d3f 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -5171,9 +5171,9 @@ _json_team_normalize_defaults (json_t *json, gboolean reset)
_json_delete_object_on_string_match (json, "runner", "hwaddr_policy", NULL,
NM_SETTING_TEAM_RUNNER_HWADDR_POLICY_DEFAULT);
} else if (nm_streq (runner, NM_SETTING_TEAM_RUNNER_LACP)) {
- runner_tx_balancer_interval = 50;
+ runner_tx_balancer_interval = NM_SETTING_TEAM_RUNNER_TX_BALANCER_INTERVAL_DEFAULT;
runner_active = TRUE;
- runner_sys_prio = 255;
+ runner_sys_prio = NM_SETTING_TEAM_RUNNER_SYS_PRIO_DEFAULT;
runner_min_ports = 0;
_json_delete_object_on_string_match (json, "runner", "agg_select_policy", NULL,
NM_SETTING_TEAM_RUNNER_AGG_SELECT_POLICY_DEFAULT);