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
commit30be448c0485797f5e1130f7aef9467f9198d56d (patch)
tree02926fad02afa1b81099fee3134dca39918851b5
parent45cf408f7ce53b8c7ca4fd704346a75a364d70b9 (diff)
downloadNetworkManager-30be448c0485797f5e1130f7aef9467f9198d56d.tar.gz
clients: add support for ovs-port 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, 20 insertions, 0 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index 54fe3b0c16..cfed2a2c3f 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_PORT_SETTING_NAME,
NM_SETTING_TEAM_SETTING_NAME),
),
),
@@ -6740,6 +6741,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_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")
@@ -6889,6 +6891,13 @@ const NMMetaSettingInfoEditor nm_meta_setting_infos_editor[] = {
),
.setting_init_fcn = _setting_init_fcn_olpc_mesh,
),
+ SETTING_INFO_EMPTY (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),
+ NM_META_SETTING_VALID_PART_ITEM (WIRED, FALSE),
+ ),
+ ),
SETTING_INFO (PPPOE,
/* PPPoE is a base connection type from historical reasons.
* See libnm-core/nm-setting.c:_nm_setting_is_base_type()
@@ -7015,6 +7024,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 NM_PTRARRAY_EMPTY (const NMMetaSettingValidPartItem *);
+ }
if (nm_streq (slave_type, NM_SETTING_TEAM_SETTING_NAME)) {
NM_SET_OUT (out_slave_name, "team-slave");
return valid_settings_slave_team;
diff --git a/shared/nm-meta-setting.c b/shared/nm-meta-setting.c
index 3730bb8925..cba93f6b2e 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-port.h"
#include "nm-setting-ppp.h"
#include "nm-setting-pppoe.h"
#include "nm-setting-proxy.h"
@@ -235,6 +236,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_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,
diff --git a/shared/nm-meta-setting.h b/shared/nm-meta-setting.h
index 949a6920c6..45a26e62d7 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_PORT,
NM_META_SETTING_TYPE_PPP,
NM_META_SETTING_TYPE_PPPOE,
NM_META_SETTING_TYPE_PROXY,