Commit aec8d36b authored by Lubomir Rintel's avatar Lubomir Rintel 🥕

clients: add support for ovs-bridge setting

parent 6f73b460
......@@ -136,6 +136,7 @@ const NmcMetaGenericInfo *const nmc_fields_con_active_details_general[] = {
NM_SETTING_BRIDGE_PORT_SETTING_NAME","\
NM_SETTING_TEAM_SETTING_NAME","\
NM_SETTING_TEAM_PORT_SETTING_NAME"," \
NM_SETTING_OVS_BRIDGE_SETTING_NAME","\
NM_SETTING_OVS_INTERFACE_SETTING_NAME","\
NM_SETTING_OVS_PATCH_SETTING_NAME","\
NM_SETTING_OVS_PORT_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_BRIDGE_SETTING_NAME,
NM_SETTING_OVS_PORT_SETTING_NAME,
NM_SETTING_TEAM_SETTING_NAME),
),
......@@ -5804,6 +5805,27 @@ static const NMMetaPropertyInfo *const property_infos_PPPOE[] = {
NULL
};
#undef _CURRENT_NM_META_SETTING_TYPE
#define _CURRENT_NM_META_SETTING_TYPE NM_META_SETTING_TYPE_OVS_BRIDGE
static const NMMetaPropertyInfo *const property_infos_OVS_BRIDGE[] = {
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_BRIDGE_FAIL_MODE,
.property_type = &_pt_gobject_string,
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (
.values_static = VALUES_STATIC ("secure", "standalone"),
),
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_BRIDGE_MCAST_SNOOPING_ENABLE,
.property_type = &_pt_gobject_bool,
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_BRIDGE_RSTP_ENABLE,
.property_type = &_pt_gobject_bool,
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_BRIDGE_STP_ENABLE,
.property_type = &_pt_gobject_bool,
),
NULL
};
#undef _CURRENT_NM_META_SETTING_TYPE
#define _CURRENT_NM_META_SETTING_TYPE NM_META_SETTING_TYPE_OVS_INTERFACE
static const NMMetaPropertyInfo *const property_infos_OVS_INTERFACE[] = {
......@@ -6777,6 +6799,7 @@ _setting_init_fcn_wireless (ARGS_SETTING_INIT_FCN)
#define SETTING_PRETTY_NAME_MACSEC N_("MACsec connection")
#define SETTING_PRETTY_NAME_MACVLAN N_("macvlan connection")
#define SETTING_PRETTY_NAME_OLPC_MESH N_("OLPC Mesh connection")
#define SETTING_PRETTY_NAME_OVS_BRIDGE N_("OpenVSwitch bridge settings")
#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")
......@@ -6929,6 +6952,12 @@ const NMMetaSettingInfoEditor nm_meta_setting_infos_editor[] = {
),
.setting_init_fcn = _setting_init_fcn_olpc_mesh,
),
SETTING_INFO (OVS_BRIDGE,
.valid_parts = NM_META_SETTING_VALID_PARTS (
NM_META_SETTING_VALID_PART_ITEM (CONNECTION, TRUE),
NM_META_SETTING_VALID_PART_ITEM (OVS_BRIDGE, TRUE),
),
),
SETTING_INFO (OVS_INTERFACE,
.valid_parts = NM_META_SETTING_VALID_PARTS (
NM_META_SETTING_VALID_PART_ITEM (CONNECTION, TRUE),
......@@ -7052,6 +7081,11 @@ static const NMMetaSettingValidPartItem *const valid_settings_slave_bridge[] = {
NULL,
};
static const NMMetaSettingValidPartItem *const valid_settings_slave_ovs_bridge[] = {
NM_META_SETTING_VALID_PART_ITEM (OVS_PORT, FALSE),
NULL,
};
static const NMMetaSettingValidPartItem *const valid_settings_slave_ovs_port[] = {
NM_META_SETTING_VALID_PART_ITEM (OVS_INTERFACE, FALSE),
NULL,
......@@ -7077,6 +7111,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_BRIDGE_SETTING_NAME)) {
NM_SET_OUT (out_slave_name, "ovs-slave");
return valid_settings_slave_ovs_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;
......
......@@ -76,6 +76,7 @@
#include "nm-setting-macsec.h"
#include "nm-setting-macvlan.h"
#include "nm-setting-olpc-mesh.h"
#include "nm-setting-ovs-bridge.h"
#include "nm-setting-ovs-interface.h"
#include "nm-setting-ovs-patch.h"
#include "nm-setting-ovs-port.h"
......
......@@ -43,6 +43,7 @@
#include "nm-setting-macsec.h"
#include "nm-setting-macvlan.h"
#include "nm-setting-olpc-mesh.h"
#include "nm-setting-ovs-bridge.h"
#include "nm-setting-ovs-interface.h"
#include "nm-setting-ovs-patch.h"
#include "nm-setting-ovs-port.h"
......@@ -238,6 +239,11 @@ const NMMetaSettingInfo nm_meta_setting_infos[] = {
.setting_name = NM_SETTING_OLPC_MESH_SETTING_NAME,
.get_setting_gtype = nm_setting_olpc_mesh_get_type,
},
[NM_META_SETTING_TYPE_OVS_BRIDGE] = {
.meta_type = NM_META_SETTING_TYPE_OVS_BRIDGE,
.setting_name = NM_SETTING_OVS_BRIDGE_SETTING_NAME,
.get_setting_gtype = nm_setting_ovs_bridge_get_type,
},
[NM_META_SETTING_TYPE_OVS_INTERFACE] = {
.meta_type = NM_META_SETTING_TYPE_OVS_INTERFACE,
.setting_name = NM_SETTING_OVS_INTERFACE_SETTING_NAME,
......
......@@ -75,6 +75,7 @@ typedef enum {
NM_META_SETTING_TYPE_MACSEC,
NM_META_SETTING_TYPE_MACVLAN,
NM_META_SETTING_TYPE_OLPC_MESH,
NM_META_SETTING_TYPE_OVS_BRIDGE,
NM_META_SETTING_TYPE_OVS_INTERFACE,
NM_META_SETTING_TYPE_OVS_PATCH,
NM_META_SETTING_TYPE_OVS_PORT,
......
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