summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-08-01 20:28:05 +0200
committerLubomir Rintel <lkundrak@v3.sk>2017-09-11 23:56:47 +0200
commit9be4b739bef1e789bde0b3e211294bd5d8e26f57 (patch)
treefe40abfa1c4eae25e28affd5009c03d4bbeb1ccf
parent30be448c0485797f5e1130f7aef9467f9198d56d (diff)
clients: add support for ovs-bridge setting
-rw-r--r--clients/common/nm-meta-setting-desc.c13
-rw-r--r--shared/nm-meta-setting.c6
-rw-r--r--shared/nm-meta-setting.h1
3 files changed, 19 insertions, 1 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index cfed2a2c3..c4f5638a0 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -5078,6 +5078,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),
),
@@ -6741,6 +6742,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_PORT N_("OpenVSwitch port settings")
#define SETTING_PRETTY_NAME_PPP N_("PPP settings")
#define SETTING_PRETTY_NAME_PPPOE N_("PPPoE")
@@ -6891,6 +6893,14 @@ const NMMetaSettingInfoEditor nm_meta_setting_infos_editor[] = {
),
.setting_init_fcn = _setting_init_fcn_olpc_mesh,
),
+ SETTING_INFO_EMPTY (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),
+ NM_META_SETTING_VALID_PART_ITEM (OVS_PORT, FALSE),
+ NM_META_SETTING_VALID_PART_ITEM (WIRED, FALSE),
+ ),
+ ),
SETTING_INFO_EMPTY (OVS_PORT,
.valid_parts = NM_META_SETTING_VALID_PARTS (
NM_META_SETTING_VALID_PART_ITEM (CONNECTION, TRUE),
@@ -7024,7 +7034,8 @@ 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)) {
+ if ( nm_streq (slave_type, NM_SETTING_OVS_BRIDGE_SETTING_NAME)
+ || nm_streq (slave_type, NM_SETTING_OVS_PORT_SETTING_NAME)) {
NM_SET_OUT (out_slave_name, "ovs-slave");
return NM_PTRARRAY_EMPTY (const NMMetaSettingValidPartItem *);
}
diff --git a/shared/nm-meta-setting.c b/shared/nm-meta-setting.c
index cba93f6b2..fde965e50 100644
--- a/shared/nm-meta-setting.c
+++ b/shared/nm-meta-setting.c
@@ -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-port.h"
#include "nm-setting-ppp.h"
#include "nm-setting-pppoe.h"
@@ -236,6 +237,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_PORT] = {
.meta_type = NM_META_SETTING_TYPE_OVS_PORT,
.setting_name = NM_SETTING_OVS_PORT_SETTING_NAME,
diff --git a/shared/nm-meta-setting.h b/shared/nm-meta-setting.h
index 45a26e62d..53c50127d 100644
--- a/shared/nm-meta-setting.h
+++ b/shared/nm-meta-setting.h
@@ -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_PORT,
NM_META_SETTING_TYPE_PPP,
NM_META_SETTING_TYPE_PPPOE,