mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
core: add and indicate NM_CAPABILITY_OVS capability on D-Bus
https://bugzilla.redhat.com/show_bug.cgi?id=1785147
This commit is contained in:
parent
d65aabd518
commit
785da51d83
4 changed files with 11 additions and 2 deletions
|
|
@ -89,7 +89,10 @@
|
|||
|
||||
/**
|
||||
* NMCapability:
|
||||
* @NM_CAPABILITY_TEAM: Teams can be managed
|
||||
* @NM_CAPABILITY_TEAM: Teams can be managed. This means the team device plugin
|
||||
* is loaded.
|
||||
* @NM_CAPABILITY_OVS: OpenVSwitch can be managed. This means the OVS device plugin
|
||||
* is loaded. Since: 1.24
|
||||
*
|
||||
* #NMCapability names the numbers in the Capabilities property.
|
||||
* Capabilities are positive numbers. They are part of stable API
|
||||
|
|
@ -101,6 +104,7 @@
|
|||
*/
|
||||
typedef enum {
|
||||
NM_CAPABILITY_TEAM = 1,
|
||||
NM_CAPABILITY_OVS = 2,
|
||||
} NMCapability;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -97,6 +97,10 @@ nm_setting_ip_config_get_addr_family (NMSettingIPConfig *s_ip)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NM_CAPABILITY_MAX NM_CAPABILITY_OVS
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
extern const char *const nm_auth_permission_names_by_idx[NM_CLIENT_PERMISSION_LAST];
|
||||
extern const NMClientPermission nm_auth_permission_sorted[NM_CLIENT_PERMISSION_LAST];
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ NM_DEVICE_FACTORY_DECLARE_TYPES (
|
|||
G_MODULE_EXPORT NMDeviceFactory *
|
||||
nm_device_factory_create (GError **error)
|
||||
{
|
||||
nm_manager_set_capability (NM_MANAGER_GET, NM_CAPABILITY_OVS);
|
||||
return (NMDeviceFactory *) g_object_new (NM_TYPE_OVS_FACTORY, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7324,7 +7324,7 @@ nm_manager_set_capability (NMManager *self,
|
|||
gssize idx;
|
||||
|
||||
g_return_if_fail (NM_IS_MANAGER (self));
|
||||
if (cap < 1 || cap > NM_CAPABILITY_TEAM)
|
||||
if (cap < 1 || cap > _NM_CAPABILITY_MAX)
|
||||
g_return_if_reached ();
|
||||
|
||||
cap_i = (guint32) cap;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue