cli: support dummy connections

This commit is contained in:
Beniamino Galvani 2017-02-01 15:19:29 +01:00
parent b42f780e04
commit 4db7890fae
5 changed files with 20 additions and 1 deletions

View file

@ -183,6 +183,7 @@ NmcOutputField nmc_fields_settings_names[] = {
SETTING_FIELD (NM_SETTING_MACVLAN_SETTING_NAME, nmc_fields_setting_macvlan + 1), /* 28 */
SETTING_FIELD (NM_SETTING_VXLAN_SETTING_NAME, nmc_fields_setting_vxlan + 1), /* 29 */
SETTING_FIELD (NM_SETTING_PROXY_SETTING_NAME, nmc_fields_setting_proxy + 1), /* 30 */
SETTING_FIELD (NM_SETTING_DUMMY_SETTING_NAME, nmc_fields_setting_dummy + 1), /* 31 */
{NULL, NULL, 0, NULL, NULL, FALSE, FALSE, 0}
};
#define NMC_FIELDS_SETTINGS_NAMES_ALL_X NM_SETTING_CONNECTION_SETTING_NAME","\
@ -477,6 +478,7 @@ usage_connection_add (void)
" [source-port-min <0-65535>]\n"
" [source-port-max <0-65535>]\n"
" [destination-port <0-65535>]\n\n"
" dummy: \n\n"
" SLAVE_OPTIONS:\n"
" bridge: [priority <0-63>]\n"
" [path-cost <1-65535>]\n"
@ -3071,6 +3073,13 @@ static const NameItem nmc_vxlan_settings [] = {
{ NULL, NULL, NULL, FALSE }
};
static const NameItem nmc_dummy_settings [] = {
{ NM_SETTING_CONNECTION_SETTING_NAME, NULL, NULL, TRUE },
{ NM_SETTING_DUMMY_SETTING_NAME, NULL, NULL, TRUE },
{ NM_SETTING_WIRED_SETTING_NAME, "ethernet", NULL, FALSE },
{ NULL, NULL, NULL, FALSE }
};
/* Available connection types */
static const NameItem nmc_valid_connection_types[] = {
{ NM_SETTING_GENERIC_SETTING_NAME, NULL, nmc_generic_settings }, /* Needs to be first. */
@ -3098,6 +3107,7 @@ static const NameItem nmc_valid_connection_types[] = {
{ NM_SETTING_MACSEC_SETTING_NAME, NULL, nmc_macsec_settings },
{ NM_SETTING_MACVLAN_SETTING_NAME, NULL, nmc_macvlan_settings },
{ NM_SETTING_VXLAN_SETTING_NAME, NULL, nmc_vxlan_settings },
{ NM_SETTING_DUMMY_SETTING_NAME, NULL, nmc_dummy_settings },
{ NULL, NULL, NULL }
};

View file

@ -717,6 +717,13 @@ NmcOutputField nmc_fields_setting_dcb[] = {
NM_SETTING_DCB_PRIORITY_STRICT_BANDWIDTH","\
NM_SETTING_DCB_PRIORITY_TRAFFIC_CLASS
/* Available fields for NM_SETTING_DUMMY_SETTING_NAME */
NmcOutputField nmc_fields_setting_dummy[] = {
SETTING_FIELD ("name"), /* 0 */
{NULL, NULL, 0, NULL, FALSE, FALSE, 0}
};
#define NMC_FIELDS_SETTING_DUMMY_ALL "name"
/* Available fields for NM_SETTING_TUN_SETTING_NAME */
NmcOutputField nmc_fields_setting_tun[] = {
SETTING_FIELD ("name"), /* 0 */

View file

@ -95,5 +95,6 @@ extern NmcOutputField nmc_fields_setting_macvlan[];
extern NmcOutputField nmc_fields_setting_macsec[];
extern NmcOutputField nmc_fields_setting_vxlan[];
extern NmcOutputField nmc_fields_setting_proxy[];
extern NmcOutputField nmc_fields_setting_dummy[];
#endif /* NMC_SETTINGS_H */

View file

@ -1054,7 +1054,7 @@ init_if (GDBusInterface *interface, gpointer user_data)
props = g_dbus_proxy_get_cached_property_names (proxy);
for (prop = props; *prop; prop++) {
for (prop = props; prop && *prop; prop++) {
val = g_dbus_proxy_get_cached_property (proxy, *prop);
str = g_variant_print (val, TRUE);
handle_property_changed (self, *prop, val);

View file

@ -925,6 +925,7 @@
<listitem><para><literal>ip-tunnel</literal></para></listitem>
<listitem><para><literal>macvlan</literal></para></listitem>
<listitem><para><literal>vxlan</literal></para></listitem>
<listitem><para><literal>dummy</literal></para></listitem>
</itemizedlist>
<para>The most typical uses are described in the <link linkend='examples' endterm='examples.title' /> section.</para>