Commit 6f73b460 authored by Lubomir Rintel's avatar Lubomir Rintel 🥕

clients: add support for ovs-port setting

parent 6dcd54b0
......@@ -138,6 +138,7 @@ const NmcMetaGenericInfo *const nmc_fields_con_active_details_general[] = {
NM_SETTING_TEAM_PORT_SETTING_NAME"," \
NM_SETTING_OVS_INTERFACE_SETTING_NAME","\
NM_SETTING_OVS_PATCH_SETTING_NAME","\
NM_SETTING_OVS_PORT_SETTING_NAME","\
NM_SETTING_DCB_SETTING_NAME"," \
NM_SETTING_TUN_SETTING_NAME"," \
NM_SETTING_IP_TUNNEL_SETTING_NAME"," \
......
......@@ -5009,6 +5009,7 @@ static const NMMetaPropertyInfo *const property_infos_CONNECTION[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (
.values_static = VALUES_STATIC (NM_SETTING_BOND_SETTING_NAME,
NM_SETTING_BRIDGE_SETTING_NAME,
NM_SETTING_OVS_PORT_SETTING_NAME,
NM_SETTING_TEAM_SETTING_NAME),
),
),
......@@ -5824,6 +5825,39 @@ static const NMMetaPropertyInfo *const property_infos_OVS_PATCH[] = {
NULL
};
#undef _CURRENT_NM_META_SETTING_TYPE
#define _CURRENT_NM_META_SETTING_TYPE NM_META_SETTING_TYPE_OVS_PORT
static const NMMetaPropertyInfo *const property_infos_OVS_PORT[] = {
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_PORT_VLAN_MODE,
.property_type = &_pt_gobject_string,
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (
.values_static = VALUES_STATIC ("access", "native-tagged", "native-untagged", "trunk"),
),
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_PORT_TAG,
.property_type = &_pt_gobject_int,
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_PORT_LACP,
.property_type = &_pt_gobject_string,
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (
.values_static = VALUES_STATIC ("active", "off", "passive"),
),
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_PORT_BOND_MODE,
.property_type = &_pt_gobject_string,
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (
.values_static = VALUES_STATIC ("active-backup", "balance-slb", "balance-tcp"),
),
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_PORT_BOND_UPDELAY,
.property_type = &_pt_gobject_int,
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_PORT_BOND_DOWNDELAY,
.property_type = &_pt_gobject_int,
),
NULL
};
#undef _CURRENT_NM_META_SETTING_TYPE
#define _CURRENT_NM_META_SETTING_TYPE NM_META_SETTING_TYPE_PPP
static const NMMetaPropertyInfo *const property_infos_PPP[] = {
......@@ -6745,6 +6779,7 @@ _setting_init_fcn_wireless (ARGS_SETTING_INIT_FCN)
#define SETTING_PRETTY_NAME_OLPC_MESH N_("OLPC Mesh connection")
#define SETTING_PRETTY_NAME_OVS_INTERFACE N_("OpenVSwitch interface settings")
#define SETTING_PRETTY_NAME_OVS_PATCH N_("OpenVSwitch patch interface settings")
#define SETTING_PRETTY_NAME_OVS_PORT N_("OpenVSwitch port settings")
#define SETTING_PRETTY_NAME_PPP N_("PPP settings")
#define SETTING_PRETTY_NAME_PPPOE N_("PPPoE")
#define SETTING_PRETTY_NAME_PROXY N_("Proxy")
......@@ -6905,6 +6940,12 @@ const NMMetaSettingInfoEditor nm_meta_setting_infos_editor[] = {
),
),
SETTING_INFO (OVS_PATCH),
SETTING_INFO (OVS_PORT,
.valid_parts = NM_META_SETTING_VALID_PARTS (
NM_META_SETTING_VALID_PART_ITEM (CONNECTION, TRUE),
NM_META_SETTING_VALID_PART_ITEM (OVS_PORT, TRUE),
),
),
SETTING_INFO (PPPOE,
/* PPPoE is a base connection type from historical reasons.
* See libnm-core/nm-setting.c:_nm_setting_is_base_type()
......@@ -7011,6 +7052,11 @@ static const NMMetaSettingValidPartItem *const valid_settings_slave_bridge[] = {
NULL,
};
static const NMMetaSettingValidPartItem *const valid_settings_slave_ovs_port[] = {
NM_META_SETTING_VALID_PART_ITEM (OVS_INTERFACE, FALSE),
NULL,
};
static const NMMetaSettingValidPartItem *const valid_settings_slave_team[] = {
NM_META_SETTING_VALID_PART_ITEM (TEAM_PORT, TRUE),
NULL,
......@@ -7031,6 +7077,10 @@ nm_meta_setting_info_valid_parts_for_slave_type (const char *slave_type, const c
NM_SET_OUT (out_slave_name, "bridge-slave");
return valid_settings_slave_bridge;
}
if (nm_streq (slave_type, NM_SETTING_OVS_PORT_SETTING_NAME)) {
NM_SET_OUT (out_slave_name, "ovs-slave");
return valid_settings_slave_ovs_port;
}
if (nm_streq (slave_type, NM_SETTING_TEAM_SETTING_NAME)) {
NM_SET_OUT (out_slave_name, "team-slave");
return valid_settings_slave_team;
......
......@@ -78,6 +78,7 @@
#include "nm-setting-olpc-mesh.h"
#include "nm-setting-ovs-interface.h"
#include "nm-setting-ovs-patch.h"
#include "nm-setting-ovs-port.h"
#include "nm-setting-ppp.h"
#include "nm-setting-pppoe.h"
#include "nm-setting-proxy.h"
......
......@@ -45,6 +45,7 @@
#include "nm-setting-olpc-mesh.h"
#include "nm-setting-ovs-interface.h"
#include "nm-setting-ovs-patch.h"
#include "nm-setting-ovs-port.h"
#include "nm-setting-ppp.h"
#include "nm-setting-pppoe.h"
#include "nm-setting-proxy.h"
......@@ -247,6 +248,11 @@ const NMMetaSettingInfo nm_meta_setting_infos[] = {
.setting_name = NM_SETTING_OVS_PATCH_SETTING_NAME,
.get_setting_gtype = nm_setting_ovs_patch_get_type,
},
[NM_META_SETTING_TYPE_OVS_PORT] = {
.meta_type = NM_META_SETTING_TYPE_OVS_PORT,
.setting_name = NM_SETTING_OVS_PORT_SETTING_NAME,
.get_setting_gtype = nm_setting_ovs_port_get_type,
},
[NM_META_SETTING_TYPE_PPPOE] = {
.meta_type = NM_META_SETTING_TYPE_PPPOE,
.setting_name = NM_SETTING_PPPOE_SETTING_NAME,
......
......@@ -77,6 +77,7 @@ typedef enum {
NM_META_SETTING_TYPE_OLPC_MESH,
NM_META_SETTING_TYPE_OVS_INTERFACE,
NM_META_SETTING_TYPE_OVS_PATCH,
NM_META_SETTING_TYPE_OVS_PORT,
NM_META_SETTING_TYPE_PPP,
NM_META_SETTING_TYPE_PPPOE,
NM_META_SETTING_TYPE_PROXY,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment