summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-10-02 08:39:09 +0200
committerLubomir Rintel <lkundrak@v3.sk>2017-10-30 17:40:08 +0100
commitb5925d693cc716c973d751dc5675a9d7b775436e (patch)
treee17b0796415f5cac38e65b02da5a1b101a105a7d
parent6748c44cb66d6d9e631a91c9c86958acfcd6806f (diff)
downloadNetworkManager-b5925d693cc716c973d751dc5675a9d7b775436e.tar.gz
introspection: add o.fd.NM.Device.OvsBridge interface
-rw-r--r--Makefile.am4
-rw-r--r--introspection/org.freedesktop.NetworkManager.Device.OvsBridge.xml20
-rw-r--r--libnm-core/nm-dbus-interface.h3
-rw-r--r--libnm/nm-device.c3
-rw-r--r--src/devices/nm-device.c1
5 files changed, 31 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 351862565a..06630af78e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -210,6 +210,8 @@ introspection_sources = \
introspection/org.freedesktop.NetworkManager.Device.OvsInterface.h \
introspection/org.freedesktop.NetworkManager.Device.OvsPort.c \
introspection/org.freedesktop.NetworkManager.Device.OvsPort.h \
+ introspection/org.freedesktop.NetworkManager.Device.OvsBridge.c \
+ introspection/org.freedesktop.NetworkManager.Device.OvsBridge.h \
introspection/org.freedesktop.NetworkManager.Device.Ppp.c \
introspection/org.freedesktop.NetworkManager.Device.Ppp.h \
introspection/org.freedesktop.NetworkManager.Device.Statistics.c \
@@ -287,6 +289,7 @@ DBUS_INTERFACE_DOCS = \
docs/api/dbus-org.freedesktop.NetworkManager.Device.OlpcMesh.xml \
docs/api/dbus-org.freedesktop.NetworkManager.Device.OvsInterface.xml \
docs/api/dbus-org.freedesktop.NetworkManager.Device.OvsPort.xml \
+ docs/api/dbus-org.freedesktop.NetworkManager.Device.OvsBridge.xml \
docs/api/dbus-org.freedesktop.NetworkManager.Device.Ppp.xml \
docs/api/dbus-org.freedesktop.NetworkManager.DHCP4Config.xml \
docs/api/dbus-org.freedesktop.NetworkManager.Device.Generic.xml \
@@ -337,6 +340,7 @@ dbusinterfaces_DATA = \
introspection/org.freedesktop.NetworkManager.Device.OlpcMesh.xml \
introspection/org.freedesktop.NetworkManager.Device.OvsInterface.xml \
introspection/org.freedesktop.NetworkManager.Device.OvsPort.xml \
+ introspection/org.freedesktop.NetworkManager.Device.OvsBridge.xml \
introspection/org.freedesktop.NetworkManager.Device.Ppp.xml \
introspection/org.freedesktop.NetworkManager.Device.Statistics.xml \
introspection/org.freedesktop.NetworkManager.Device.Team.xml \
diff --git a/introspection/org.freedesktop.NetworkManager.Device.OvsBridge.xml b/introspection/org.freedesktop.NetworkManager.Device.OvsBridge.xml
new file mode 100644
index 0000000000..08ed5dc01b
--- /dev/null
+++ b/introspection/org.freedesktop.NetworkManager.Device.OvsBridge.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/">
+ <!--
+ org.freedesktop.NetworkManager.Device.OvsBridge:
+ @short_description: OvsBridge Device
+
+ -->
+ <interface name="org.freedesktop.NetworkManager.Device.OvsBridge">
+
+ <!--
+ PropertiesChanged:
+ @properties: A dictionary mapping property names to variant boxed values
+
+ DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
+ -->
+ <signal name="PropertiesChanged">
+ <arg name="properties" type="a{sv}"/>
+ </signal>
+ </interface>
+</node>
diff --git a/libnm-core/nm-dbus-interface.h b/libnm-core/nm-dbus-interface.h
index 1a5daf9797..7618542697 100644
--- a/libnm-core/nm-dbus-interface.h
+++ b/libnm-core/nm-dbus-interface.h
@@ -48,6 +48,7 @@
#define NM_DBUS_INTERFACE_DEVICE_OLPC_MESH NM_DBUS_INTERFACE_DEVICE ".OlpcMesh"
#define NM_DBUS_INTERFACE_DEVICE_OVS_INTERFACE NM_DBUS_INTERFACE_DEVICE ".OvsInterface"
#define NM_DBUS_INTERFACE_DEVICE_OVS_PORT NM_DBUS_INTERFACE_DEVICE ".OvsPort"
+#define NM_DBUS_INTERFACE_DEVICE_OVS_BRIDGE NM_DBUS_INTERFACE_DEVICE ".OvsBridge"
#define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint"
#define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint"
#define NM_DBUS_INTERFACE_DEVICE_MODEM NM_DBUS_INTERFACE_DEVICE ".Modem"
@@ -209,6 +210,7 @@ typedef enum {
* @NM_DEVICE_TYPE_PPP: a PPP interface
* @NM_DEVICE_TYPE_OVS_INTERFACE: a OpenVSwitch interface
* @NM_DEVICE_TYPE_OVS_PORT: a OpenVSwitch port
+ * @NM_DEVICE_TYPE_OVS_BRIDGE: a OpenVSwitch bridge
*
* #NMDeviceType values indicate the type of hardware represented by a
* device object.
@@ -240,6 +242,7 @@ typedef enum {
NM_DEVICE_TYPE_PPP = 23,
NM_DEVICE_TYPE_OVS_INTERFACE = 24,
NM_DEVICE_TYPE_OVS_PORT = 25,
+ NM_DEVICE_TYPE_OVS_BRIDGE = 26,
} NMDeviceType;
/**
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index 6f972c6fac..65afd078dc 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -263,6 +263,7 @@ coerce_type (NMDeviceType type)
case NM_DEVICE_TYPE_OLPC_MESH:
case NM_DEVICE_TYPE_OVS_INTERFACE:
case NM_DEVICE_TYPE_OVS_PORT:
+ case NM_DEVICE_TYPE_OVS_BRIDGE:
case NM_DEVICE_TYPE_WIMAX:
case NM_DEVICE_TYPE_MODEM:
case NM_DEVICE_TYPE_INFINIBAND:
@@ -1528,6 +1529,8 @@ get_type_name (NMDevice *device)
return _("OpenVSwitch Interface");
case NM_DEVICE_TYPE_OVS_PORT:
return _("OpenVSwitch Port");
+ case NM_DEVICE_TYPE_OVS_BRIDGE:
+ return _("OpenVSwitch Bridge");
case NM_DEVICE_TYPE_WIMAX:
return _("WiMAX");
case NM_DEVICE_TYPE_MODEM:
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 4f7e46d347..4453acae23 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -1661,6 +1661,7 @@ _get_route_metric_default (NMDevice *self)
return 700;
case NM_DEVICE_TYPE_BT:
return 750;
+ case NM_DEVICE_TYPE_OVS_BRIDGE:
case NM_DEVICE_TYPE_OVS_INTERFACE:
case NM_DEVICE_TYPE_OVS_PORT:
return 800;