diff --git a/clients/cli/connections.c b/clients/cli/connections.c index a4f129b6a3..21f2f0df0b 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -101,27 +101,57 @@ NM_UTILS_LOOKUP_STR_DEFINE_STATIC (vpn_connection_state_to_string, NMVpnConnecti * prefers an alias instead of the settings name when in pretty print mode. * That is so that we print "wifi" instead of "802-11-wireless" in "nmcli c". */ static const char * -connection_type_pretty (const char *type, NMCPrintOutput print_output) +connection_type_to_display (const char *type, NMMetaAccessorGetType get_type) { const NMMetaSettingInfoEditor *editor; int i; - if (print_output == NMC_PRINT_TERSE) + nm_assert (NM_IN_SET (get_type, NM_META_ACCESSOR_GET_TYPE_PRETTY, NM_META_ACCESSOR_GET_TYPE_PARSABLE)); + + if (!type) + return NULL; + + if (get_type != NM_META_ACCESSOR_GET_TYPE_PRETTY) return type; for (i = 0; i < _NM_META_SETTING_TYPE_NUM; i++) { editor = &nm_meta_setting_infos_editor[i]; - if (strcmp (type, editor->general->setting_name) == 0) { - if (editor->alias) - return editor->alias; - break; - } + if (nm_streq (type, editor->general->setting_name)) + return editor->alias ?: type; } - return type; } -/* Caller has to free the returned string */ +static int +active_connection_get_state_ord (NMActiveConnection *active) +{ + /* returns an integer related to @active's state, that can be used for sorting + * active connections based on their activation state. */ + if (!active) + return -2; + + switch (nm_active_connection_get_state (active)) { + case NM_ACTIVE_CONNECTION_STATE_UNKNOWN: return 0; + case NM_ACTIVE_CONNECTION_STATE_DEACTIVATED: return 1; + case NM_ACTIVE_CONNECTION_STATE_DEACTIVATING: return 2; + case NM_ACTIVE_CONNECTION_STATE_ACTIVATING: return 3; + case NM_ACTIVE_CONNECTION_STATE_ACTIVATED: return 4; + } + return -1; +} + +static int +active_connection_cmp (NMActiveConnection *ac_a, NMActiveConnection *ac_b) +{ + NM_CMP_SELF (ac_a, ac_b); + NM_CMP_DIRECT (active_connection_get_state_ord (ac_b), + active_connection_get_state_ord (ac_a)); + NM_CMP_DIRECT_STRCMP0 (nm_active_connection_get_id (ac_a), nm_active_connection_get_id (ac_b)); + NM_CMP_DIRECT_STRCMP0 (nm_active_connection_get_connection_type (ac_a), nm_active_connection_get_connection_type (ac_b)); + NM_CMP_DIRECT_STRCMP0 (nm_object_get_path (NM_OBJECT (ac_a)), nm_object_get_path (NM_OBJECT (ac_b))); + return 0; +} + static char * get_ac_device_string (NMActiveConnection *active) { @@ -152,41 +182,446 @@ get_ac_device_string (NMActiveConnection *active) /*****************************************************************************/ -const NmcMetaGenericInfo *const nmc_fields_con_show[] = { - NMC_META_GENERIC ("NAME"), /* 0 */ - NMC_META_GENERIC ("UUID"), /* 1 */ - NMC_META_GENERIC ("TYPE"), /* 2 */ - NMC_META_GENERIC ("TIMESTAMP"), /* 3 */ - NMC_META_GENERIC ("TIMESTAMP-REAL"), /* 4 */ - NMC_META_GENERIC ("AUTOCONNECT"), /* 5 */ - NMC_META_GENERIC ("AUTOCONNECT-PRIORITY"), /* 6 */ - NMC_META_GENERIC ("READONLY"), /* 7 */ - NMC_META_GENERIC ("DBUS-PATH"), /* 8 */ - NMC_META_GENERIC ("ACTIVE"), /* 9 */ - NMC_META_GENERIC ("DEVICE"), /* 10 */ - NMC_META_GENERIC ("STATE"), /* 11 */ - NMC_META_GENERIC ("ACTIVE-PATH"), /* 12 */ - NMC_META_GENERIC ("SLAVE"), /* 13 */ - NULL, +/* FIXME: The same or similar code for VPN info appears also in nm-applet (applet-dialogs.c), + * and in gnome-control-center as well. It could probably be shared somehow. */ + +static char * +get_vpn_connection_type (NMConnection *connection) +{ + const char *type, *p; + + /* The service type is in form of "org.freedesktop.NetworkManager.vpnc". + * Extract end part after last dot, e.g. "vpnc" + */ + type = nm_setting_vpn_get_service_type (nm_connection_get_setting_vpn (connection)); + p = strrchr (type, '.'); + return g_strdup (p ? p + 1 : type); +} + +/* VPN parameters can be found at: + * http://git.gnome.org/browse/network-manager-openvpn/tree/src/nm-openvpn-service.h + * http://git.gnome.org/browse/network-manager-vpnc/tree/src/nm-vpnc-service.h + * http://git.gnome.org/browse/network-manager-pptp/tree/src/nm-pptp-service.h + * http://git.gnome.org/browse/network-manager-openconnect/tree/src/nm-openconnect-service.h + * http://git.gnome.org/browse/network-manager-openswan/tree/src/nm-openswan-service.h + * See also 'properties' directory in these plugins. + */ +static const gchar * +find_vpn_gateway_key (const char *vpn_type) +{ + if (g_strcmp0 (vpn_type, "openvpn") == 0) return "remote"; + if (g_strcmp0 (vpn_type, "vpnc") == 0) return "IPSec gateway"; + if (g_strcmp0 (vpn_type, "pptp") == 0) return "gateway"; + if (g_strcmp0 (vpn_type, "openconnect") == 0) return "gateway"; + if (g_strcmp0 (vpn_type, "openswan") == 0) return "right"; + if (g_strcmp0 (vpn_type, "libreswan") == 0) return "right"; + if (g_strcmp0 (vpn_type, "ssh") == 0) return "remote"; + if (g_strcmp0 (vpn_type, "l2tp") == 0) return "gateway"; + return ""; +} + +static const gchar * +find_vpn_username_key (const char *vpn_type) +{ + if (g_strcmp0 (vpn_type, "openvpn") == 0) return "username"; + if (g_strcmp0 (vpn_type, "vpnc") == 0) return "Xauth username"; + if (g_strcmp0 (vpn_type, "pptp") == 0) return "user"; + if (g_strcmp0 (vpn_type, "openconnect") == 0) return "username"; + if (g_strcmp0 (vpn_type, "openswan") == 0) return "leftxauthusername"; + if (g_strcmp0 (vpn_type, "libreswan") == 0) return "leftxauthusername"; + if (g_strcmp0 (vpn_type, "l2tp") == 0) return "user"; + return ""; +} + +enum VpnDataItem { + VPN_DATA_ITEM_GATEWAY, + VPN_DATA_ITEM_USERNAME +}; + +static const gchar * +get_vpn_data_item (NMConnection *connection, enum VpnDataItem vpn_data_item) +{ + const char *key; + gs_free char *type = NULL; + + type = get_vpn_connection_type (connection); + + switch (vpn_data_item) { + case VPN_DATA_ITEM_GATEWAY: + key = find_vpn_gateway_key (type); + break; + case VPN_DATA_ITEM_USERNAME: + key = find_vpn_username_key (type); + break; + default: + key = ""; + break; + } + + return nm_setting_vpn_get_data_item (nm_connection_get_setting_vpn (connection), key); +} + +/*****************************************************************************/ + +typedef struct { + NMConnection *connection; + NMActiveConnection *primary_active; + GPtrArray *all_active; + bool show_active_fields; +} MetagenConShowRowData; + +static MetagenConShowRowData * +_metagen_con_show_row_data_new_for_connection (NMRemoteConnection *connection, gboolean show_active_fields) +{ + MetagenConShowRowData *row_data; + + row_data = g_slice_new0 (MetagenConShowRowData); + row_data->connection = g_object_ref (NM_CONNECTION (connection)); + row_data->show_active_fields = show_active_fields; + return row_data; +} + +static MetagenConShowRowData * +_metagen_con_show_row_data_new_for_active_connection (NMRemoteConnection *connection, NMActiveConnection *active, gboolean show_active_fields) +{ + MetagenConShowRowData *row_data; + + row_data = g_slice_new0 (MetagenConShowRowData); + if (connection) + row_data->connection = g_object_ref (NM_CONNECTION (connection)); + row_data->primary_active = g_object_ref (active); + row_data->show_active_fields = show_active_fields; + return row_data; +} + +static void +_metagen_con_show_row_data_add_active_connection (MetagenConShowRowData *row_data, NMActiveConnection *active) +{ + if (!row_data->primary_active) { + row_data->primary_active = g_object_ref (active); + return; + } + if (!row_data->all_active) { + row_data->all_active = g_ptr_array_new_with_free_func (g_object_unref); + g_ptr_array_add (row_data->all_active, g_object_ref (row_data->primary_active)); + } + g_ptr_array_add (row_data->all_active, g_object_ref (active)); +} + +static void +_metagen_con_show_row_data_init_primary_active (MetagenConShowRowData *row_data) +{ + NMActiveConnection *ac, *best_ac; + guint i; + + if (!row_data->all_active) + return; + + best_ac = row_data->all_active->pdata[0]; + for (i = 1; i < row_data->all_active->len; i++) { + ac = row_data->all_active->pdata[i]; + + if (active_connection_get_state_ord (ac) > active_connection_get_state_ord (best_ac)) + best_ac = ac; + } + + if (row_data->primary_active != best_ac) { + g_object_unref (row_data->primary_active); + row_data->primary_active = g_object_ref (best_ac); + } + g_clear_pointer (&row_data->all_active, g_ptr_array_unref); +} + +static void +_metagen_con_show_row_data_destroy (gpointer data) +{ + MetagenConShowRowData *row_data = data; + + if (!row_data) + return; + + g_clear_object (&row_data->connection); + g_clear_object (&row_data->primary_active); + g_clear_pointer (&row_data->all_active, g_ptr_array_unref); + g_slice_free (MetagenConShowRowData, row_data); +} + +static const char * +_con_show_fcn_get_id (NMConnection *c, NMActiveConnection *ac) +{ + NMSettingConnection *s_con = NULL; + const char *s; + + if (c) + s_con = nm_connection_get_setting_connection (c); + + s = s_con ? nm_setting_connection_get_id (s_con) : NULL; + if (!s && ac) { + /* note that if we have no s_con, that usually means that the user has no permissions + * to see the connection. We still fall to get the ID from the active-connection, + * which exposes it despite the user having no permissions. + * + * That might be unexpected, because the user is shown an ID, which he later + * is unable to resolve in other operations. */ + s = nm_active_connection_get_id (ac); + } + return s; +} + +static const char * +_con_show_fcn_get_type (NMConnection *c, NMActiveConnection *ac, NMMetaAccessorGetType get_type) +{ + NMSettingConnection *s_con = NULL; + const char *s; + + if (c) + s_con = nm_connection_get_setting_connection (c); + + s = s_con ? nm_setting_connection_get_connection_type (s_con) : NULL; + if (!s && ac) { + /* see _con_show_fcn_get_id() for why we fallback to get the value + * from @ac. */ + s = nm_active_connection_get_connection_type (ac); + } + return connection_type_to_display (s, get_type); +} + +static gconstpointer +_metagen_con_show_get_fcn (NMC_META_GENERIC_INFO_GET_FCN_ARGS) +{ + const MetagenConShowRowData *row_data = target; + NMConnection *c = row_data->connection; + NMActiveConnection *ac = row_data->primary_active; + NMSettingConnection *s_con = NULL; + const char *s; + char *s_mut; + + NMC_HANDLE_COLOR ( ac + ? nm_active_connection_get_state (ac) + : NM_META_COLOR_CONNECTION_UNKNOWN); + + if (c) + s_con = nm_connection_get_setting_connection (c); + + if (!row_data->show_active_fields) { + /* we are not supposed to show any fields of the active connection. + * We only tracked the primary_active to get the coloring right. + * From now on, there is no active connection. */ + ac = NULL; + + /* in this mode, we expect that we are called only with connections that + * have a [connection] setting and a UUID. Otherwise, the connection is + * effectively invisible to the user, and should be hidden. + * + * But in that case, we expect that the caller pre-filtered this row out. + * So assert(). */ + nm_assert (s_con); + nm_assert (nm_setting_connection_get_uuid (s_con)); + } + + nm_assert (NM_IN_SET (get_type, NM_META_ACCESSOR_GET_TYPE_PRETTY, NM_META_ACCESSOR_GET_TYPE_PARSABLE)); + + switch (info->info_type) { + case NMC_GENERIC_INFO_TYPE_CON_SHOW_NAME: + return _con_show_fcn_get_id (c, ac); + case NMC_GENERIC_INFO_TYPE_CON_SHOW_UUID: + s = s_con ? nm_setting_connection_get_uuid (s_con) : NULL; + if (!s && ac) { + /* see _con_show_fcn_get_id() for why we fallback to get the value + * from @ac. */ + s = nm_active_connection_get_uuid (ac); + } + return s; + case NMC_GENERIC_INFO_TYPE_CON_SHOW_TYPE: + return _con_show_fcn_get_type (c, ac, get_type); + case NMC_GENERIC_INFO_TYPE_CON_SHOW_TIMESTAMP: + case NMC_GENERIC_INFO_TYPE_CON_SHOW_TIMESTAMP_REAL: + if (!s_con) + return NULL; + { + guint64 timestamp; + time_t timestamp_real; + + timestamp = nm_setting_connection_get_timestamp (s_con); + + if (info->info_type == NMC_GENERIC_INFO_TYPE_CON_SHOW_TIMESTAMP) + return (*out_to_free = g_strdup_printf ("%" G_GUINT64_FORMAT, timestamp)); + else { + if (!timestamp) { + if (get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY) + return _("never"); + return "never"; + } + timestamp_real = timestamp; + s_mut = g_malloc0 (128); + strftime (s_mut, 64, "%c", localtime (×tamp_real)); + return (*out_to_free = s_mut); + } + } + case NMC_GENERIC_INFO_TYPE_CON_SHOW_AUTOCONNECT: + if (!s_con) + return NULL; + return nmc_meta_generic_get_bool (nm_setting_connection_get_autoconnect (s_con), get_type); + case NMC_GENERIC_INFO_TYPE_CON_SHOW_AUTOCONNECT_PRIORITY: + if (!s_con) + return NULL; + return (*out_to_free = g_strdup_printf ("%d", nm_setting_connection_get_autoconnect_priority (s_con))); + case NMC_GENERIC_INFO_TYPE_CON_SHOW_READONLY: + if (!s_con) + return NULL; + return nmc_meta_generic_get_bool (nm_setting_connection_get_read_only (s_con), get_type); + case NMC_GENERIC_INFO_TYPE_CON_SHOW_DBUS_PATH: + if (!c) + return NULL; + return nm_connection_get_path (c); + case NMC_GENERIC_INFO_TYPE_CON_SHOW_ACTIVE: + return nmc_meta_generic_get_bool (!!ac, get_type); + case NMC_GENERIC_INFO_TYPE_CON_SHOW_DEVICE: + if (ac) + return (*out_to_free = get_ac_device_string (ac)); + return NULL; + case NMC_GENERIC_INFO_TYPE_CON_SHOW_STATE: + return nmc_meta_generic_get_str_i18n (ac + ? active_connection_state_to_string (nm_active_connection_get_state (ac)) + : NULL, + get_type); + case NMC_GENERIC_INFO_TYPE_CON_SHOW_ACTIVE_PATH: + if (ac) + return nm_object_get_path (NM_OBJECT (ac)); + return NULL; + case NMC_GENERIC_INFO_TYPE_CON_SHOW_SLAVE: + if (!s_con) + return NULL; + return nm_setting_connection_get_slave_type (s_con); + default: + break; + } + + g_return_val_if_reached (NULL); +} + +const NmcMetaGenericInfo *const metagen_con_show[_NMC_GENERIC_INFO_TYPE_CON_SHOW_NUM + 1] = { +#define _METAGEN_CON_SHOW(type, name) \ + [type] = NMC_META_GENERIC(name, .info_type = type, .get_fcn = _metagen_con_show_get_fcn) + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_NAME, "NAME"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_UUID, "UUID"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_TYPE, "TYPE"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_TIMESTAMP, "TIMESTAMP"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_TIMESTAMP_REAL, "TIMESTAMP-REAL"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_AUTOCONNECT, "AUTOCONNECT"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_AUTOCONNECT_PRIORITY, "AUTOCONNECT-PRIORITY"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_READONLY, "READONLY"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_DBUS_PATH, "DBUS-PATH"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_ACTIVE, "ACTIVE"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_DEVICE, "DEVICE"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_STATE, "STATE"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_ACTIVE_PATH, "ACTIVE-PATH"), + _METAGEN_CON_SHOW (NMC_GENERIC_INFO_TYPE_CON_SHOW_SLAVE, "SLAVE"), }; #define NMC_FIELDS_CON_SHOW_COMMON "NAME,UUID,TYPE,DEVICE" -const NmcMetaGenericInfo *const nmc_fields_con_active_details_general[] = { - NMC_META_GENERIC ("GROUP"), /* 0 */ - NMC_META_GENERIC ("NAME"), /* 1 */ - NMC_META_GENERIC ("UUID"), /* 2 */ - NMC_META_GENERIC ("DEVICES"), /* 3 */ - NMC_META_GENERIC ("STATE"), /* 4 */ - NMC_META_GENERIC ("DEFAULT"), /* 5 */ - NMC_META_GENERIC ("DEFAULT6"), /* 6 */ - NMC_META_GENERIC ("SPEC-OBJECT"), /* 7 */ - NMC_META_GENERIC ("VPN"), /* 8 */ - NMC_META_GENERIC ("DBUS-PATH"), /* 9 */ - NMC_META_GENERIC ("CON-PATH"), /* 10 */ - NMC_META_GENERIC ("ZONE"), /* 11 */ - NMC_META_GENERIC ("MASTER-PATH"), /* 12 */ - NULL, +/*****************************************************************************/ + +static gconstpointer +_metagen_con_active_general_get_fcn (NMC_META_GENERIC_INFO_GET_FCN_ARGS) +{ + NMActiveConnection *ac = target; + NMConnection *c; + NMSettingConnection *s_con = NULL; + NMDevice *dev; + guint i; + const char *s; + + NMC_HANDLE_COLOR (NM_META_COLOR_NONE); + + nm_assert (NM_IN_SET (get_type, NM_META_ACCESSOR_GET_TYPE_PRETTY, NM_META_ACCESSOR_GET_TYPE_PARSABLE)); + + c = NM_CONNECTION (nm_active_connection_get_connection (ac)); + if (c) + s_con = nm_connection_get_setting_connection (c); + + switch (info->info_type) { + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_NAME: + return nm_active_connection_get_id (ac); + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_UUID: + return nm_active_connection_get_uuid (ac); + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEVICES: + { + GString *str = NULL; + const GPtrArray *devices; + + s = NULL; + devices = nm_active_connection_get_devices (ac); + if (devices) { + for (i = 0; i < devices->len; i++) { + NMDevice *device = devices->pdata[i]; + const char *iface; + + iface = nm_device_get_iface (device); + if (!iface) + continue; + if (!s) { + s = iface; + continue; + } + if (!str) + str = g_string_new (s); + g_string_append_c (str, ','); + g_string_append (str, iface); + } + } + if (str) + return (*out_to_free = g_string_free (str, FALSE)); + return s; + } + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_STATE: + return nmc_meta_generic_get_str_i18n (active_connection_state_to_string (nm_active_connection_get_state (ac)), + get_type); + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEFAULT: + return nmc_meta_generic_get_bool (nm_active_connection_get_default (ac), get_type); + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEFAULT6: + return nmc_meta_generic_get_bool (nm_active_connection_get_default6 (ac), get_type); + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_SPEC_OBJECT: + return nm_active_connection_get_specific_object_path (ac); + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_VPN: + return nmc_meta_generic_get_bool (NM_IS_VPN_CONNECTION (ac), get_type); + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DBUS_PATH: + return nm_object_get_path (NM_OBJECT (ac)); + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_CON_PATH: + return c ? nm_connection_get_path (c) : NULL; + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_ZONE: + /* this is really ugly, because the zone is not a property of the active-connection, + * but the settings-connection profile. There is no guarantee, that they agree. */ + return s_con ? nm_setting_connection_get_zone (s_con) : NULL; + case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_MASTER_PATH: + dev = nm_active_connection_get_master (ac); + return dev ? nm_object_get_path (NM_OBJECT (dev)) : NULL; + default: + break; + } + + g_return_val_if_reached (NULL); +} + +const NmcMetaGenericInfo *const metagen_con_active_general[_NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_NUM + 1] = { +#define _METAGEN_CON_ACTIVE_GENERAL(type, name) \ + [type] = NMC_META_GENERIC(name, .info_type = type, .get_fcn = _metagen_con_active_general_get_fcn) + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_NAME, "NAME"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_UUID, "UUID"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEVICES, "DEVICES"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_STATE, "STATE"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEFAULT, "DEFAULT"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEFAULT6, "DEFAULT6"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_SPEC_OBJECT, "SPEC-OBJECT"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_VPN, "VPN"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DBUS_PATH, "DBUS-PATH"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_CON_PATH, "CON-PATH"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_ZONE, "ZONE"), + _METAGEN_CON_ACTIVE_GENERAL (NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_MASTER_PATH, "MASTER-PATH"), }; + +/*****************************************************************************/ + #define NMC_FIELDS_SETTINGS_NAMES_ALL NM_SETTING_CONNECTION_SETTING_NAME","\ NM_SETTING_WIRED_SETTING_NAME","\ NM_SETTING_802_1X_SETTING_NAME","\ @@ -237,7 +672,7 @@ const NmcMetaGenericInfo *const nmc_fields_con_active_details_vpn[] = { }; const NmcMetaGenericInfo *const nmc_fields_con_active_details_groups[] = { - NMC_META_GENERIC_WITH_NESTED ("GENERAL", nmc_fields_con_active_details_general + 1), /* 0 */ + NMC_META_GENERIC_WITH_NESTED ("GENERAL", metagen_con_active_general), /* 0 */ NMC_META_GENERIC_WITH_NESTED ("IP4", metagen_ip4_config), /* 1 */ NMC_META_GENERIC_WITH_NESTED ("DHCP4", nmc_fields_dhcp_config + 1), /* 2 */ NMC_META_GENERIC_WITH_NESTED ("IP6", nmc_fields_ip6_config + 1), /* 3 */ @@ -595,36 +1030,42 @@ construct_header_name (const char *base, const char *spec) return g_strdup_printf ("%s (%s)", base, spec); } +static int +get_ac_for_connection_cmp (gconstpointer pa, gconstpointer pb, gpointer user_data) +{ + NMActiveConnection *ac_a = *((NMActiveConnection *const*) pa); + NMActiveConnection *ac_b = *((NMActiveConnection *const*) pb); + + return active_connection_cmp (ac_a, ac_b); +} + static NMActiveConnection * get_ac_for_connection (const GPtrArray *active_cons, NMConnection *connection, GPtrArray **out_result) { - const char *con_path, *ac_con_path; guint i; NMActiveConnection *best_candidate = NULL; GPtrArray *result = out_result ? *out_result : NULL; - con_path = nm_connection_get_path (connection); for (i = 0; i < active_cons->len; i++) { NMActiveConnection *candidate = g_ptr_array_index (active_cons, i); NMRemoteConnection *con; con = nm_active_connection_get_connection (candidate); - if (NM_CONNECTION (con) != connection) { - /* also compare the D-Bus paths. Why? I don't know. */ - ac_con_path = con ? nm_connection_get_path (NM_CONNECTION (con)) : NULL; - if (!nm_streq0 (ac_con_path, con_path)) - continue; - } + if (NM_CONNECTION (con) != connection) + continue; if (!out_result) return candidate; - if (!best_candidate) - best_candidate = candidate; if (!result) result = g_ptr_array_new_with_free_func (g_object_unref); g_ptr_array_add (result, g_object_ref (candidate)); } + if (result) { + g_ptr_array_sort_with_data (result, get_ac_for_connection_cmp, NULL); + best_candidate = result->pdata[0]; + } + NM_SET_OUT (out_result, result); return best_candidate; } @@ -767,178 +1208,6 @@ nmc_active_connection_state_to_color (NMActiveConnectionState state) return NM_META_COLOR_CONNECTION_UNKNOWN; } -static void -fill_output_connection (NMConnection *connection, NMClient *client, NMCPrintOutput print_output, - GPtrArray *output_data, gboolean active_only) -{ - NMSettingConnection *s_con; - guint64 timestamp; - time_t timestamp_real; - char *timestamp_str; - char *timestamp_real_str = ""; - char *prio_str; - NmcOutputField *arr; - NMActiveConnection *ac = NULL; - const char *ac_path = NULL; - const char *ac_state = NULL; - NMActiveConnectionState ac_state_int = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; - char *ac_dev = NULL; - NMMetaColor color; - - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - - ac = get_ac_for_connection (nm_client_get_active_connections (client), connection, NULL); - if (active_only && !ac) - return; - - if (ac) { - ac_path = nm_object_get_path (NM_OBJECT (ac)); - ac_state_int = nm_active_connection_get_state (ac); - ac_state = gettext (active_connection_state_to_string (ac_state_int)); - ac_dev = get_ac_device_string (ac); - } - - /* Obtain field values */ - timestamp = nm_setting_connection_get_timestamp (s_con); - timestamp_str = g_strdup_printf ("%" G_GUINT64_FORMAT, timestamp); - if (timestamp) { - timestamp_real = timestamp; - timestamp_real_str = g_malloc0 (64); - strftime (timestamp_real_str, 64, "%c", localtime (×tamp_real)); - } - prio_str = g_strdup_printf ("%u", nm_setting_connection_get_autoconnect_priority (s_con)); - - arr = nmc_dup_fields_array ((const NMMetaAbstractInfo *const*) nmc_fields_con_show, 0); - - /* Show active connections in color */ - color = nmc_active_connection_state_to_color (ac_state_int); - set_val_color_all (arr, color); - - set_val_strc (arr, 0, nm_setting_connection_get_id (s_con)); - set_val_strc (arr, 1, nm_setting_connection_get_uuid (s_con)); - set_val_strc (arr, 2, connection_type_pretty (nm_setting_connection_get_connection_type (s_con), print_output)); - set_val_str (arr, 3, timestamp_str); - set_val_str (arr, 4, timestamp ? timestamp_real_str : g_strdup (_("never"))); - set_val_strc (arr, 5, nm_setting_connection_get_autoconnect (s_con) ? _("yes") : _("no")); - set_val_str (arr, 6, prio_str); - set_val_strc (arr, 7, nm_setting_connection_get_read_only (s_con) ? _("yes") : _("no")); - set_val_strc (arr, 8, nm_connection_get_path (connection)); - set_val_strc (arr, 9, ac ? _("yes") : _("no")); - set_val_str (arr, 10, ac_dev); - set_val_strc (arr, 11, ac_state); - set_val_strc (arr, 12, ac_path); - set_val_strc (arr, 13, nm_setting_connection_get_slave_type (s_con)); - - g_ptr_array_add (output_data, arr); -} - -static void -fill_output_connection_for_invisible (NMActiveConnection *ac, NMCPrintOutput print_output, GPtrArray *output_data) -{ - NmcOutputField *arr; - const char *ac_path = NULL; - const char *ac_state = NULL; - char *name, *ac_dev = NULL; - - name = g_strdup_printf (" %s", nm_active_connection_get_id (ac)); - ac_path = nm_object_get_path (NM_OBJECT (ac)); - ac_state = active_connection_state_to_string (nm_active_connection_get_state (ac)); - ac_dev = get_ac_device_string (ac); - - arr = nmc_dup_fields_array ((const NMMetaAbstractInfo *const*) nmc_fields_con_show, 0); - - set_val_str (arr, 0, name); - set_val_strc (arr, 1, nm_active_connection_get_uuid (ac)); - set_val_strc (arr, 2, connection_type_pretty (nm_active_connection_get_connection_type (ac), print_output)); - set_val_strc (arr, 3, NULL); - set_val_strc (arr, 4, NULL); - set_val_strc (arr, 5, NULL); - set_val_strc (arr, 6, NULL); - set_val_strc (arr, 7, NULL); - set_val_strc (arr, 8, NULL); - set_val_strc (arr, 9, _("yes")); - set_val_str (arr, 10, ac_dev); - set_val_strc (arr, 11, ac_state); - set_val_strc (arr, 12, ac_path); - set_val_strc (arr, 13, NULL); - - set_val_color_all (arr, NM_META_COLOR_CONNECTION_INVISIBLE); - - g_ptr_array_add (output_data, arr); -} - -static void -fill_output_active_connection (NMActiveConnection *active, - GPtrArray *output_data, - gboolean with_group, - guint32 o_flags) -{ - NMRemoteConnection *con; - NMSettingConnection *s_con = NULL; - const GPtrArray *devices; - GString *dev_str; - NMActiveConnectionState state; - NMDevice *master; - const char *con_path = NULL, *con_zone = NULL; - int i; - const NMMetaAbstractInfo *const*tmpl; - NmcOutputField *arr; - int idx_start = with_group ? 0 : 1; - - con = nm_active_connection_get_connection (active); - if (con) { - con_path = nm_connection_get_path (NM_CONNECTION (con)); - s_con = nm_connection_get_setting_connection (NM_CONNECTION (con)); - g_assert (s_con); - con_zone = nm_setting_connection_get_zone (s_con); - } - - state = nm_active_connection_get_state (active); - master = nm_active_connection_get_master (active); - - /* Get devices of the active connection */ - dev_str = g_string_new (NULL); - devices = nm_active_connection_get_devices (active); - for (i = 0; i < devices->len; i++) { - NMDevice *device = g_ptr_array_index (devices, i); - const char *dev_iface = nm_device_get_iface (device); - - if (dev_iface) { - g_string_append (dev_str, dev_iface); - g_string_append_c (dev_str, ','); - } - } - if (dev_str->len > 0) - g_string_truncate (dev_str, dev_str->len - 1); /* Cut off last ',' */ - - tmpl = (const NMMetaAbstractInfo *const*) nmc_fields_con_active_details_general; - if (!with_group) - tmpl++; - - /* Fill field values */ - arr = nmc_dup_fields_array (tmpl, o_flags); - if (with_group) - set_val_strc (arr, 0, nmc_fields_con_active_details_groups[0]->name); - set_val_strc (arr, 1-idx_start, nm_active_connection_get_id (active)); - set_val_strc (arr, 2-idx_start, nm_active_connection_get_uuid (active)); - set_val_str (arr, 3-idx_start, dev_str->str); - set_val_strc (arr, 4-idx_start, active_connection_state_to_string (state)); - set_val_strc (arr, 5-idx_start, nm_active_connection_get_default (active) ? _("yes") : _("no")); - set_val_strc (arr, 6-idx_start, nm_active_connection_get_default6 (active) ? _("yes") : _("no")); - set_val_strc (arr, 7-idx_start, nm_active_connection_get_specific_object_path (active)); - set_val_strc (arr, 8-idx_start, NM_IS_VPN_CONNECTION (active) ? _("yes") : _("no")); - set_val_strc (arr, 9-idx_start, nm_object_get_path (NM_OBJECT (active))); - set_val_strc (arr, 10-idx_start, con_path); - set_val_strc (arr, 11-idx_start, con_zone); - set_val_strc (arr, 12-idx_start, master ? nm_object_get_path (NM_OBJECT (master)) : NULL); - set_val_strc (arr, 13-idx_start, s_con ? nm_setting_connection_get_slave_type (s_con) : NULL); - - g_ptr_array_add (output_data, arr); - - g_string_free (dev_str, FALSE); -} - typedef struct { char **array; guint32 idx; @@ -952,85 +1221,6 @@ fill_vpn_data_item (const char *key, const char *value, gpointer user_data) info->array[info->idx++] = g_strdup_printf ("%s = %s", key, value); } -// FIXME: The same or similar code for VPN info appears also in nm-applet (applet-dialogs.c), -// and in gnome-control-center as well. It could probably be shared somehow. -static char * -get_vpn_connection_type (NMConnection *connection) -{ - const char *type, *p; - - /* The service type is in form of "org.freedesktop.NetworkManager.vpnc". - * Extract end part after last dot, e.g. "vpnc" - */ - type = nm_setting_vpn_get_service_type (nm_connection_get_setting_vpn (connection)); - p = strrchr (type, '.'); - return g_strdup (p ? p + 1 : type); -} - -/* VPN parameters can be found at: - * http://git.gnome.org/browse/network-manager-openvpn/tree/src/nm-openvpn-service.h - * http://git.gnome.org/browse/network-manager-vpnc/tree/src/nm-vpnc-service.h - * http://git.gnome.org/browse/network-manager-pptp/tree/src/nm-pptp-service.h - * http://git.gnome.org/browse/network-manager-openconnect/tree/src/nm-openconnect-service.h - * http://git.gnome.org/browse/network-manager-openswan/tree/src/nm-openswan-service.h - * See also 'properties' directory in these plugins. - */ -static const gchar * -find_vpn_gateway_key (const char *vpn_type) -{ - if (g_strcmp0 (vpn_type, "openvpn") == 0) return "remote"; - if (g_strcmp0 (vpn_type, "vpnc") == 0) return "IPSec gateway"; - if (g_strcmp0 (vpn_type, "pptp") == 0) return "gateway"; - if (g_strcmp0 (vpn_type, "openconnect") == 0) return "gateway"; - if (g_strcmp0 (vpn_type, "openswan") == 0) return "right"; - if (g_strcmp0 (vpn_type, "libreswan") == 0) return "right"; - if (g_strcmp0 (vpn_type, "ssh") == 0) return "remote"; - if (g_strcmp0 (vpn_type, "l2tp") == 0) return "gateway"; - return ""; -} - -static const gchar * -find_vpn_username_key (const char *vpn_type) -{ - if (g_strcmp0 (vpn_type, "openvpn") == 0) return "username"; - if (g_strcmp0 (vpn_type, "vpnc") == 0) return "Xauth username"; - if (g_strcmp0 (vpn_type, "pptp") == 0) return "user"; - if (g_strcmp0 (vpn_type, "openconnect") == 0) return "username"; - if (g_strcmp0 (vpn_type, "openswan") == 0) return "leftxauthusername"; - if (g_strcmp0 (vpn_type, "libreswan") == 0) return "leftxauthusername"; - if (g_strcmp0 (vpn_type, "l2tp") == 0) return "user"; - return ""; -} - -enum VpnDataItem { - VPN_DATA_ITEM_GATEWAY, - VPN_DATA_ITEM_USERNAME -}; - -static const gchar * -get_vpn_data_item (NMConnection *connection, enum VpnDataItem vpn_data_item) -{ - const char *key; - gs_free char *type = NULL; - - type = get_vpn_connection_type (connection); - - switch (vpn_data_item) { - case VPN_DATA_ITEM_GATEWAY: - key = find_vpn_gateway_key (type); - break; - case VPN_DATA_ITEM_USERNAME: - key = find_vpn_username_key (type); - break; - default: - key = ""; - break; - } - - return nm_setting_vpn_get_data_item (nm_connection_get_setting_vpn (connection), key); -} -/* FIXME end */ - static gboolean nmc_active_connection_details (NMActiveConnection *acon, NmCli *nmc) { @@ -1083,29 +1273,27 @@ nmc_active_connection_details (NMActiveConnection *acon, NmCli *nmc) int group_idx = g_array_index (print_groups, int, i); char *group_fld = (char *) g_ptr_array_index (group_fields, i); - if (nmc->nmc_config.print_output != NMC_PRINT_TERSE && !nmc->nmc_config.multiline_output && was_output) - g_print ("\n"); /* Empty line */ + if ( nmc->nmc_config.print_output != NMC_PRINT_TERSE + && !nmc->nmc_config.multiline_output + && was_output) + g_print ("\n"); was_output = FALSE; - /* GENERAL */ - if (strcasecmp (nmc_fields_con_active_details_groups[group_idx]->name, nmc_fields_con_active_details_groups[0]->name) == 0) { - NMC_OUTPUT_DATA_DEFINE_SCOPED (out); + if (nmc_fields_con_active_details_groups[group_idx]->nested == metagen_con_active_general) { + gs_free char *f = NULL; - /* Add field names */ - tmpl = (const NMMetaAbstractInfo *const*) nmc_fields_con_active_details_general; - out_indices = parse_output_fields (group_fld, - tmpl, FALSE, NULL, NULL); - arr = nmc_dup_fields_array (tmpl, NMC_OF_FLAG_FIELD_NAMES); - g_ptr_array_add (out.output_data, arr); - - /* Fill in values */ - fill_output_active_connection (acon, out.output_data, TRUE, NMC_OF_FLAG_SECTION_PREFIX); - - print_data_prepare_width (out.output_data); - print_data (&nmc->nmc_config, out_indices, NULL, 0, &out); + if (group_fld) + f = g_strdup_printf ("GENERAL.%s", group_fld); + nmc_print (&nmc->nmc_config, + (gpointer[]) { acon, NULL }, + NULL, + NMC_META_GENERIC_GROUP ("GENERAL", metagen_con_active_general, N_("GROUP")), + f, + NULL); was_output = TRUE; + continue; } /* IP4 */ @@ -1347,154 +1535,220 @@ typedef enum { typedef struct { NmCli *nmc; const GArray *order; -} NmcSortInfo; + gboolean show_active_fields; +} ConShowSortInfo; static int -compare_connections (gconstpointer a, gconstpointer b, gpointer user_data) +con_show_get_items_cmp (gconstpointer pa, gconstpointer pb, gpointer user_data) { - NMConnection *ca = *(NMConnection **) a; - NMConnection *cb = *(NMConnection **) b; - const NmcSortInfo *info = user_data; - NMActiveConnection *aca, *acb; - const NmcSortOrder *order_arr; - guint i, order_len; - const char *tmp1, *tmp2; - unsigned long tmp1_int, tmp2_int; + const ConShowSortInfo *sort_info = user_data; + const MetagenConShowRowData *row_data_a = *((const MetagenConShowRowData *const*) pa); + const MetagenConShowRowData *row_data_b = *((const MetagenConShowRowData *const*) pb); + NMConnection *c_a = row_data_a->connection; + NMConnection *c_b = row_data_b->connection; + NMActiveConnection *ac_a = row_data_a->primary_active; + NMActiveConnection *ac_b = row_data_b->primary_active; + NMActiveConnection *ac_a_effective = sort_info->show_active_fields ? ac_a : NULL; + NMActiveConnection *ac_b_effective = sort_info->show_active_fields ? ac_b : NULL; - if (info->order) { - order_arr = &g_array_index (info->order, NmcSortOrder, 0); - order_len = info->order->len; - } else { - static const NmcSortOrder def[] = { NMC_SORT_ACTIVE, NMC_SORT_NAME, NMC_SORT_PATH }; + /* first sort active-connections which are invisible, i.e. that have no connection */ + if (!c_a && c_b) + return -1; + if (!c_b && c_a) + return 1; - order_arr = def; - order_len = G_N_ELEMENTS (def); - } + /* we have two connections... */ + if (c_a && c_b && c_a != c_b) { + const NmcSortOrder *order_arr; + guint i, order_len; + NMMetaAccessorGetType get_type = nmc_print_output_to_accessor_get_type (sort_info->nmc->nmc_config.print_output); - for (i = 0; i < order_len; i++) { - NmcSortOrder item = order_arr[i]; - int cmp = 0; + if (sort_info->order) { + order_arr = &g_array_index (sort_info->order, NmcSortOrder, 0); + order_len = sort_info->order->len; + } else { + static const NmcSortOrder def[] = { NMC_SORT_ACTIVE, NMC_SORT_NAME, NMC_SORT_PATH }; - switch (item) { - case NMC_SORT_ACTIVE: - case NMC_SORT_ACTIVE_INV: - aca = get_ac_for_connection (nm_client_get_active_connections (info->nmc->client), ca, NULL); - acb = get_ac_for_connection (nm_client_get_active_connections (info->nmc->client), cb, NULL); - cmp = (aca && !acb) ? -1 : (!aca && acb) ? 1 : 0; - if (item == NMC_SORT_ACTIVE_INV) - cmp = -(cmp); - break; - case NMC_SORT_TYPE: - case NMC_SORT_TYPE_INV: - cmp = g_strcmp0 (nm_connection_get_connection_type (ca), - nm_connection_get_connection_type (cb)); - if (item == NMC_SORT_TYPE_INV) - cmp = -(cmp); - break; - case NMC_SORT_NAME: - case NMC_SORT_NAME_INV: - cmp = g_strcmp0 (nm_connection_get_id (ca), - nm_connection_get_id (cb)); - if (item == NMC_SORT_NAME_INV) - cmp = -(cmp); - break; - case NMC_SORT_PATH: - case NMC_SORT_PATH_INV: - tmp1 = nm_connection_get_path (ca); - tmp2 = nm_connection_get_path (cb); - tmp1 = tmp1 ? strrchr (tmp1, '/') : "0"; - tmp2 = tmp2 ? strrchr (tmp2, '/') : "0"; - nmc_string_to_uint (tmp1 ? tmp1+1 : "0", FALSE, 0, 0, &tmp1_int); - nmc_string_to_uint (tmp2 ? tmp2+1 : "0", FALSE, 0, 0, &tmp2_int); - cmp = (int) tmp1_int - tmp2_int; - if (item == NMC_SORT_PATH_INV) - cmp = -(cmp); - break; - default: - cmp = 0; - break; + /* Note: the default order does not consider whether a column is shown. + * That means, the selection of the output fields, does not affect the + * order (although there could be an argument that it should). */ + order_arr = def; + order_len = G_N_ELEMENTS (def); } - if (cmp != 0) - return cmp; - } - return 0; -} + for (i = 0; i < order_len; i++) { + NmcSortOrder item = order_arr[i]; -static GPtrArray * -sort_connections (const GPtrArray *cons, NmCli *nmc, const GArray *order) -{ - GPtrArray *sorted; - int i; - NmcSortInfo compare_info; + switch (item) { - if (!cons) - return NULL; + case NMC_SORT_ACTIVE: + NM_CMP_DIRECT (active_connection_get_state_ord (ac_b), + active_connection_get_state_ord (ac_a)); + break; + case NMC_SORT_ACTIVE_INV: + NM_CMP_DIRECT (active_connection_get_state_ord (ac_a), + active_connection_get_state_ord (ac_b)); + break; - compare_info.nmc = nmc; - compare_info.order = order; + case NMC_SORT_TYPE: + NM_CMP_DIRECT_STRCMP0 (_con_show_fcn_get_type (c_a, ac_a_effective, get_type), + _con_show_fcn_get_type (c_b, ac_b_effective, get_type)); + break; + case NMC_SORT_TYPE_INV: + NM_CMP_DIRECT_STRCMP0 (_con_show_fcn_get_type (c_b, ac_b_effective, get_type), + _con_show_fcn_get_type (c_a, ac_a_effective, get_type)); + break; - sorted = g_ptr_array_sized_new (cons->len); - for (i = 0; i < cons->len; i++) - g_ptr_array_add (sorted, cons->pdata[i]); - g_ptr_array_sort_with_data (sorted, compare_connections, &compare_info); - return sorted; -} + case NMC_SORT_NAME: + NM_CMP_RETURN (nm_utf8_collate0 (_con_show_fcn_get_id (c_a, ac_a_effective), + _con_show_fcn_get_id (c_b, ac_b_effective))); + break; + case NMC_SORT_NAME_INV: + NM_CMP_RETURN (nm_utf8_collate0 (_con_show_fcn_get_id (c_b, ac_b_effective), + _con_show_fcn_get_id (c_a, ac_a_effective))); + break; -static int -compare_ac_connections (gconstpointer a, gconstpointer b, gpointer user_data) -{ - NMActiveConnection *ca = *(NMActiveConnection **)a; - NMActiveConnection *cb = *(NMActiveConnection **)b; - int cmp; + case NMC_SORT_PATH: + NM_CMP_RETURN (nm_utils_dbus_path_cmp (nm_connection_get_path (c_a), nm_connection_get_path (c_b))); + break; - /* Sort states first */ - cmp = nm_active_connection_get_state (cb) - nm_active_connection_get_state (ca); - if (cmp != 0) - return cmp; + case NMC_SORT_PATH_INV: + NM_CMP_RETURN (nm_utils_dbus_path_cmp (nm_connection_get_path (c_b), nm_connection_get_path (c_a))); + break; - cmp = g_strcmp0 (nm_active_connection_get_id (ca), - nm_active_connection_get_id (cb)); - if (cmp != 0) - return cmp; - - return g_strcmp0 (nm_active_connection_get_connection_type (ca), - nm_active_connection_get_connection_type (cb)); -} - -static GPtrArray * -get_invisible_active_connections (NmCli *nmc) -{ - const GPtrArray *acons; - const GPtrArray *connections; - GPtrArray *invisibles; - int a, c; - - g_return_val_if_fail (nmc, NULL); - - invisibles = g_ptr_array_new (); - acons = nm_client_get_active_connections (nmc->client); - connections = nm_client_get_connections (nmc->client); - for (a = 0; a < acons->len; a++) { - gboolean found = FALSE; - NMActiveConnection *acon = g_ptr_array_index (acons, a); - const char *a_uuid = nm_active_connection_get_uuid (acon); - - for (c = 0; c < connections->len; c++) { - NMConnection *con = g_ptr_array_index (connections, c); - const char *c_uuid = nm_connection_get_uuid (con); - - if (strcmp (a_uuid, c_uuid) == 0) { - found = TRUE; + default: + nm_assert_not_reached (); break; } } - /* Active connection is not in connections array, add it to */ - if (!found) - g_ptr_array_add (invisibles, acon); + + NM_CMP_DIRECT_STRCMP0 (nm_connection_get_uuid (c_a), + nm_connection_get_uuid (c_b)); + NM_CMP_DIRECT_STRCMP0 (nm_connection_get_path (c_a), + nm_connection_get_path (c_b)); + + /* This line is not expected to be reached, because there shouldn't be two + * different connections with the same path. Anyway, fall-through and compare by + * active connections... */ } - g_ptr_array_sort_with_data (invisibles, compare_ac_connections, NULL); - return invisibles; + + return active_connection_cmp (ac_a, ac_b); +} + +static GPtrArray * +con_show_get_items (NmCli *nmc, gboolean active_only, gboolean show_active_fields, GArray *order) +{ + gs_unref_hashtable GHashTable *row_hash = NULL; + GHashTableIter hiter; + GPtrArray *result; + const GPtrArray *arr; + NMRemoteConnection *c; + MetagenConShowRowData *row_data; + guint i; + const ConShowSortInfo sort_info = { + .nmc = nmc, + .order = order, + .show_active_fields = show_active_fields, + }; + + row_hash = g_hash_table_new (nm_direct_hash, NULL); + + arr = nm_client_get_connections (nmc->client); + for (i = 0; i < arr->len; i++) { + /* Note: libnm will not expose connection that are invisible + * to the user but currently inactive. + * + * That differs from get-active-connection(). If an invisible connection + * is active, we can get its NMActiveConnection. We can even obtain + * the corresponding NMRemoteConnection (although, of course it has + * no visible settings). + * + * I think this inconsistency is a bug in libnm. Anyway, the result is, + * that we print invisible connections if they are active, but otherwise + * we exclude them. */ + c = arr->pdata[i]; + g_hash_table_insert (row_hash, + c, + _metagen_con_show_row_data_new_for_connection (c, + show_active_fields)); + } + + arr = nm_client_get_active_connections (nmc->client); + for (i = 0; i < arr->len; i++) { + NMActiveConnection *ac = arr->pdata[i]; + + c = nm_active_connection_get_connection (ac); + if (!show_active_fields && !c) { + /* the active connection has no connection, and we don't show + * any active fields. Skip this row. */ + continue; + } + + row_data = c + ? g_hash_table_lookup (row_hash, c) + : NULL; + + if (show_active_fields || !c) { + /* the active connection either has no connection (in which we create a + * connection-less row), or we are interested in showing each active + * connection in its own row. Add a row. */ + if (row_data) { + /* we create a rowdata for this connection earlier. We drop it, because this + * connection is tracked via the rowdata of the active connection. */ + g_hash_table_remove (row_hash, c); + _metagen_con_show_row_data_destroy (row_data); + } + row_data = _metagen_con_show_row_data_new_for_active_connection (c, ac, show_active_fields); + g_hash_table_insert (row_hash, ac, row_data); + continue; + } + + /* we add the active connection to the row for the referenced + * connection. We need to group them this way, to print the proper + * color (activated or not) based on primary_active. */ + if (!row_data) { + /* this is unexpected. The active connection references a connection that + * seemingly no longer exists. It's a bug in libnm. Add a row nontheless. */ + row_data = _metagen_con_show_row_data_new_for_connection (c, show_active_fields); + g_hash_table_insert (row_hash, c, row_data); + } + _metagen_con_show_row_data_add_active_connection (row_data, ac); + } + + result = g_ptr_array_new_with_free_func (_metagen_con_show_row_data_destroy); + + g_hash_table_iter_init (&hiter, row_hash); + while (g_hash_table_iter_next (&hiter, NULL, (gpointer *) &row_data)) { + if ( active_only + && !row_data->primary_active) { + /* We only print connections that are active. Skip this row. */ + _metagen_con_show_row_data_destroy (row_data); + continue; + } + if (!show_active_fields) { + NMSettingConnection *s_con; + + nm_assert (NM_IS_REMOTE_CONNECTION (row_data->connection)); + s_con = nm_connection_get_setting_connection (row_data->connection); + if ( !s_con + || !nm_setting_connection_get_uuid (s_con)) { + /* we are in a mode, where we only print rows for connection. + * For that we require that all rows are visible to the user, + * meaning: the have a [connection] setting and a UUID. + * + * Otherwise, this connection is likely invisible to the user. + * Skip it. */ + _metagen_con_show_row_data_destroy (row_data); + continue; + } + _metagen_con_show_row_data_init_primary_active (row_data); + } else + nm_assert (!row_data->all_active); + g_ptr_array_add (result, row_data); + } + + g_ptr_array_sort_with_data (result, con_show_get_items_cmp, (gpointer) &sort_info); + return result; } static GArray * @@ -1616,10 +1870,9 @@ do_connections_show (NmCli *nmc, int argc, char **argv) gs_free_error GError *err = NULL; gs_free char *profile_flds = NULL; gs_free char *active_flds = NULL; - GPtrArray *invisibles, *sorted_cons; gboolean active_only = FALSE; gs_unref_array GArray *order = NULL; - guint i, j; + guint i; int option; /* check connection show options [--active] [--order ] */ @@ -1647,50 +1900,57 @@ do_connections_show (NmCli *nmc, int argc, char **argv) } if (argc == 0) { - const GPtrArray *connections; const char *fields_str = NULL; - char *fields_common = NMC_FIELDS_CON_SHOW_COMMON; - const NMMetaAbstractInfo *const*tmpl; - NmcOutputField *arr; NMC_OUTPUT_DATA_DEFINE_SCOPED (out); + gs_unref_ptrarray GPtrArray *items = NULL; + gs_free NMMetaSelectionResultList *selection = NULL; + gboolean show_active_fields = TRUE; if (nmc->complete) goto finish; if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) - fields_str = fields_common; + fields_str = NMC_FIELDS_CON_SHOW_COMMON; else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) { } else fields_str = nmc->required_fields; - tmpl = (const NMMetaAbstractInfo *const*) nmc_fields_con_show; - out_indices = parse_output_fields (fields_str, tmpl, FALSE, NULL, &err); - if (err) + /* determine whether the user wants to see any fields that are related to active-connections + * (e.g. the apath, the current state, or the device where the profile is active). + * + * If that's the case, then we will show one line for each active connection. In case + * a profile has multiple active connections, it will be listed multiple times. + * If that's not the case, we filter out these duplicate lines. */ + selection = nm_meta_selection_create_parse_list ((const NMMetaAbstractInfo *const*) metagen_con_show, + NULL, + fields_str, + FALSE, + NULL); + if (selection && selection->num > 0) { + show_active_fields = FALSE; + for (i = 0; i < selection->num; i++) { + const NmcMetaGenericInfo *info = (const NmcMetaGenericInfo *) selection->items[i].info; + + if (NM_IN_SET (info->info_type, NMC_GENERIC_INFO_TYPE_CON_SHOW_DEVICE, + NMC_GENERIC_INFO_TYPE_CON_SHOW_STATE, + NMC_GENERIC_INFO_TYPE_CON_SHOW_ACTIVE_PATH)) { + show_active_fields = TRUE; + break; + } + } + } + + items = con_show_get_items (nmc, active_only, show_active_fields, order); + g_ptr_array_add (items, NULL); + if (!nmc_print (&nmc->nmc_config, + items->pdata, + active_only + ? _("NetworkManager active profiles") + : _("NetworkManager connection profiles"), + (const NMMetaAbstractInfo *const*) metagen_con_show, + fields_str, + &err)) goto finish; - - /* Add headers */ - arr = nmc_dup_fields_array (tmpl, NMC_OF_FLAG_MAIN_HEADER_ADD | NMC_OF_FLAG_FIELD_NAMES); - g_ptr_array_add (out.output_data, arr); - - /* There might be active connections not present in connection list - * (e.g. private connections of a different user). Show them as well. */ - invisibles = get_invisible_active_connections (nmc); - for (i = 0; i < invisibles->len; i++) - fill_output_connection_for_invisible (invisibles->pdata[i], nmc->nmc_config.print_output, out.output_data); - g_ptr_array_free (invisibles, TRUE); - - /* Sort the connections and fill the output data */ - connections = nm_client_get_connections (nmc->client); - sorted_cons = sort_connections (connections, nmc, order); - for (i = 0; i < sorted_cons->len; i++) - fill_output_connection (sorted_cons->pdata[i], nmc->client, nmc->nmc_config.print_output, out.output_data, active_only); - g_ptr_array_free (sorted_cons, TRUE); - - print_data_prepare_width (out.output_data); - print_data (&nmc->nmc_config, out_indices, - active_only ? _("NetworkManager active profiles") - : _("NetworkManager connection profiles"), - 0, &out); } else { gboolean new_line = FALSE; gboolean without_fields = (nmc->required_fields == NULL); @@ -1827,10 +2087,10 @@ do_connections_show (NmCli *nmc, int argc, char **argv) if (without_fields || active_flds) { guint l = explicit_acon ? 1 : (found_acons ? found_acons->len : 0); - for (j = 0; j < l; j++) { + for (i = 0; i < l; i++) { NMActiveConnection *acon; - if (j > 0) { + if (i > 0) { /* if there are multiple active connections, separate them with newline. * that is a bit odd, because we already separate connections with newlines, * and commonly don't separate the connection from the first active connection. */ @@ -1840,7 +2100,7 @@ do_connections_show (NmCli *nmc, int argc, char **argv) if (explicit_acon) acon = explicit_acon; else - acon = found_acons->pdata[j]; + acon = found_acons->pdata[i]; nmc->required_fields = active_flds; res = nmc_active_connection_details (acon, nmc); diff --git a/clients/cli/connections.h b/clients/cli/connections.h index 591e9cda67..43cd97f697 100644 --- a/clients/cli/connections.h +++ b/clients/cli/connections.h @@ -35,8 +35,8 @@ nmc_read_connection_properties (NmCli *nmc, NMMetaColor nmc_active_connection_state_to_color (NMActiveConnectionState state); -extern const NmcMetaGenericInfo *const nmc_fields_con_show[]; -extern const NmcMetaGenericInfo *const nmc_fields_con_active_details_general[]; +extern const NmcMetaGenericInfo *const metagen_con_show[]; +extern const NmcMetaGenericInfo *const metagen_con_active_general[]; extern const NmcMetaGenericInfo *const nmc_fields_con_active_details_vpn[]; extern const NmcMetaGenericInfo *const nmc_fields_con_active_details_groups[]; diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c index e9752952d5..6407f50beb 100644 --- a/clients/cli/nmcli.c +++ b/clients/cli/nmcli.c @@ -188,8 +188,8 @@ complete_fields (const char *option, const char *prefix) complete_field (h, metagen_ip4_config); complete_field (h, nmc_fields_dhcp_config); complete_field (h, nmc_fields_ip6_config); - complete_field (h, nmc_fields_con_show); - complete_field (h, nmc_fields_con_active_details_general); + complete_field (h, metagen_con_show); + complete_field (h, metagen_con_active_general); complete_field (h, nmc_fields_con_active_details_vpn); complete_field (h, nmc_fields_con_active_details_groups); complete_field (h, nmc_fields_dev_status); diff --git a/clients/cli/nmcli.h b/clients/cli/nmcli.h index 61bf86dec5..bcf1c01b12 100644 --- a/clients/cli/nmcli.h +++ b/clients/cli/nmcli.h @@ -72,6 +72,14 @@ typedef enum { NMC_PRINT_PRETTY = 2 } NMCPrintOutput; +static inline NMMetaAccessorGetType +nmc_print_output_to_accessor_get_type (NMCPrintOutput print_output) +{ + return (print_output != NMC_PRINT_TERSE) + ? NM_META_ACCESSOR_GET_TYPE_PRETTY + : NM_META_ACCESSOR_GET_TYPE_PARSABLE; +} + /* === Output fields === */ typedef enum { diff --git a/clients/cli/utils.c b/clients/cli/utils.c index 32c44e39ce..9cc01c7240 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -1004,9 +1004,7 @@ _print_fill (const NmcConfig *nmc_config, g_array_set_clear_func (cells, _print_data_cell_clear); g_array_set_size (cells, targets_len * header_row->len); - text_get_type = pretty - ? NM_META_ACCESSOR_GET_TYPE_PRETTY - : NM_META_ACCESSOR_GET_TYPE_PARSABLE; + text_get_type = nmc_print_output_to_accessor_get_type (nmc_config->print_output); text_get_flags = NM_META_ACCESSOR_GET_FLAGS_ACCEPT_STRV; if (nmc_config->show_secrets) text_get_flags |= NM_META_ACCESSOR_GET_FLAGS_SHOW_SECRETS; @@ -1165,7 +1163,7 @@ _print_do (const NmcConfig *nmc_config, guint i_row, i_col; nm_auto_free_gstring GString *str = NULL; - g_assert (col_len && row_len); + g_assert (col_len); /* Main header */ if (pretty && header_name_no_l10n) { diff --git a/clients/cli/utils.h b/clients/cli/utils.h index dc0ce08391..3122b8808c 100644 --- a/clients/cli/utils.h +++ b/clients/cli/utils.h @@ -121,6 +121,36 @@ typedef enum { NMC_GENERIC_INFO_TYPE_IP6_CONFIG_DOMAIN, _NMC_GENERIC_INFO_TYPE_IP6_CONFIG_NUM, + NMC_GENERIC_INFO_TYPE_CON_SHOW_NAME = 0, + NMC_GENERIC_INFO_TYPE_CON_SHOW_UUID, + NMC_GENERIC_INFO_TYPE_CON_SHOW_TYPE, + NMC_GENERIC_INFO_TYPE_CON_SHOW_TIMESTAMP, + NMC_GENERIC_INFO_TYPE_CON_SHOW_TIMESTAMP_REAL, + NMC_GENERIC_INFO_TYPE_CON_SHOW_AUTOCONNECT, + NMC_GENERIC_INFO_TYPE_CON_SHOW_AUTOCONNECT_PRIORITY, + NMC_GENERIC_INFO_TYPE_CON_SHOW_READONLY, + NMC_GENERIC_INFO_TYPE_CON_SHOW_DBUS_PATH, + NMC_GENERIC_INFO_TYPE_CON_SHOW_ACTIVE, + NMC_GENERIC_INFO_TYPE_CON_SHOW_DEVICE, + NMC_GENERIC_INFO_TYPE_CON_SHOW_STATE, + NMC_GENERIC_INFO_TYPE_CON_SHOW_ACTIVE_PATH, + NMC_GENERIC_INFO_TYPE_CON_SHOW_SLAVE, + _NMC_GENERIC_INFO_TYPE_CON_SHOW_NUM, + + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_NAME = 0, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_UUID, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEVICES, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_STATE, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEFAULT, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEFAULT6, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_SPEC_OBJECT, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_VPN, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DBUS_PATH, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_CON_PATH, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_ZONE, + NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_MASTER_PATH, + _NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_NUM, + } NmcGenericInfoType; #define NMC_HANDLE_COLOR(color) \ diff --git a/clients/tests/test-client.check-on-disk/Makefile.am b/clients/tests/test-client.check-on-disk/Makefile.am index aa49eda643..e917a3aaa5 100644 --- a/clients/tests/test-client.check-on-disk/Makefile.am +++ b/clients/tests/test-client.check-on-disk/Makefile.am @@ -105,6 +105,44 @@ clients_tests_expected_files = \ clients/tests/test-client.check-on-disk/test_003-052.expected \ clients/tests/test-client.check-on-disk/test_003-053.expected \ clients/tests/test-client.check-on-disk/test_003-054.expected \ + clients/tests/test-client.check-on-disk/test_003-055.expected \ + clients/tests/test-client.check-on-disk/test_003-056.expected \ + clients/tests/test-client.check-on-disk/test_003-057.expected \ + clients/tests/test-client.check-on-disk/test_003-058.expected \ + clients/tests/test-client.check-on-disk/test_003-059.expected \ + clients/tests/test-client.check-on-disk/test_003-060.expected \ + clients/tests/test-client.check-on-disk/test_003-061.expected \ + clients/tests/test-client.check-on-disk/test_003-062.expected \ + clients/tests/test-client.check-on-disk/test_003-063.expected \ + clients/tests/test-client.check-on-disk/test_003-064.expected \ + clients/tests/test-client.check-on-disk/test_003-065.expected \ + clients/tests/test-client.check-on-disk/test_003-066.expected \ + clients/tests/test-client.check-on-disk/test_003-067.expected \ + clients/tests/test-client.check-on-disk/test_003-068.expected \ + clients/tests/test-client.check-on-disk/test_003-069.expected \ + clients/tests/test-client.check-on-disk/test_003-070.expected \ + clients/tests/test-client.check-on-disk/test_003-071.expected \ + clients/tests/test-client.check-on-disk/test_003-072.expected \ + clients/tests/test-client.check-on-disk/test_003-073.expected \ + clients/tests/test-client.check-on-disk/test_003-074.expected \ + clients/tests/test-client.check-on-disk/test_003-075.expected \ + clients/tests/test-client.check-on-disk/test_003-076.expected \ + clients/tests/test-client.check-on-disk/test_003-077.expected \ + clients/tests/test-client.check-on-disk/test_003-078.expected \ + clients/tests/test-client.check-on-disk/test_003-079.expected \ + clients/tests/test-client.check-on-disk/test_003-080.expected \ + clients/tests/test-client.check-on-disk/test_003-081.expected \ + clients/tests/test-client.check-on-disk/test_003-082.expected \ + clients/tests/test-client.check-on-disk/test_003-083.expected \ + clients/tests/test-client.check-on-disk/test_003-084.expected \ + clients/tests/test-client.check-on-disk/test_003-085.expected \ + clients/tests/test-client.check-on-disk/test_003-086.expected \ + clients/tests/test-client.check-on-disk/test_003-087.expected \ + clients/tests/test-client.check-on-disk/test_003-088.expected \ + clients/tests/test-client.check-on-disk/test_003-089.expected \ + clients/tests/test-client.check-on-disk/test_003-090.expected \ + clients/tests/test-client.check-on-disk/test_003-091.expected \ + clients/tests/test-client.check-on-disk/test_003-092.expected \ clients/tests/test-client.check-on-disk/test_004-001.expected \ clients/tests/test-client.check-on-disk/test_004-002.expected \ clients/tests/test-client.check-on-disk/test_004-003.expected \ diff --git a/clients/tests/test-client.check-on-disk/test_003-016.expected b/clients/tests/test-client.check-on-disk/test_003-016.expected index 8d68221f9d..c5a717b0f8 100644 --- a/clients/tests/test-client.check-on-disk/test_003-016.expected +++ b/clients/tests/test-client.check-on-disk/test_003-016.expected @@ -1,87 +1,11 @@ location: clients/tests/test-client.py:737:test_003()/16 -cmd: $NMCLI -f ALL con s ethernet +cmd: $NMCLI -f ALL con s -a lang: C returncode: 0 -stdout: 3516 bytes +stdout: 542 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: yes -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: no -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: unknown -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: no -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: auto -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: no -ipv4.ignore-auto-dns: no -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: yes -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: no -ipv4.may-fail: yes -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: no -ipv6.ignore-auto-dns: no -ipv6.never-default: no -ipv6.may-fail: yes -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: yes -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: no -proxy.pac-url: -- -proxy.pac-script: -- +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth0 activated /org/freedesktop/NetworkManager/ActiveConnection/1 -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-017.expected b/clients/tests/test-client.check-on-disk/test_003-017.expected index 7e99138c22..760b8f299b 100644 --- a/clients/tests/test-client.check-on-disk/test_003-017.expected +++ b/clients/tests/test-client.check-on-disk/test_003-017.expected @@ -1,87 +1,11 @@ location: clients/tests/test-client.py:737:test_003()/17 -cmd: $NMCLI -f ALL con s ethernet +cmd: $NMCLI -f ALL con s -a lang: pl_PL.UTF-8 returncode: 0 -stdout: 3534 bytes +stdout: 544 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: tak -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: nie -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: nieznane -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: nie -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: automatyczne -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: nie -ipv4.ignore-auto-dns: nie -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: tak -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: nie -ipv4.may-fail: tak -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: nie -ipv6.ignore-auto-dns: nie -ipv6.never-default: nie -ipv6.may-fail: tak -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: tak -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: nie -proxy.pac-url: -- -proxy.pac-script: -- +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth0 aktywowano /org/freedesktop/NetworkManager/ActiveConnection/1 -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-018.expected b/clients/tests/test-client.check-on-disk/test_003-018.expected index bc74883da7..83a19b3c14 100644 --- a/clients/tests/test-client.check-on-disk/test_003-018.expected +++ b/clients/tests/test-client.check-on-disk/test_003-018.expected @@ -1,99 +1,11 @@ location: clients/tests/test-client.py:740:test_003()/18 -cmd: $NMCLI con s ethernet +cmd: $NMCLI -f ACTIVE-PATH,DEVICE,UUID con s -act lang: C returncode: 0 -stdout: 4180 bytes +stdout: 196 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: yes -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: no -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: unknown -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: no -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: auto -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: no -ipv4.ignore-auto-dns: no -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: yes -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: no -ipv4.may-fail: yes -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: no -ipv6.ignore-auto-dns: no -ipv6.never-default: no -ipv6.may-fail: yes -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: yes -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: no -proxy.pac-url: -- -proxy.pac-script: -- -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth0 -GENERAL.STATE: activated -GENERAL.DEFAULT: no -GENERAL.DEFAULT6: no -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: no -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- +ACTIVE-PATH DEVICE UUID +/org/freedesktop/NetworkManager/ActiveConnection/1 eth0 UUID-ethernet-REPLACED-REPLACED-REPL <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-019.expected b/clients/tests/test-client.check-on-disk/test_003-019.expected index 5e37312d12..9e2db6462f 100644 --- a/clients/tests/test-client.check-on-disk/test_003-019.expected +++ b/clients/tests/test-client.check-on-disk/test_003-019.expected @@ -1,99 +1,11 @@ location: clients/tests/test-client.py:740:test_003()/19 -cmd: $NMCLI con s ethernet +cmd: $NMCLI -f ACTIVE-PATH,DEVICE,UUID con s -act lang: pl_PL.UTF-8 returncode: 0 -stdout: 4201 bytes +stdout: 196 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: tak -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: nie -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: nieznane -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: nie -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: automatyczne -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: nie -ipv4.ignore-auto-dns: nie -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: tak -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: nie -ipv4.may-fail: tak -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: nie -ipv6.ignore-auto-dns: nie -ipv6.never-default: nie -ipv6.may-fail: tak -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: tak -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: nie -proxy.pac-url: -- -proxy.pac-script: -- -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth0 -GENERAL.STATE: activated -GENERAL.DEFAULT: nie -GENERAL.DEFAULT6: nie -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: nie -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- +ACTIVE-PATH DEVICE UUID +/org/freedesktop/NetworkManager/ActiveConnection/1 eth0 UUID-ethernet-REPLACED-REPLACED-REPL <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-020.expected b/clients/tests/test-client.check-on-disk/test_003-020.expected index 513985a5a5..2c226cbccf 100644 --- a/clients/tests/test-client.check-on-disk/test_003-020.expected +++ b/clients/tests/test-client.check-on-disk/test_003-020.expected @@ -1,19 +1,14 @@ location: clients/tests/test-client.py:743:test_003()/20 -cmd: $NMCLI -f ALL dev s eth0 +cmd: $NMCLI -f UUID,NAME con s --active lang: C returncode: 0 -stdout: 1056 bytes +stdout: 96 bytes >>> -DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH -eth1 ethernet unavailable /org/freedesktop/NetworkManager/Devices/2 -- -- -- -wlan0 wifi unavailable /org/freedesktop/NetworkManager/Devices/3 -- -- -- -wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/4 -- -- -- -wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/5 -- -- -- -eth0 ethernet unavailable /org/freedesktop/NetworkManager/Devices/1 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/1 +UUID NAME +UUID-ethernet-REPLACED-REPLACED-REPL ethernet <<< -stderr: 24 bytes +stderr: 0 bytes >>> -Unknown parameter: eth0 <<< diff --git a/clients/tests/test-client.check-on-disk/test_003-021.expected b/clients/tests/test-client.check-on-disk/test_003-021.expected index 6809f2907d..77bd6f6a6e 100644 --- a/clients/tests/test-client.check-on-disk/test_003-021.expected +++ b/clients/tests/test-client.check-on-disk/test_003-021.expected @@ -1,19 +1,14 @@ location: clients/tests/test-client.py:743:test_003()/21 -cmd: $NMCLI -f ALL dev s eth0 +cmd: $NMCLI -f UUID,NAME con s --active lang: pl_PL.UTF-8 returncode: 0 -stdout: 1061 bytes +stdout: 96 bytes >>> -DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH -eth1 ethernet niedostępne /org/freedesktop/NetworkManager/Devices/2 -- -- -- -wlan0 wifi niedostępne /org/freedesktop/NetworkManager/Devices/3 -- -- -- -wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/4 -- -- -- -wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/5 -- -- -- -eth0 ethernet niedostępne /org/freedesktop/NetworkManager/Devices/1 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/1 +UUID NAME +UUID-ethernet-REPLACED-REPLACED-REPL ethernet <<< -stderr: 24 bytes +stderr: 0 bytes >>> -Nieznany parametr: eth0 <<< diff --git a/clients/tests/test-client.check-on-disk/test_003-022.expected b/clients/tests/test-client.check-on-disk/test_003-022.expected index 57d4e4a8ed..fd249bf47f 100644 --- a/clients/tests/test-client.check-on-disk/test_003-022.expected +++ b/clients/tests/test-client.check-on-disk/test_003-022.expected @@ -1,39 +1,87 @@ location: clients/tests/test-client.py:746:test_003()/22 -cmd: $NMCLI -f ALL dev show eth0 +cmd: $NMCLI -f ALL con s ethernet lang: C returncode: 0 -stdout: 1487 bytes +stdout: 3516 bytes >>> -GENERAL.DEVICE: eth0 -GENERAL.TYPE: ethernet -GENERAL.NM-TYPE: NMDeviceEthernet -GENERAL.VENDOR: -- -GENERAL.PRODUCT: -- -GENERAL.DRIVER: virtual -GENERAL.DRIVER-VERSION: -- -GENERAL.FIRMWARE-VERSION: -- -GENERAL.HWADDR: 72:41:AB:90:41:5D -GENERAL.MTU: 0 -GENERAL.STATE: 20 (unavailable) -GENERAL.REASON: 0 (No reason given) -GENERAL.UDI: /sys/devices/virtual/eth0 -GENERAL.IP-IFACE: -- -GENERAL.IS-SOFTWARE: no -GENERAL.NM-MANAGED: yes -GENERAL.AUTOCONNECT: yes -GENERAL.FIRMWARE-MISSING: no -GENERAL.NM-PLUGIN-MISSING: no -GENERAL.PHYS-PORT-ID: -- -GENERAL.CONNECTION: ethernet -GENERAL.CON-UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.METERED: unknown -CAPABILITIES.CARRIER-DETECT: no -CAPABILITIES.SPEED: 100 Mb/s -CAPABILITIES.IS-SOFTWARE: no -CAPABILITIES.SRIOV: no -WIRED-PROPERTIES.CARRIER: off -CONNECTIONS.AVAILABLE-CONNECTION-PATHS: -- +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: yes +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: no +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: unknown +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: no +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: auto +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: no +ipv4.ignore-auto-dns: no +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: yes +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: no +ipv4.may-fail: yes +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: no +ipv6.ignore-auto-dns: no +ipv6.never-default: no +ipv6.may-fail: yes +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: yes +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: no +proxy.pac-url: -- +proxy.pac-script: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-023.expected b/clients/tests/test-client.check-on-disk/test_003-023.expected index 0455374fd2..fe7721ee2a 100644 --- a/clients/tests/test-client.check-on-disk/test_003-023.expected +++ b/clients/tests/test-client.check-on-disk/test_003-023.expected @@ -1,39 +1,87 @@ location: clients/tests/test-client.py:746:test_003()/23 -cmd: $NMCLI -f ALL dev show eth0 +cmd: $NMCLI -f ALL con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 1510 bytes +stdout: 3534 bytes >>> -GENERAL.DEVICE: eth0 -GENERAL.TYPE: ethernet -GENERAL.NM-TYPE: NMDeviceEthernet -GENERAL.VENDOR: -- -GENERAL.PRODUCT: -- -GENERAL.DRIVER: virtual -GENERAL.DRIVER-VERSION: -- -GENERAL.FIRMWARE-VERSION: -- -GENERAL.HWADDR: 72:41:AB:90:41:5D -GENERAL.MTU: 0 -GENERAL.STATE: 20 (niedostępne) -GENERAL.REASON: 0 (Nie podano przyczyny) -GENERAL.UDI: /sys/devices/virtual/eth0 -GENERAL.IP-IFACE: -- -GENERAL.IS-SOFTWARE: nie -GENERAL.NM-MANAGED: tak -GENERAL.AUTOCONNECT: tak -GENERAL.FIRMWARE-MISSING: nie -GENERAL.NM-PLUGIN-MISSING: nie -GENERAL.PHYS-PORT-ID: -- -GENERAL.CONNECTION: ethernet -GENERAL.CON-UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.METERED: nieznane -CAPABILITIES.CARRIER-DETECT: nie -CAPABILITIES.SPEED: 100 Mb/s -CAPABILITIES.IS-SOFTWARE: nie -CAPABILITIES.SRIOV: nie -WIRED-PROPERTIES.CARRIER: wyłączone -CONNECTIONS.AVAILABLE-CONNECTION-PATHS: -- +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: tak +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: nie +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: nieznane +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: nie +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: automatyczne +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: nie +ipv4.ignore-auto-dns: nie +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: tak +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: nie +ipv4.may-fail: tak +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: nie +ipv6.ignore-auto-dns: nie +ipv6.never-default: nie +ipv6.may-fail: tak +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: tak +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: nie +proxy.pac-url: -- +proxy.pac-script: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-024.expected b/clients/tests/test-client.check-on-disk/test_003-024.expected index b20a45d45c..33f63fe197 100644 --- a/clients/tests/test-client.check-on-disk/test_003-024.expected +++ b/clients/tests/test-client.check-on-disk/test_003-024.expected @@ -1,10 +1,10 @@ -location: clients/tests/test-client.py:728:test_003()/24 -cmd: $NMCLI con up ethernet ifname eth1 +location: clients/tests/test-client.py:749:test_003()/24 +cmd: $NMCLI -f GENERAL.STATE con s ethernet lang: C returncode: 0 -stdout: 106 bytes +stdout: 50 bytes >>> -Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2) +GENERAL.STATE: activated <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-025.expected b/clients/tests/test-client.check-on-disk/test_003-025.expected index 3806099b97..e5df81577b 100644 --- a/clients/tests/test-client.check-on-disk/test_003-025.expected +++ b/clients/tests/test-client.check-on-disk/test_003-025.expected @@ -1,13 +1,10 @@ -location: clients/tests/test-client.py:731:test_003()/25 -cmd: $NMCLI con -lang: C +location: clients/tests/test-client.py:749:test_003()/25 +cmd: $NMCLI -f GENERAL.STATE con s ethernet +lang: pl_PL.UTF-8 returncode: 0 -stdout: 264 bytes +stdout: 51 bytes >>> -NAME UUID TYPE DEVICE -ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet eth0 -con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -- -con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet -- +GENERAL.STATE: aktywowano <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-026.expected b/clients/tests/test-client.check-on-disk/test_003-026.expected index ee60913461..a04254e041 100644 --- a/clients/tests/test-client.check-on-disk/test_003-026.expected +++ b/clients/tests/test-client.check-on-disk/test_003-026.expected @@ -1,13 +1,99 @@ -location: clients/tests/test-client.py:731:test_003()/26 -cmd: $NMCLI con -lang: pl_PL.UTF-8 +location: clients/tests/test-client.py:752:test_003()/26 +cmd: $NMCLI con s ethernet +lang: C returncode: 0 -stdout: 264 bytes +stdout: 4180 bytes >>> -NAME UUID TYPE DEVICE -ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet eth0 -con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -- -con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet -- +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: yes +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: no +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: unknown +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: no +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: auto +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: no +ipv4.ignore-auto-dns: no +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: yes +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: no +ipv4.may-fail: yes +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: no +ipv6.ignore-auto-dns: no +ipv6.never-default: no +ipv6.may-fail: yes +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: yes +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: no +proxy.pac-url: -- +proxy.pac-script: -- +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: activated +GENERAL.DEFAULT: no +GENERAL.DEFAULT6: no +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: no +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-027.expected b/clients/tests/test-client.check-on-disk/test_003-027.expected index 96924a425a..bea7200447 100644 --- a/clients/tests/test-client.check-on-disk/test_003-027.expected +++ b/clients/tests/test-client.check-on-disk/test_003-027.expected @@ -1,13 +1,99 @@ -location: clients/tests/test-client.py:734:test_003()/27 -cmd: $NMCLI -f ALL con -lang: C +location: clients/tests/test-client.py:752:test_003()/27 +cmd: $NMCLI con s ethernet +lang: pl_PL.UTF-8 returncode: 0 -stdout: 1084 bytes +stdout: 4202 bytes >>> -NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE -ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth0 activated /org/freedesktop/NetworkManager/ActiveConnection/1 -- -con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/1 no -- -- -- -- -con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/2 no -- -- -- -- +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: tak +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: nie +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: nieznane +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: nie +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: automatyczne +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: nie +ipv4.ignore-auto-dns: nie +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: tak +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: nie +ipv4.may-fail: tak +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: nie +ipv6.ignore-auto-dns: nie +ipv6.never-default: nie +ipv6.may-fail: tak +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: tak +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: nie +proxy.pac-url: -- +proxy.pac-script: -- +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: aktywowano +GENERAL.DEFAULT: nie +GENERAL.DEFAULT6: nie +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: nie +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-028.expected b/clients/tests/test-client.check-on-disk/test_003-028.expected index 6065d1ea44..28e99ac0cc 100644 --- a/clients/tests/test-client.check-on-disk/test_003-028.expected +++ b/clients/tests/test-client.check-on-disk/test_003-028.expected @@ -1,16 +1,19 @@ -location: clients/tests/test-client.py:734:test_003()/28 -cmd: $NMCLI -f ALL con -lang: pl_PL.UTF-8 +location: clients/tests/test-client.py:755:test_003()/28 +cmd: $NMCLI -f ALL dev s eth0 +lang: C returncode: 0 -stdout: 1088 bytes +stdout: 1056 bytes >>> -NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE -ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth0 aktywowano /org/freedesktop/NetworkManager/ActiveConnection/1 -- -con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/1 nie -- -- -- -- -con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/2 nie -- -- -- -- +DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH +eth1 ethernet unavailable /org/freedesktop/NetworkManager/Devices/2 -- -- -- +wlan0 wifi unavailable /org/freedesktop/NetworkManager/Devices/3 -- -- -- +wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/4 -- -- -- +wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/5 -- -- -- +eth0 ethernet unavailable /org/freedesktop/NetworkManager/Devices/1 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/1 <<< -stderr: 0 bytes +stderr: 24 bytes >>> +Unknown parameter: eth0 <<< diff --git a/clients/tests/test-client.check-on-disk/test_003-029.expected b/clients/tests/test-client.check-on-disk/test_003-029.expected index ebb89619ad..43888f024a 100644 --- a/clients/tests/test-client.check-on-disk/test_003-029.expected +++ b/clients/tests/test-client.check-on-disk/test_003-029.expected @@ -1,90 +1,19 @@ -location: clients/tests/test-client.py:737:test_003()/29 -cmd: $NMCLI -f ALL con s ethernet -lang: C +location: clients/tests/test-client.py:755:test_003()/29 +cmd: $NMCLI -f ALL dev s eth0 +lang: pl_PL.UTF-8 returncode: 0 -stdout: 3516 bytes +stdout: 1061 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: yes -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: no -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: unknown -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: no -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: auto -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: no -ipv4.ignore-auto-dns: no -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: yes -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: no -ipv4.may-fail: yes -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: no -ipv6.ignore-auto-dns: no -ipv6.never-default: no -ipv6.may-fail: yes -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: yes -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: no -proxy.pac-url: -- -proxy.pac-script: -- +DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH +eth1 ethernet niedostępne /org/freedesktop/NetworkManager/Devices/2 -- -- -- +wlan0 wifi niedostępne /org/freedesktop/NetworkManager/Devices/3 -- -- -- +wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/4 -- -- -- +wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/5 -- -- -- +eth0 ethernet niedostępne /org/freedesktop/NetworkManager/Devices/1 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/1 <<< -stderr: 0 bytes +stderr: 24 bytes >>> +Nieznany parametr: eth0 <<< diff --git a/clients/tests/test-client.check-on-disk/test_003-030.expected b/clients/tests/test-client.check-on-disk/test_003-030.expected index adf743d87d..209210add1 100644 --- a/clients/tests/test-client.check-on-disk/test_003-030.expected +++ b/clients/tests/test-client.check-on-disk/test_003-030.expected @@ -1,87 +1,39 @@ -location: clients/tests/test-client.py:737:test_003()/30 -cmd: $NMCLI -f ALL con s ethernet -lang: pl_PL.UTF-8 +location: clients/tests/test-client.py:758:test_003()/30 +cmd: $NMCLI -f ALL dev show eth0 +lang: C returncode: 0 -stdout: 3534 bytes +stdout: 1487 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: tak -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: nie -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: nieznane -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: nie -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: automatyczne -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: nie -ipv4.ignore-auto-dns: nie -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: tak -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: nie -ipv4.may-fail: tak -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: nie -ipv6.ignore-auto-dns: nie -ipv6.never-default: nie -ipv6.may-fail: tak -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: tak -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: nie -proxy.pac-url: -- -proxy.pac-script: -- +GENERAL.DEVICE: eth0 +GENERAL.TYPE: ethernet +GENERAL.NM-TYPE: NMDeviceEthernet +GENERAL.VENDOR: -- +GENERAL.PRODUCT: -- +GENERAL.DRIVER: virtual +GENERAL.DRIVER-VERSION: -- +GENERAL.FIRMWARE-VERSION: -- +GENERAL.HWADDR: 72:41:AB:90:41:5D +GENERAL.MTU: 0 +GENERAL.STATE: 20 (unavailable) +GENERAL.REASON: 0 (No reason given) +GENERAL.UDI: /sys/devices/virtual/eth0 +GENERAL.IP-IFACE: -- +GENERAL.IS-SOFTWARE: no +GENERAL.NM-MANAGED: yes +GENERAL.AUTOCONNECT: yes +GENERAL.FIRMWARE-MISSING: no +GENERAL.NM-PLUGIN-MISSING: no +GENERAL.PHYS-PORT-ID: -- +GENERAL.CONNECTION: ethernet +GENERAL.CON-UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.METERED: unknown +CAPABILITIES.CARRIER-DETECT: no +CAPABILITIES.SPEED: 100 Mb/s +CAPABILITIES.IS-SOFTWARE: no +CAPABILITIES.SRIOV: no +WIRED-PROPERTIES.CARRIER: off +CONNECTIONS.AVAILABLE-CONNECTION-PATHS: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-031.expected b/clients/tests/test-client.check-on-disk/test_003-031.expected index cbf57afcec..5fba5cf9d8 100644 --- a/clients/tests/test-client.check-on-disk/test_003-031.expected +++ b/clients/tests/test-client.check-on-disk/test_003-031.expected @@ -1,112 +1,39 @@ -location: clients/tests/test-client.py:740:test_003()/31 -cmd: $NMCLI con s ethernet -lang: C +location: clients/tests/test-client.py:758:test_003()/31 +cmd: $NMCLI -f ALL dev show eth0 +lang: pl_PL.UTF-8 returncode: 0 -stdout: 4845 bytes +stdout: 1510 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: yes -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: no -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: unknown -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: no -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: auto -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: no -ipv4.ignore-auto-dns: no -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: yes -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: no -ipv4.may-fail: yes -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: no -ipv6.ignore-auto-dns: no -ipv6.never-default: no -ipv6.may-fail: yes -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: yes -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: no -proxy.pac-url: -- -proxy.pac-script: -- -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth0 -GENERAL.STATE: activated -GENERAL.DEFAULT: no -GENERAL.DEFAULT6: no -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: no -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- - -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth1 -GENERAL.STATE: activated -GENERAL.DEFAULT: no -GENERAL.DEFAULT6: no -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: no -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- +GENERAL.DEVICE: eth0 +GENERAL.TYPE: ethernet +GENERAL.NM-TYPE: NMDeviceEthernet +GENERAL.VENDOR: -- +GENERAL.PRODUCT: -- +GENERAL.DRIVER: virtual +GENERAL.DRIVER-VERSION: -- +GENERAL.FIRMWARE-VERSION: -- +GENERAL.HWADDR: 72:41:AB:90:41:5D +GENERAL.MTU: 0 +GENERAL.STATE: 20 (niedostępne) +GENERAL.REASON: 0 (Nie podano przyczyny) +GENERAL.UDI: /sys/devices/virtual/eth0 +GENERAL.IP-IFACE: -- +GENERAL.IS-SOFTWARE: nie +GENERAL.NM-MANAGED: tak +GENERAL.AUTOCONNECT: tak +GENERAL.FIRMWARE-MISSING: nie +GENERAL.NM-PLUGIN-MISSING: nie +GENERAL.PHYS-PORT-ID: -- +GENERAL.CONNECTION: ethernet +GENERAL.CON-UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.METERED: nieznane +CAPABILITIES.CARRIER-DETECT: nie +CAPABILITIES.SPEED: 100 Mb/s +CAPABILITIES.IS-SOFTWARE: nie +CAPABILITIES.SRIOV: nie +WIRED-PROPERTIES.CARRIER: wyłączone +CONNECTIONS.AVAILABLE-CONNECTION-PATHS: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-032.expected b/clients/tests/test-client.check-on-disk/test_003-032.expected index e5d74a1be9..4d39c1e2ad 100644 --- a/clients/tests/test-client.check-on-disk/test_003-032.expected +++ b/clients/tests/test-client.check-on-disk/test_003-032.expected @@ -1,112 +1,10 @@ -location: clients/tests/test-client.py:740:test_003()/32 -cmd: $NMCLI con s ethernet -lang: pl_PL.UTF-8 +location: clients/tests/test-client.py:728:test_003()/32 +cmd: $NMCLI con up ethernet ifname eth1 +lang: C returncode: 0 -stdout: 4869 bytes +stdout: 106 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: tak -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: nie -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: nieznane -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: nie -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: automatyczne -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: nie -ipv4.ignore-auto-dns: nie -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: tak -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: nie -ipv4.may-fail: tak -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: nie -ipv6.ignore-auto-dns: nie -ipv6.never-default: nie -ipv6.may-fail: tak -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: tak -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: nie -proxy.pac-url: -- -proxy.pac-script: -- -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth0 -GENERAL.STATE: activated -GENERAL.DEFAULT: nie -GENERAL.DEFAULT6: nie -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: nie -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- - -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth1 -GENERAL.STATE: activated -GENERAL.DEFAULT: nie -GENERAL.DEFAULT6: nie -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: nie -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- +Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2) <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-033.expected b/clients/tests/test-client.check-on-disk/test_003-033.expected index 46b70521ae..9e7764f2e6 100644 --- a/clients/tests/test-client.check-on-disk/test_003-033.expected +++ b/clients/tests/test-client.check-on-disk/test_003-033.expected @@ -1,19 +1,17 @@ -location: clients/tests/test-client.py:743:test_003()/33 -cmd: $NMCLI -f ALL dev s eth0 +location: clients/tests/test-client.py:731:test_003()/33 +cmd: $NMCLI con lang: C returncode: 0 -stdout: 1056 bytes +stdout: 330 bytes >>> -DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH -wlan0 wifi unavailable /org/freedesktop/NetworkManager/Devices/3 -- -- -- -wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/4 -- -- -- -wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/5 -- -- -- -eth0 ethernet unavailable /org/freedesktop/NetworkManager/Devices/1 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/1 -eth1 ethernet unavailable /org/freedesktop/NetworkManager/Devices/2 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/2 +NAME UUID TYPE DEVICE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet eth0 +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet eth1 +con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -- +con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet -- <<< -stderr: 24 bytes +stderr: 0 bytes >>> -Unknown parameter: eth0 <<< diff --git a/clients/tests/test-client.check-on-disk/test_003-034.expected b/clients/tests/test-client.check-on-disk/test_003-034.expected index 77cc99fdff..8bea22d71b 100644 --- a/clients/tests/test-client.check-on-disk/test_003-034.expected +++ b/clients/tests/test-client.check-on-disk/test_003-034.expected @@ -1,19 +1,17 @@ -location: clients/tests/test-client.py:743:test_003()/34 -cmd: $NMCLI -f ALL dev s eth0 +location: clients/tests/test-client.py:731:test_003()/34 +cmd: $NMCLI con lang: pl_PL.UTF-8 returncode: 0 -stdout: 1061 bytes +stdout: 330 bytes >>> -DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH -wlan0 wifi niedostępne /org/freedesktop/NetworkManager/Devices/3 -- -- -- -wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/4 -- -- -- -wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/5 -- -- -- -eth0 ethernet niedostępne /org/freedesktop/NetworkManager/Devices/1 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/1 -eth1 ethernet niedostępne /org/freedesktop/NetworkManager/Devices/2 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/2 +NAME UUID TYPE DEVICE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet eth0 +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet eth1 +con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -- +con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet -- <<< -stderr: 24 bytes +stderr: 0 bytes >>> -Nieznany parametr: eth0 <<< diff --git a/clients/tests/test-client.check-on-disk/test_003-035.expected b/clients/tests/test-client.check-on-disk/test_003-035.expected index ae9286575f..15e4067587 100644 --- a/clients/tests/test-client.check-on-disk/test_003-035.expected +++ b/clients/tests/test-client.check-on-disk/test_003-035.expected @@ -1,39 +1,14 @@ -location: clients/tests/test-client.py:746:test_003()/35 -cmd: $NMCLI -f ALL dev show eth0 +location: clients/tests/test-client.py:734:test_003()/35 +cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 1487 bytes +stdout: 1355 bytes >>> -GENERAL.DEVICE: eth0 -GENERAL.TYPE: ethernet -GENERAL.NM-TYPE: NMDeviceEthernet -GENERAL.VENDOR: -- -GENERAL.PRODUCT: -- -GENERAL.DRIVER: virtual -GENERAL.DRIVER-VERSION: -- -GENERAL.FIRMWARE-VERSION: -- -GENERAL.HWADDR: 72:41:AB:90:41:5D -GENERAL.MTU: 0 -GENERAL.STATE: 20 (unavailable) -GENERAL.REASON: 0 (No reason given) -GENERAL.UDI: /sys/devices/virtual/eth0 -GENERAL.IP-IFACE: -- -GENERAL.IS-SOFTWARE: no -GENERAL.NM-MANAGED: yes -GENERAL.AUTOCONNECT: yes -GENERAL.FIRMWARE-MISSING: no -GENERAL.NM-PLUGIN-MISSING: no -GENERAL.PHYS-PORT-ID: -- -GENERAL.CONNECTION: ethernet -GENERAL.CON-UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.METERED: unknown -CAPABILITIES.CARRIER-DETECT: no -CAPABILITIES.SPEED: 100 Mb/s -CAPABILITIES.IS-SOFTWARE: no -CAPABILITIES.SRIOV: no -WIRED-PROPERTIES.CARRIER: off -CONNECTIONS.AVAILABLE-CONNECTION-PATHS: -- +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth0 activated /org/freedesktop/NetworkManager/ActiveConnection/1 -- +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth1 activated /org/freedesktop/NetworkManager/ActiveConnection/2 -- +con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/1 no -- -- -- -- +con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/2 no -- -- -- -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-036.expected b/clients/tests/test-client.check-on-disk/test_003-036.expected index 11b511f719..9d7774d4f2 100644 --- a/clients/tests/test-client.check-on-disk/test_003-036.expected +++ b/clients/tests/test-client.check-on-disk/test_003-036.expected @@ -1,39 +1,14 @@ -location: clients/tests/test-client.py:746:test_003()/36 -cmd: $NMCLI -f ALL dev show eth0 +location: clients/tests/test-client.py:734:test_003()/36 +cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 1510 bytes +stdout: 1360 bytes >>> -GENERAL.DEVICE: eth0 -GENERAL.TYPE: ethernet -GENERAL.NM-TYPE: NMDeviceEthernet -GENERAL.VENDOR: -- -GENERAL.PRODUCT: -- -GENERAL.DRIVER: virtual -GENERAL.DRIVER-VERSION: -- -GENERAL.FIRMWARE-VERSION: -- -GENERAL.HWADDR: 72:41:AB:90:41:5D -GENERAL.MTU: 0 -GENERAL.STATE: 20 (niedostępne) -GENERAL.REASON: 0 (Nie podano przyczyny) -GENERAL.UDI: /sys/devices/virtual/eth0 -GENERAL.IP-IFACE: -- -GENERAL.IS-SOFTWARE: nie -GENERAL.NM-MANAGED: tak -GENERAL.AUTOCONNECT: tak -GENERAL.FIRMWARE-MISSING: nie -GENERAL.NM-PLUGIN-MISSING: nie -GENERAL.PHYS-PORT-ID: -- -GENERAL.CONNECTION: ethernet -GENERAL.CON-UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.METERED: nieznane -CAPABILITIES.CARRIER-DETECT: nie -CAPABILITIES.SPEED: 100 Mb/s -CAPABILITIES.IS-SOFTWARE: nie -CAPABILITIES.SRIOV: nie -WIRED-PROPERTIES.CARRIER: wyłączone -CONNECTIONS.AVAILABLE-CONNECTION-PATHS: -- +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth0 aktywowano /org/freedesktop/NetworkManager/ActiveConnection/1 -- +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth1 aktywowano /org/freedesktop/NetworkManager/ActiveConnection/2 -- +con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/1 nie -- -- -- -- +con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/2 nie -- -- -- -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-037.expected b/clients/tests/test-client.check-on-disk/test_003-037.expected index 0346b310fc..8529e4906b 100644 --- a/clients/tests/test-client.check-on-disk/test_003-037.expected +++ b/clients/tests/test-client.check-on-disk/test_003-037.expected @@ -1,13 +1,12 @@ -location: clients/tests/test-client.py:755:test_003()/37 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:737:test_003()/37 +cmd: $NMCLI -f ALL con s -a lang: C returncode: 0 -stdout: 1096 bytes +stdout: 813 bytes >>> -NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE -ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- -con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/1 no -- -- -- -- -con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/2 no -- -- -- -- +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth0 activated /org/freedesktop/NetworkManager/ActiveConnection/1 -- +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth1 activated /org/freedesktop/NetworkManager/ActiveConnection/2 -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-038.expected b/clients/tests/test-client.check-on-disk/test_003-038.expected index 81c7c237d7..75005325ef 100644 --- a/clients/tests/test-client.check-on-disk/test_003-038.expected +++ b/clients/tests/test-client.check-on-disk/test_003-038.expected @@ -1,13 +1,12 @@ -location: clients/tests/test-client.py:755:test_003()/38 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:737:test_003()/38 +cmd: $NMCLI -f ALL con s -a lang: pl_PL.UTF-8 returncode: 0 -stdout: 1104 bytes +stdout: 816 bytes >>> -NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE -ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth0 dezaktywowanie /org/freedesktop/NetworkManager/ActiveConnection/1 -- -con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/1 nie -- -- -- -- -con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/2 nie -- -- -- -- +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth0 aktywowano /org/freedesktop/NetworkManager/ActiveConnection/1 -- +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth1 aktywowano /org/freedesktop/NetworkManager/ActiveConnection/2 -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-039.expected b/clients/tests/test-client.check-on-disk/test_003-039.expected index 3640d0c9d2..99fdc38237 100644 --- a/clients/tests/test-client.check-on-disk/test_003-039.expected +++ b/clients/tests/test-client.check-on-disk/test_003-039.expected @@ -1,13 +1,12 @@ -location: clients/tests/test-client.py:758:test_003()/39 -cmd: $NMCLI -f UUID,TYPE con +location: clients/tests/test-client.py:740:test_003()/39 +cmd: $NMCLI -f ACTIVE-PATH,DEVICE,UUID con s -act lang: C returncode: 0 -stdout: 192 bytes +stdout: 294 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +ACTIVE-PATH DEVICE UUID +/org/freedesktop/NetworkManager/ActiveConnection/1 eth0 UUID-ethernet-REPLACED-REPLACED-REPL +/org/freedesktop/NetworkManager/ActiveConnection/2 eth1 UUID-ethernet-REPLACED-REPLACED-REPL <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-040.expected b/clients/tests/test-client.check-on-disk/test_003-040.expected index fd263f5507..c037512318 100644 --- a/clients/tests/test-client.check-on-disk/test_003-040.expected +++ b/clients/tests/test-client.check-on-disk/test_003-040.expected @@ -1,13 +1,12 @@ -location: clients/tests/test-client.py:758:test_003()/40 -cmd: $NMCLI -f UUID,TYPE con +location: clients/tests/test-client.py:740:test_003()/40 +cmd: $NMCLI -f ACTIVE-PATH,DEVICE,UUID con s -act lang: pl_PL.UTF-8 returncode: 0 -stdout: 192 bytes +stdout: 294 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +ACTIVE-PATH DEVICE UUID +/org/freedesktop/NetworkManager/ActiveConnection/1 eth0 UUID-ethernet-REPLACED-REPLACED-REPL +/org/freedesktop/NetworkManager/ActiveConnection/2 eth1 UUID-ethernet-REPLACED-REPLACED-REPL <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-041.expected b/clients/tests/test-client.check-on-disk/test_003-041.expected index f61fb681a0..6d1a8afaf6 100644 --- a/clients/tests/test-client.check-on-disk/test_003-041.expected +++ b/clients/tests/test-client.check-on-disk/test_003-041.expected @@ -1,15 +1,11 @@ -location: clients/tests/test-client.py:761:test_003()/41 -cmd: $NMCLI -f UUID,TYPE --mode multiline con +location: clients/tests/test-client.py:743:test_003()/41 +cmd: $NMCLI -f UUID,NAME con s --active lang: C returncode: 0 -stdout: 378 bytes +stdout: 96 bytes >>> -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d -TYPE: ethernet -UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA -TYPE: ethernet +UUID NAME +UUID-ethernet-REPLACED-REPLACED-REPL ethernet <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-042.expected b/clients/tests/test-client.check-on-disk/test_003-042.expected index 6ea659e9d4..056be14c52 100644 --- a/clients/tests/test-client.check-on-disk/test_003-042.expected +++ b/clients/tests/test-client.check-on-disk/test_003-042.expected @@ -1,15 +1,11 @@ -location: clients/tests/test-client.py:761:test_003()/42 -cmd: $NMCLI -f UUID,TYPE --mode multiline con +location: clients/tests/test-client.py:743:test_003()/42 +cmd: $NMCLI -f UUID,NAME con s --active lang: pl_PL.UTF-8 returncode: 0 -stdout: 378 bytes +stdout: 96 bytes >>> -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d -TYPE: ethernet -UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA -TYPE: ethernet +UUID NAME +UUID-ethernet-REPLACED-REPLACED-REPL ethernet <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-043.expected b/clients/tests/test-client.check-on-disk/test_003-043.expected index 8f5aeb7049..49c5aca7ce 100644 --- a/clients/tests/test-client.check-on-disk/test_003-043.expected +++ b/clients/tests/test-client.check-on-disk/test_003-043.expected @@ -1,15 +1,87 @@ -location: clients/tests/test-client.py:764:test_003()/43 -cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +location: clients/tests/test-client.py:746:test_003()/43 +cmd: $NMCLI -f ALL con s ethernet lang: C returncode: 0 -stdout: 186 bytes +stdout: 3516 bytes >>> -UUID:UUID-ethernet-REPLACED-REPLACED-REPL -TYPE:802-3-ethernet -UUID:5fcfd6d7-1e63-3332-8826-a7eda103792d -TYPE:802-3-ethernet -UUID:UUID-con-xx1-REPLACED-REPLACED-REPLA -TYPE:802-3-ethernet +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: yes +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: no +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: unknown +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: no +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: auto +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: no +ipv4.ignore-auto-dns: no +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: yes +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: no +ipv4.may-fail: yes +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: no +ipv6.ignore-auto-dns: no +ipv6.never-default: no +ipv6.may-fail: yes +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: yes +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: no +proxy.pac-url: -- +proxy.pac-script: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-044.expected b/clients/tests/test-client.check-on-disk/test_003-044.expected index fbe01dab80..52e78f3ec7 100644 --- a/clients/tests/test-client.check-on-disk/test_003-044.expected +++ b/clients/tests/test-client.check-on-disk/test_003-044.expected @@ -1,15 +1,87 @@ -location: clients/tests/test-client.py:764:test_003()/44 -cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +location: clients/tests/test-client.py:746:test_003()/44 +cmd: $NMCLI -f ALL con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 186 bytes +stdout: 3534 bytes >>> -UUID:UUID-ethernet-REPLACED-REPLACED-REPL -TYPE:802-3-ethernet -UUID:5fcfd6d7-1e63-3332-8826-a7eda103792d -TYPE:802-3-ethernet -UUID:UUID-con-xx1-REPLACED-REPLACED-REPLA -TYPE:802-3-ethernet +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: tak +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: nie +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: nieznane +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: nie +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: automatyczne +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: nie +ipv4.ignore-auto-dns: nie +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: tak +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: nie +ipv4.may-fail: tak +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: nie +ipv6.ignore-auto-dns: nie +ipv6.never-default: nie +ipv6.may-fail: tak +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: tak +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: nie +proxy.pac-url: -- +proxy.pac-script: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-045.expected b/clients/tests/test-client.check-on-disk/test_003-045.expected index 5759e2f429..1eaa5689e5 100644 --- a/clients/tests/test-client.check-on-disk/test_003-045.expected +++ b/clients/tests/test-client.check-on-disk/test_003-045.expected @@ -1,21 +1,12 @@ -location: clients/tests/test-client.py:767:test_003()/45 -cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +location: clients/tests/test-client.py:749:test_003()/45 +cmd: $NMCLI -f GENERAL.STATE con s ethernet lang: C returncode: 0 -stdout: 835 bytes +stdout: 101 bytes >>> -=============================================================================== - NetworkManager connection profiles -=============================================================================== -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -------------------------------------------------------------------------------- -UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d -TYPE: ethernet -------------------------------------------------------------------------------- -UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA -TYPE: ethernet -------------------------------------------------------------------------------- +GENERAL.STATE: activated + +GENERAL.STATE: activated <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-046.expected b/clients/tests/test-client.check-on-disk/test_003-046.expected index d853d48743..35ab57fba4 100644 --- a/clients/tests/test-client.check-on-disk/test_003-046.expected +++ b/clients/tests/test-client.check-on-disk/test_003-046.expected @@ -1,21 +1,12 @@ -location: clients/tests/test-client.py:767:test_003()/46 -cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +location: clients/tests/test-client.py:749:test_003()/46 +cmd: $NMCLI -f GENERAL.STATE con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 841 bytes +stdout: 103 bytes >>> -=============================================================================== - Profile połączeń usługi NetworkManager -=============================================================================== -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -------------------------------------------------------------------------------- -UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d -TYPE: ethernet -------------------------------------------------------------------------------- -UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA -TYPE: ethernet -------------------------------------------------------------------------------- +GENERAL.STATE: aktywowano + +GENERAL.STATE: aktywowano <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-047.expected b/clients/tests/test-client.check-on-disk/test_003-047.expected index 6522c7b20e..a825e5622b 100644 --- a/clients/tests/test-client.check-on-disk/test_003-047.expected +++ b/clients/tests/test-client.check-on-disk/test_003-047.expected @@ -1,13 +1,112 @@ -location: clients/tests/test-client.py:770:test_003()/47 -cmd: $NMCLI -f UUID,TYPE --mode tabular con +location: clients/tests/test-client.py:752:test_003()/47 +cmd: $NMCLI con s ethernet lang: C returncode: 0 -stdout: 192 bytes +stdout: 4845 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: yes +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: no +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: unknown +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: no +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: auto +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: no +ipv4.ignore-auto-dns: no +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: yes +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: no +ipv4.may-fail: yes +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: no +ipv6.ignore-auto-dns: no +ipv6.never-default: no +ipv6.may-fail: yes +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: yes +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: no +proxy.pac-url: -- +proxy.pac-script: -- +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: activated +GENERAL.DEFAULT: no +GENERAL.DEFAULT6: no +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: no +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth1 +GENERAL.STATE: activated +GENERAL.DEFAULT: no +GENERAL.DEFAULT6: no +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: no +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-048.expected b/clients/tests/test-client.check-on-disk/test_003-048.expected index 08d3ae95c0..ce7410450b 100644 --- a/clients/tests/test-client.check-on-disk/test_003-048.expected +++ b/clients/tests/test-client.check-on-disk/test_003-048.expected @@ -1,13 +1,112 @@ -location: clients/tests/test-client.py:770:test_003()/48 -cmd: $NMCLI -f UUID,TYPE --mode tabular con +location: clients/tests/test-client.py:752:test_003()/48 +cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 192 bytes +stdout: 4871 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: tak +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: nie +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: nieznane +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: nie +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: automatyczne +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: nie +ipv4.ignore-auto-dns: nie +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: tak +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: nie +ipv4.may-fail: tak +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: nie +ipv6.ignore-auto-dns: nie +ipv6.never-default: nie +ipv6.may-fail: tak +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: tak +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: nie +proxy.pac-url: -- +proxy.pac-script: -- +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: aktywowano +GENERAL.DEFAULT: nie +GENERAL.DEFAULT6: nie +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: nie +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth1 +GENERAL.STATE: aktywowano +GENERAL.DEFAULT: nie +GENERAL.DEFAULT6: nie +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: nie +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-049.expected b/clients/tests/test-client.check-on-disk/test_003-049.expected index 3f8f30602a..3e0514c0c9 100644 --- a/clients/tests/test-client.check-on-disk/test_003-049.expected +++ b/clients/tests/test-client.check-on-disk/test_003-049.expected @@ -1,15 +1,19 @@ -location: clients/tests/test-client.py:773:test_003()/49 -cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +location: clients/tests/test-client.py:755:test_003()/49 +cmd: $NMCLI -f ALL dev s eth0 lang: C returncode: 0 -stdout: 156 bytes +stdout: 1056 bytes >>> -UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d:802-3-ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet +DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH +wlan0 wifi unavailable /org/freedesktop/NetworkManager/Devices/3 -- -- -- +wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/4 -- -- -- +wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/5 -- -- -- +eth0 ethernet unavailable /org/freedesktop/NetworkManager/Devices/1 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/1 +eth1 ethernet unavailable /org/freedesktop/NetworkManager/Devices/2 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/2 <<< -stderr: 0 bytes +stderr: 24 bytes >>> +Unknown parameter: eth0 <<< diff --git a/clients/tests/test-client.check-on-disk/test_003-050.expected b/clients/tests/test-client.check-on-disk/test_003-050.expected index dea01fd2c0..e89fdb8852 100644 --- a/clients/tests/test-client.check-on-disk/test_003-050.expected +++ b/clients/tests/test-client.check-on-disk/test_003-050.expected @@ -1,15 +1,19 @@ -location: clients/tests/test-client.py:773:test_003()/50 -cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +location: clients/tests/test-client.py:755:test_003()/50 +cmd: $NMCLI -f ALL dev s eth0 lang: pl_PL.UTF-8 returncode: 0 -stdout: 156 bytes +stdout: 1061 bytes >>> -UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d:802-3-ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet +DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH +wlan0 wifi niedostępne /org/freedesktop/NetworkManager/Devices/3 -- -- -- +wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/4 -- -- -- +wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/5 -- -- -- +eth0 ethernet niedostępne /org/freedesktop/NetworkManager/Devices/1 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/1 +eth1 ethernet niedostępne /org/freedesktop/NetworkManager/Devices/2 ethernet UUID-ethernet-REPLACED-REPLACED-REPL /org/freedesktop/NetworkManager/ActiveConnection/2 <<< -stderr: 0 bytes +stderr: 24 bytes >>> +Nieznany parametr: eth0 <<< diff --git a/clients/tests/test-client.check-on-disk/test_003-051.expected b/clients/tests/test-client.check-on-disk/test_003-051.expected index 7e4dd471cf..27ceabf0ff 100644 --- a/clients/tests/test-client.check-on-disk/test_003-051.expected +++ b/clients/tests/test-client.check-on-disk/test_003-051.expected @@ -1,17 +1,39 @@ -location: clients/tests/test-client.py:776:test_003()/51 -cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +location: clients/tests/test-client.py:758:test_003()/51 +cmd: $NMCLI -f ALL dev show eth0 lang: C returncode: 0 -stdout: 394 bytes +stdout: 1487 bytes >>> -====================================== - NetworkManager connection profiles -====================================== -UUID TYPE --------------------------------------------------------------------------------------- -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +GENERAL.DEVICE: eth0 +GENERAL.TYPE: ethernet +GENERAL.NM-TYPE: NMDeviceEthernet +GENERAL.VENDOR: -- +GENERAL.PRODUCT: -- +GENERAL.DRIVER: virtual +GENERAL.DRIVER-VERSION: -- +GENERAL.FIRMWARE-VERSION: -- +GENERAL.HWADDR: 72:41:AB:90:41:5D +GENERAL.MTU: 0 +GENERAL.STATE: 20 (unavailable) +GENERAL.REASON: 0 (No reason given) +GENERAL.UDI: /sys/devices/virtual/eth0 +GENERAL.IP-IFACE: -- +GENERAL.IS-SOFTWARE: no +GENERAL.NM-MANAGED: yes +GENERAL.AUTOCONNECT: yes +GENERAL.FIRMWARE-MISSING: no +GENERAL.NM-PLUGIN-MISSING: no +GENERAL.PHYS-PORT-ID: -- +GENERAL.CONNECTION: ethernet +GENERAL.CON-UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.METERED: unknown +CAPABILITIES.CARRIER-DETECT: no +CAPABILITIES.SPEED: 100 Mb/s +CAPABILITIES.IS-SOFTWARE: no +CAPABILITIES.SRIOV: no +WIRED-PROPERTIES.CARRIER: off +CONNECTIONS.AVAILABLE-CONNECTION-PATHS: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-052.expected b/clients/tests/test-client.check-on-disk/test_003-052.expected index 3d6c2ecacc..74338bcd69 100644 --- a/clients/tests/test-client.check-on-disk/test_003-052.expected +++ b/clients/tests/test-client.check-on-disk/test_003-052.expected @@ -1,17 +1,39 @@ -location: clients/tests/test-client.py:776:test_003()/52 -cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +location: clients/tests/test-client.py:758:test_003()/52 +cmd: $NMCLI -f ALL dev show eth0 lang: pl_PL.UTF-8 returncode: 0 -stdout: 414 bytes +stdout: 1510 bytes >>> -========================================== - Profile połączeń usługi NetworkManager -========================================== -UUID TYPE ------------------------------------------------------------------------------------------- -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +GENERAL.DEVICE: eth0 +GENERAL.TYPE: ethernet +GENERAL.NM-TYPE: NMDeviceEthernet +GENERAL.VENDOR: -- +GENERAL.PRODUCT: -- +GENERAL.DRIVER: virtual +GENERAL.DRIVER-VERSION: -- +GENERAL.FIRMWARE-VERSION: -- +GENERAL.HWADDR: 72:41:AB:90:41:5D +GENERAL.MTU: 0 +GENERAL.STATE: 20 (niedostępne) +GENERAL.REASON: 0 (Nie podano przyczyny) +GENERAL.UDI: /sys/devices/virtual/eth0 +GENERAL.IP-IFACE: -- +GENERAL.IS-SOFTWARE: nie +GENERAL.NM-MANAGED: tak +GENERAL.AUTOCONNECT: tak +GENERAL.FIRMWARE-MISSING: nie +GENERAL.NM-PLUGIN-MISSING: nie +GENERAL.PHYS-PORT-ID: -- +GENERAL.CONNECTION: ethernet +GENERAL.CON-UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.METERED: nieznane +CAPABILITIES.CARRIER-DETECT: nie +CAPABILITIES.SPEED: 100 Mb/s +CAPABILITIES.IS-SOFTWARE: nie +CAPABILITIES.SRIOV: nie +WIRED-PROPERTIES.CARRIER: wyłączone +CONNECTIONS.AVAILABLE-CONNECTION-PATHS: -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-053.expected b/clients/tests/test-client.check-on-disk/test_003-053.expected index dd92ec686a..aae57fbb53 100644 --- a/clients/tests/test-client.check-on-disk/test_003-053.expected +++ b/clients/tests/test-client.check-on-disk/test_003-053.expected @@ -1,112 +1,14 @@ -location: clients/tests/test-client.py:779:test_003()/53 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:772:test_003()/53 +cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 4848 bytes +stdout: 1370 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: yes -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: no -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: unknown -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: no -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: auto -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: no -ipv4.ignore-auto-dns: no -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: yes -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: no -ipv4.may-fail: yes -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: no -ipv6.ignore-auto-dns: no -ipv6.never-default: no -ipv6.may-fail: yes -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: yes -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: no -proxy.pac-url: -- -proxy.pac-script: -- -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth0 -GENERAL.STATE: deactivating -GENERAL.DEFAULT: no -GENERAL.DEFAULT6: no -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: no -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- - -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth1 -GENERAL.STATE: activated -GENERAL.DEFAULT: no -GENERAL.DEFAULT6: no -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: no -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth1 activated /org/freedesktop/NetworkManager/ActiveConnection/2 -- +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- +con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/1 no -- -- -- -- +con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/2 no -- -- -- -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-054.expected b/clients/tests/test-client.check-on-disk/test_003-054.expected index 7379f872c6..b9bdb4a7e3 100644 --- a/clients/tests/test-client.check-on-disk/test_003-054.expected +++ b/clients/tests/test-client.check-on-disk/test_003-054.expected @@ -1,112 +1,14 @@ -location: clients/tests/test-client.py:779:test_003()/54 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:772:test_003()/54 +cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 4872 bytes +stdout: 1380 bytes >>> -connection.id: ethernet -connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL -connection.stable-id: -- -connection.type: 802-3-ethernet -connection.interface-name: -- -connection.autoconnect: tak -connection.autoconnect-priority: 0 -connection.autoconnect-retries: -1 (default) -connection.auth-retries: -1 -connection.timestamp: 0 -connection.read-only: nie -connection.permissions: -- -connection.zone: -- -connection.master: -- -connection.slave-type: -- -connection.autoconnect-slaves: -1 (default) -connection.secondaries: -- -connection.gateway-ping-timeout: 0 -connection.metered: nieznane -connection.lldp: default -connection.mdns: -1 (default) -802-3-ethernet.port: -- -802-3-ethernet.speed: 0 -802-3-ethernet.duplex: -- -802-3-ethernet.auto-negotiate: nie -802-3-ethernet.mac-address: -- -802-3-ethernet.cloned-mac-address: -- -802-3-ethernet.generate-mac-address-mask:-- -802-3-ethernet.mac-address-blacklist: -- -802-3-ethernet.mtu: automatyczne -802-3-ethernet.s390-subchannels: -- -802-3-ethernet.s390-nettype: -- -802-3-ethernet.s390-options: -- -802-3-ethernet.wake-on-lan: default -802-3-ethernet.wake-on-lan-password: -- -ipv4.method: auto -ipv4.dns: -- -ipv4.dns-search: -- -ipv4.dns-options: "" -ipv4.dns-priority: 0 -ipv4.addresses: -- -ipv4.gateway: -- -ipv4.routes: -- -ipv4.route-metric: -1 -ipv4.route-table: 0 (unspec) -ipv4.ignore-auto-routes: nie -ipv4.ignore-auto-dns: nie -ipv4.dhcp-client-id: -- -ipv4.dhcp-timeout: 0 (default) -ipv4.dhcp-send-hostname: tak -ipv4.dhcp-hostname: -- -ipv4.dhcp-fqdn: -- -ipv4.never-default: nie -ipv4.may-fail: tak -ipv4.dad-timeout: -1 (default) -ipv6.method: auto -ipv6.dns: -- -ipv6.dns-search: -- -ipv6.dns-options: "" -ipv6.dns-priority: 0 -ipv6.addresses: -- -ipv6.gateway: -- -ipv6.routes: -- -ipv6.route-metric: -1 -ipv6.route-table: 0 (unspec) -ipv6.ignore-auto-routes: nie -ipv6.ignore-auto-dns: nie -ipv6.never-default: nie -ipv6.may-fail: tak -ipv6.ip6-privacy: -1 (unknown) -ipv6.addr-gen-mode: stable-privacy -ipv6.dhcp-send-hostname: tak -ipv6.dhcp-hostname: -- -ipv6.token: -- -proxy.method: none -proxy.browser-only: nie -proxy.pac-url: -- -proxy.pac-script: -- -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth0 -GENERAL.STATE: deactivating -GENERAL.DEFAULT: nie -GENERAL.DEFAULT6: nie -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: nie -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- - -GENERAL.NAME: ethernet -GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL -GENERAL.DEVICES: eth1 -GENERAL.STATE: activated -GENERAL.DEFAULT: nie -GENERAL.DEFAULT6: nie -GENERAL.SPEC-OBJECT: -- -GENERAL.VPN: nie -GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 -GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 -GENERAL.ZONE: -- -GENERAL.MASTER-PATH: -- +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth1 aktywowano /org/freedesktop/NetworkManager/ActiveConnection/2 -- +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth0 dezaktywowanie /org/freedesktop/NetworkManager/ActiveConnection/1 -- +con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/1 nie -- -- -- -- +con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/2 nie -- -- -- -- <<< stderr: 0 bytes diff --git a/clients/tests/test-client.check-on-disk/test_003-055.expected b/clients/tests/test-client.check-on-disk/test_003-055.expected new file mode 100644 index 0000000000..ced8608586 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-055.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:775:test_003()/55 +cmd: $NMCLI -f UUID,TYPE con +lang: C +returncode: 0 +stdout: 192 bytes +>>> +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-056.expected b/clients/tests/test-client.check-on-disk/test_003-056.expected new file mode 100644 index 0000000000..fc67a94dda --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-056.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:775:test_003()/56 +cmd: $NMCLI -f UUID,TYPE con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 192 bytes +>>> +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-057.expected b/clients/tests/test-client.check-on-disk/test_003-057.expected new file mode 100644 index 0000000000..aa62abbea4 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-057.expected @@ -0,0 +1,18 @@ +location: clients/tests/test-client.py:778:test_003()/57 +cmd: $NMCLI -f UUID,TYPE --mode multiline con +lang: C +returncode: 0 +stdout: 378 bytes +>>> +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE: ethernet +UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE: ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-058.expected b/clients/tests/test-client.check-on-disk/test_003-058.expected new file mode 100644 index 0000000000..d13a7c03ca --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-058.expected @@ -0,0 +1,18 @@ +location: clients/tests/test-client.py:778:test_003()/58 +cmd: $NMCLI -f UUID,TYPE --mode multiline con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 378 bytes +>>> +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE: ethernet +UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE: ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-059.expected b/clients/tests/test-client.check-on-disk/test_003-059.expected new file mode 100644 index 0000000000..f40fe7b6b4 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-059.expected @@ -0,0 +1,18 @@ +location: clients/tests/test-client.py:781:test_003()/59 +cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +lang: C +returncode: 0 +stdout: 186 bytes +>>> +UUID:UUID-ethernet-REPLACED-REPLACED-REPL +TYPE:802-3-ethernet +UUID:5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE:802-3-ethernet +UUID:UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE:802-3-ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-060.expected b/clients/tests/test-client.check-on-disk/test_003-060.expected new file mode 100644 index 0000000000..c43731fca9 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-060.expected @@ -0,0 +1,18 @@ +location: clients/tests/test-client.py:781:test_003()/60 +cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 186 bytes +>>> +UUID:UUID-ethernet-REPLACED-REPLACED-REPL +TYPE:802-3-ethernet +UUID:5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE:802-3-ethernet +UUID:UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE:802-3-ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-061.expected b/clients/tests/test-client.check-on-disk/test_003-061.expected new file mode 100644 index 0000000000..83c6949aef --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-061.expected @@ -0,0 +1,24 @@ +location: clients/tests/test-client.py:784:test_003()/61 +cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +lang: C +returncode: 0 +stdout: 835 bytes +>>> +=============================================================================== + NetworkManager connection profiles +=============================================================================== +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +------------------------------------------------------------------------------- +UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE: ethernet +------------------------------------------------------------------------------- +UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE: ethernet +------------------------------------------------------------------------------- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-062.expected b/clients/tests/test-client.check-on-disk/test_003-062.expected new file mode 100644 index 0000000000..29c93d37c2 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-062.expected @@ -0,0 +1,24 @@ +location: clients/tests/test-client.py:784:test_003()/62 +cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 841 bytes +>>> +=============================================================================== + Profile połączeń usługi NetworkManager +=============================================================================== +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +------------------------------------------------------------------------------- +UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE: ethernet +------------------------------------------------------------------------------- +UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE: ethernet +------------------------------------------------------------------------------- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-063.expected b/clients/tests/test-client.check-on-disk/test_003-063.expected new file mode 100644 index 0000000000..6850dbccb9 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-063.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:787:test_003()/63 +cmd: $NMCLI -f UUID,TYPE --mode tabular con +lang: C +returncode: 0 +stdout: 192 bytes +>>> +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-064.expected b/clients/tests/test-client.check-on-disk/test_003-064.expected new file mode 100644 index 0000000000..d6466e4a95 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-064.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:787:test_003()/64 +cmd: $NMCLI -f UUID,TYPE --mode tabular con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 192 bytes +>>> +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-065.expected b/clients/tests/test-client.check-on-disk/test_003-065.expected new file mode 100644 index 0000000000..40d64e0afd --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-065.expected @@ -0,0 +1,15 @@ +location: clients/tests/test-client.py:790:test_003()/65 +cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +lang: C +returncode: 0 +stdout: 156 bytes +>>> +UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d:802-3-ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-066.expected b/clients/tests/test-client.check-on-disk/test_003-066.expected new file mode 100644 index 0000000000..e5af348b18 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-066.expected @@ -0,0 +1,15 @@ +location: clients/tests/test-client.py:790:test_003()/66 +cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 156 bytes +>>> +UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d:802-3-ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-067.expected b/clients/tests/test-client.check-on-disk/test_003-067.expected new file mode 100644 index 0000000000..99d788f7c0 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-067.expected @@ -0,0 +1,20 @@ +location: clients/tests/test-client.py:793:test_003()/67 +cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +lang: C +returncode: 0 +stdout: 394 bytes +>>> +====================================== + NetworkManager connection profiles +====================================== +UUID TYPE +-------------------------------------------------------------------------------------- +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-068.expected b/clients/tests/test-client.check-on-disk/test_003-068.expected new file mode 100644 index 0000000000..6d8a57f13d --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-068.expected @@ -0,0 +1,20 @@ +location: clients/tests/test-client.py:793:test_003()/68 +cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 414 bytes +>>> +========================================== + Profile połączeń usługi NetworkManager +========================================== +UUID TYPE +------------------------------------------------------------------------------------------ +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-069.expected b/clients/tests/test-client.check-on-disk/test_003-069.expected new file mode 100644 index 0000000000..a966f20fd8 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-069.expected @@ -0,0 +1,115 @@ +location: clients/tests/test-client.py:796:test_003()/69 +cmd: $NMCLI con s ethernet +lang: C +returncode: 0 +stdout: 4848 bytes +>>> +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: yes +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: no +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: unknown +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: no +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: auto +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: no +ipv4.ignore-auto-dns: no +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: yes +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: no +ipv4.may-fail: yes +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: no +ipv6.ignore-auto-dns: no +ipv6.never-default: no +ipv6.may-fail: yes +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: yes +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: no +proxy.pac-url: -- +proxy.pac-script: -- +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth1 +GENERAL.STATE: activated +GENERAL.DEFAULT: no +GENERAL.DEFAULT6: no +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: no +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: deactivating +GENERAL.DEFAULT: no +GENERAL.DEFAULT6: no +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: no +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-070.expected b/clients/tests/test-client.check-on-disk/test_003-070.expected new file mode 100644 index 0000000000..7ad9541102 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-070.expected @@ -0,0 +1,115 @@ +location: clients/tests/test-client.py:796:test_003()/70 +cmd: $NMCLI con s ethernet +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 4875 bytes +>>> +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: tak +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: nie +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: nieznane +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: nie +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: automatyczne +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: nie +ipv4.ignore-auto-dns: nie +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: tak +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: nie +ipv4.may-fail: tak +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: nie +ipv6.ignore-auto-dns: nie +ipv6.never-default: nie +ipv6.may-fail: tak +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: tak +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: nie +proxy.pac-url: -- +proxy.pac-script: -- +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth1 +GENERAL.STATE: aktywowano +GENERAL.DEFAULT: nie +GENERAL.DEFAULT6: nie +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: nie +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: dezaktywowanie +GENERAL.DEFAULT: nie +GENERAL.DEFAULT6: nie +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: nie +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-071.expected b/clients/tests/test-client.check-on-disk/test_003-071.expected new file mode 100644 index 0000000000..9e92fd03ec --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-071.expected @@ -0,0 +1,102 @@ +location: clients/tests/test-client.py:799:test_003()/71 +cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +lang: C +returncode: 0 +stdout: 4183 bytes +>>> +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: yes +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: no +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: unknown +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: no +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: auto +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: no +ipv4.ignore-auto-dns: no +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: yes +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: no +ipv4.may-fail: yes +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: no +ipv6.ignore-auto-dns: no +ipv6.never-default: no +ipv6.may-fail: yes +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: yes +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: no +proxy.pac-url: -- +proxy.pac-script: -- +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: deactivating +GENERAL.DEFAULT: no +GENERAL.DEFAULT6: no +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: no +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-072.expected b/clients/tests/test-client.check-on-disk/test_003-072.expected new file mode 100644 index 0000000000..11d084d412 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-072.expected @@ -0,0 +1,102 @@ +location: clients/tests/test-client.py:799:test_003()/72 +cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 4206 bytes +>>> +connection.id: ethernet +connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL +connection.stable-id: -- +connection.type: 802-3-ethernet +connection.interface-name: -- +connection.autoconnect: tak +connection.autoconnect-priority: 0 +connection.autoconnect-retries: -1 (default) +connection.auth-retries: -1 +connection.timestamp: 0 +connection.read-only: nie +connection.permissions: -- +connection.zone: -- +connection.master: -- +connection.slave-type: -- +connection.autoconnect-slaves: -1 (default) +connection.secondaries: -- +connection.gateway-ping-timeout: 0 +connection.metered: nieznane +connection.lldp: default +connection.mdns: -1 (default) +802-3-ethernet.port: -- +802-3-ethernet.speed: 0 +802-3-ethernet.duplex: -- +802-3-ethernet.auto-negotiate: nie +802-3-ethernet.mac-address: -- +802-3-ethernet.cloned-mac-address: -- +802-3-ethernet.generate-mac-address-mask:-- +802-3-ethernet.mac-address-blacklist: -- +802-3-ethernet.mtu: automatyczne +802-3-ethernet.s390-subchannels: -- +802-3-ethernet.s390-nettype: -- +802-3-ethernet.s390-options: -- +802-3-ethernet.wake-on-lan: default +802-3-ethernet.wake-on-lan-password: -- +ipv4.method: auto +ipv4.dns: -- +ipv4.dns-search: -- +ipv4.dns-options: "" +ipv4.dns-priority: 0 +ipv4.addresses: -- +ipv4.gateway: -- +ipv4.routes: -- +ipv4.route-metric: -1 +ipv4.route-table: 0 (unspec) +ipv4.ignore-auto-routes: nie +ipv4.ignore-auto-dns: nie +ipv4.dhcp-client-id: -- +ipv4.dhcp-timeout: 0 (default) +ipv4.dhcp-send-hostname: tak +ipv4.dhcp-hostname: -- +ipv4.dhcp-fqdn: -- +ipv4.never-default: nie +ipv4.may-fail: tak +ipv4.dad-timeout: -1 (default) +ipv6.method: auto +ipv6.dns: -- +ipv6.dns-search: -- +ipv6.dns-options: "" +ipv6.dns-priority: 0 +ipv6.addresses: -- +ipv6.gateway: -- +ipv6.routes: -- +ipv6.route-metric: -1 +ipv6.route-table: 0 (unspec) +ipv6.ignore-auto-routes: nie +ipv6.ignore-auto-dns: nie +ipv6.never-default: nie +ipv6.may-fail: tak +ipv6.ip6-privacy: -1 (unknown) +ipv6.addr-gen-mode: stable-privacy +ipv6.dhcp-send-hostname: tak +ipv6.dhcp-hostname: -- +ipv6.token: -- +proxy.method: none +proxy.browser-only: nie +proxy.pac-url: -- +proxy.pac-script: -- +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: dezaktywowanie +GENERAL.DEFAULT: nie +GENERAL.DEFAULT6: nie +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: nie +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-073.expected b/clients/tests/test-client.check-on-disk/test_003-073.expected new file mode 100644 index 0000000000..16fa6521b2 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-073.expected @@ -0,0 +1,17 @@ +location: clients/tests/test-client.py:772:test_003()/73 +cmd: $NMCLI -f ALL con +lang: C +returncode: 0 +stdout: 1370 bytes +>>> +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth1 activated /org/freedesktop/NetworkManager/ActiveConnection/2 -- +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- /org/freedesktop/NetworkManager/Settings/Connection/3 yes eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- +con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/1 no -- -- -- -- +con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 never yes 0 no /org/freedesktop/NetworkManager/Settings/Connection/2 no -- -- -- -- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-074.expected b/clients/tests/test-client.check-on-disk/test_003-074.expected new file mode 100644 index 0000000000..b73c604dfb --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-074.expected @@ -0,0 +1,17 @@ +location: clients/tests/test-client.py:772:test_003()/74 +cmd: $NMCLI -f ALL con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 1380 bytes +>>> +NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT AUTOCONNECT-PRIORITY READONLY DBUS-PATH ACTIVE DEVICE STATE ACTIVE-PATH SLAVE +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth1 aktywowano /org/freedesktop/NetworkManager/ActiveConnection/2 -- +ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- /org/freedesktop/NetworkManager/Settings/Connection/3 tak eth0 dezaktywowanie /org/freedesktop/NetworkManager/ActiveConnection/1 -- +con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/1 nie -- -- -- -- +con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 0 nigdy tak 0 nie /org/freedesktop/NetworkManager/Settings/Connection/2 nie -- -- -- -- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-075.expected b/clients/tests/test-client.check-on-disk/test_003-075.expected new file mode 100644 index 0000000000..4a26382a4a --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-075.expected @@ -0,0 +1,15 @@ +location: clients/tests/test-client.py:775:test_003()/75 +cmd: $NMCLI -f UUID,TYPE con +lang: C +returncode: 0 +stdout: 144 bytes +>>> +UUID TYPE +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-076.expected b/clients/tests/test-client.check-on-disk/test_003-076.expected new file mode 100644 index 0000000000..1f8446c5c1 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-076.expected @@ -0,0 +1,15 @@ +location: clients/tests/test-client.py:775:test_003()/76 +cmd: $NMCLI -f UUID,TYPE con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 144 bytes +>>> +UUID TYPE +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-077.expected b/clients/tests/test-client.check-on-disk/test_003-077.expected new file mode 100644 index 0000000000..314a6452fb --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-077.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:778:test_003()/77 +cmd: $NMCLI -f UUID,TYPE --mode multiline con +lang: C +returncode: 0 +stdout: 252 bytes +>>> +UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE: ethernet +UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE: ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-078.expected b/clients/tests/test-client.check-on-disk/test_003-078.expected new file mode 100644 index 0000000000..00354b314c --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-078.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:778:test_003()/78 +cmd: $NMCLI -f UUID,TYPE --mode multiline con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 252 bytes +>>> +UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE: ethernet +UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE: ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-079.expected b/clients/tests/test-client.check-on-disk/test_003-079.expected new file mode 100644 index 0000000000..3e2f2d7e72 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-079.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:781:test_003()/79 +cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +lang: C +returncode: 0 +stdout: 124 bytes +>>> +UUID:5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE:802-3-ethernet +UUID:UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE:802-3-ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-080.expected b/clients/tests/test-client.check-on-disk/test_003-080.expected new file mode 100644 index 0000000000..7b8fb5c078 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-080.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:781:test_003()/80 +cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 124 bytes +>>> +UUID:5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE:802-3-ethernet +UUID:UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE:802-3-ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-081.expected b/clients/tests/test-client.check-on-disk/test_003-081.expected new file mode 100644 index 0000000000..26f2f94824 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-081.expected @@ -0,0 +1,21 @@ +location: clients/tests/test-client.py:784:test_003()/81 +cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +lang: C +returncode: 0 +stdout: 629 bytes +>>> +=============================================================================== + NetworkManager connection profiles +=============================================================================== +UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE: ethernet +------------------------------------------------------------------------------- +UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE: ethernet +------------------------------------------------------------------------------- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-082.expected b/clients/tests/test-client.check-on-disk/test_003-082.expected new file mode 100644 index 0000000000..249a876215 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-082.expected @@ -0,0 +1,21 @@ +location: clients/tests/test-client.py:784:test_003()/82 +cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 635 bytes +>>> +=============================================================================== + Profile połączeń usługi NetworkManager +=============================================================================== +UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d +TYPE: ethernet +------------------------------------------------------------------------------- +UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA +TYPE: ethernet +------------------------------------------------------------------------------- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-083.expected b/clients/tests/test-client.check-on-disk/test_003-083.expected new file mode 100644 index 0000000000..e8e0710c87 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-083.expected @@ -0,0 +1,15 @@ +location: clients/tests/test-client.py:787:test_003()/83 +cmd: $NMCLI -f UUID,TYPE --mode tabular con +lang: C +returncode: 0 +stdout: 144 bytes +>>> +UUID TYPE +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-084.expected b/clients/tests/test-client.check-on-disk/test_003-084.expected new file mode 100644 index 0000000000..cfc62ee2bb --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-084.expected @@ -0,0 +1,15 @@ +location: clients/tests/test-client.py:787:test_003()/84 +cmd: $NMCLI -f UUID,TYPE --mode tabular con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 144 bytes +>>> +UUID TYPE +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-085.expected b/clients/tests/test-client.check-on-disk/test_003-085.expected new file mode 100644 index 0000000000..8894c409aa --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-085.expected @@ -0,0 +1,14 @@ +location: clients/tests/test-client.py:790:test_003()/85 +cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +lang: C +returncode: 0 +stdout: 104 bytes +>>> +5fcfd6d7-1e63-3332-8826-a7eda103792d:802-3-ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-086.expected b/clients/tests/test-client.check-on-disk/test_003-086.expected new file mode 100644 index 0000000000..2038aa2d87 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-086.expected @@ -0,0 +1,14 @@ +location: clients/tests/test-client.py:790:test_003()/86 +cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 104 bytes +>>> +5fcfd6d7-1e63-3332-8826-a7eda103792d:802-3-ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-087.expected b/clients/tests/test-client.check-on-disk/test_003-087.expected new file mode 100644 index 0000000000..d2d74c3400 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-087.expected @@ -0,0 +1,19 @@ +location: clients/tests/test-client.py:793:test_003()/87 +cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +lang: C +returncode: 0 +stdout: 346 bytes +>>> +====================================== + NetworkManager connection profiles +====================================== +UUID TYPE +-------------------------------------------------------------------------------------- +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-088.expected b/clients/tests/test-client.check-on-disk/test_003-088.expected new file mode 100644 index 0000000000..4b11b81dfd --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-088.expected @@ -0,0 +1,19 @@ +location: clients/tests/test-client.py:793:test_003()/88 +cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 366 bytes +>>> +========================================== + Profile połączeń usługi NetworkManager +========================================== +UUID TYPE +------------------------------------------------------------------------------------------ +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-089.expected b/clients/tests/test-client.check-on-disk/test_003-089.expected new file mode 100644 index 0000000000..6df0658b35 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-089.expected @@ -0,0 +1,13 @@ +location: clients/tests/test-client.py:796:test_003()/89 +cmd: $NMCLI con s ethernet +lang: C +returncode: 10 +stdout: 0 bytes +>>> + +<<< +stderr: 46 bytes +>>> +Error: ethernet - no such connection profile. + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-090.expected b/clients/tests/test-client.check-on-disk/test_003-090.expected new file mode 100644 index 0000000000..ce8783334c --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-090.expected @@ -0,0 +1,13 @@ +location: clients/tests/test-client.py:796:test_003()/90 +cmd: $NMCLI con s ethernet +lang: pl_PL.UTF-8 +returncode: 10 +stdout: 0 bytes +>>> + +<<< +stderr: 58 bytes +>>> +Błąd: ethernet — nie ma takiego profilu połączenia. + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-091.expected b/clients/tests/test-client.check-on-disk/test_003-091.expected new file mode 100644 index 0000000000..b5d36c6983 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-091.expected @@ -0,0 +1,24 @@ +location: clients/tests/test-client.py:799:test_003()/91 +cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +lang: C +returncode: 0 +stdout: 667 bytes +>>> +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: deactivating +GENERAL.DEFAULT: no +GENERAL.DEFAULT6: no +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: no +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_003-092.expected b/clients/tests/test-client.check-on-disk/test_003-092.expected new file mode 100644 index 0000000000..d7d4a4cf8a --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-092.expected @@ -0,0 +1,24 @@ +location: clients/tests/test-client.py:799:test_003()/92 +cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 672 bytes +>>> +GENERAL.NAME: ethernet +GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL +GENERAL.DEVICES: eth0 +GENERAL.STATE: dezaktywowanie +GENERAL.DEFAULT: nie +GENERAL.DEFAULT6: nie +GENERAL.SPEC-OBJECT: -- +GENERAL.VPN: nie +GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 +GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3 +GENERAL.ZONE: -- +GENERAL.MASTER-PATH: -- + +<<< +stderr: 0 bytes +>>> + +<<< diff --git a/clients/tests/test-client.check-on-disk/test_004-001.expected b/clients/tests/test-client.check-on-disk/test_004-001.expected index 0723731d1f..52c5591cb4 100644 --- a/clients/tests/test-client.check-on-disk/test_004-001.expected +++ b/clients/tests/test-client.check-on-disk/test_004-001.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:789:test_004()/1 +location: clients/tests/test-client.py:809:test_004()/1 cmd: $NMCLI c add type wifi ifname '*' ssid foobar con-name con-xx1 lang: C returncode: 0 diff --git a/clients/tests/test-client.check-on-disk/test_004-002.expected b/clients/tests/test-client.check-on-disk/test_004-002.expected index 37c88812da..b4177ed3ba 100644 --- a/clients/tests/test-client.check-on-disk/test_004-002.expected +++ b/clients/tests/test-client.check-on-disk/test_004-002.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:791:test_004()/2 +location: clients/tests/test-client.py:811:test_004()/2 cmd: $NMCLI connection mod con-xx1 ip.gateway '' lang: C returncode: 2 diff --git a/clients/tests/test-client.check-on-disk/test_004-003.expected b/clients/tests/test-client.check-on-disk/test_004-003.expected index e76bb0bf11..464ec6a4ed 100644 --- a/clients/tests/test-client.check-on-disk/test_004-003.expected +++ b/clients/tests/test-client.check-on-disk/test_004-003.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:792:test_004()/3 +location: clients/tests/test-client.py:812:test_004()/3 cmd: $NMCLI connection mod con-xx1 ipv4.gateway 172.16.0.1 lang: C returncode: 0 diff --git a/clients/tests/test-client.check-on-disk/test_004-004.expected b/clients/tests/test-client.check-on-disk/test_004-004.expected index 17233cd113..bbddaee993 100644 --- a/clients/tests/test-client.check-on-disk/test_004-004.expected +++ b/clients/tests/test-client.check-on-disk/test_004-004.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:793:test_004()/4 +location: clients/tests/test-client.py:813:test_004()/4 cmd: $NMCLI connection mod con-xx1 ipv6.gateway ::99 lang: C returncode: 0 diff --git a/clients/tests/test-client.check-on-disk/test_004-005.expected b/clients/tests/test-client.check-on-disk/test_004-005.expected index a4b0a592dc..9e7f329101 100644 --- a/clients/tests/test-client.check-on-disk/test_004-005.expected +++ b/clients/tests/test-client.check-on-disk/test_004-005.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:794:test_004()/5 +location: clients/tests/test-client.py:814:test_004()/5 cmd: $NMCLI connection mod con-xx1 802.abc '' lang: C returncode: 2 diff --git a/clients/tests/test-client.check-on-disk/test_004-006.expected b/clients/tests/test-client.check-on-disk/test_004-006.expected index 9fd5fe42de..c67f9a2760 100644 --- a/clients/tests/test-client.check-on-disk/test_004-006.expected +++ b/clients/tests/test-client.check-on-disk/test_004-006.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:795:test_004()/6 +location: clients/tests/test-client.py:815:test_004()/6 cmd: $NMCLI connection mod con-xx1 802-11-wireless.band a lang: C returncode: 0 diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py index a8e107a0a2..74e6d5a816 100755 --- a/clients/tests/test-client.py +++ b/clients/tests/test-client.py @@ -733,9 +733,21 @@ class TestNmcli(NmTestBase): self.call_nmcli_l(['-f', 'ALL', 'con'], replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'ALL', 'con', 's', '-a'], + replace_stdout = replace_stdout) + + self.call_nmcli_l(['-f', 'ACTIVE-PATH,DEVICE,UUID', 'con', 's', '-act'], + replace_stdout = replace_stdout) + + self.call_nmcli_l(['-f', 'UUID,NAME', 'con', 's', '--active'], + replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'ALL', 'con', 's', 'ethernet'], replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'GENERAL.STATE', 'con', 's', 'ethernet'], + replace_stdout = replace_stdout) + self.call_nmcli_l(['con', 's', 'ethernet'], replace_stdout = replace_stdout) @@ -751,32 +763,40 @@ class TestNmcli(NmTestBase): 'State', dbus.UInt32(NM.ActiveConnectionState.DEACTIVATING)) - self.call_nmcli_l(['-f', 'ALL', 'con'], - replace_stdout = replace_stdout) + for i in [0, 1]: + if i == 1: + self.async_wait() + self.srv.op_ConnectionSetVisible(False, con_id = 'ethernet') - self.call_nmcli_l(['-f', 'UUID,TYPE', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'ALL', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'UUID,TYPE', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', '--terse', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', '--pretty', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', '--terse', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', '--pretty', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', '--terse', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', '--pretty', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', '--terse', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['con', 's', 'ethernet'], - replace_stdout = replace_stdout) + self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', '--pretty', 'con'], + replace_stdout = replace_stdout) + + self.call_nmcli_l(['con', 's', 'ethernet'], + replace_stdout = replace_stdout) + + self.call_nmcli_l(['c', 's', '/org/freedesktop/NetworkManager/ActiveConnection/1'], + replace_stdout = replace_stdout) def test_004(self): self.init_001() diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py index 8563aa19cd..75544c7eee 100755 --- a/tools/test-networkmanager-service.py +++ b/tools/test-networkmanager-service.py @@ -968,8 +968,8 @@ class NetworkManager(ExportedObj): gl.mainloop.quit() @dbus.service.method(IFACE_TEST, in_signature='a{ss}', out_signature='a(sss)') - def FindConnections(self, args): - return [(c.path, c.get_uuid(), c.get_id()) for c in gl.settings.find_connections(**args)] + def FindConnections(self, selector_args): + return [(c.path, c.get_uuid(), c.get_id()) for c in gl.settings.find_connections(**selector_args)] @dbus.service.method(IFACE_TEST, in_signature='a(oa(sa(sv)))', out_signature='') def SetProperties(self, all_args): @@ -1055,6 +1055,12 @@ class NetworkManager(ExportedObj): def UpdateConnection(self, path, connection, verify_connection): return gl.settings.update_connection(connection, path, verify_connection) + @dbus.service.method(dbus_interface=IFACE_TEST, in_signature='ba{ss}', out_signature='') + def ConnectionSetVisible(self, vis, selector_args): + cons = list(gl.settings.find_connections(**selector_args)) + assert(len(cons) == 1) + cons[0].SetVisible(vis) + @dbus.service.method(dbus_interface=IFACE_TEST, in_signature='', out_signature='') def Restart(self): gl.bus.release_name("org.freedesktop.NetworkManager")