summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-26 13:19:20 +0200
committerThomas Haller <thaller@redhat.com>2018-06-01 09:38:24 +0200
commitde1a5eed5d8df6e8b1e3df090d30d6c752ff509d (patch)
tree4ceca7432e365f62666c8c5d8babebe96c5b3042
parenta03b9b81c882e3387854d82235e6bf0ebedcb959 (diff)
downloadNetworkManager-de1a5eed5d8df6e8b1e3df090d30d6c752ff509d.tar.gz
cli: rework printing of general active-connection properties
use nmc_print() for the job. Also, localize non-terse output. Also, fix bug with $ nmcli c s /org/freedesktop/NetworkManager/ActiveConnection/1 if active connection #1 is invisible to the user. Also, previously, fill_output_active_connection() wrongly tries to write to a field that doesn't exist: set_val_strc (arr, 13-idx_start, s_con ? nm_setting_connection_get_slave_type (s_con) : NULL);
-rw-r--r--clients/cli/connections.c219
-rw-r--r--clients/cli/connections.h2
-rw-r--r--clients/cli/nmcli.c2
-rw-r--r--clients/cli/utils.h14
-rw-r--r--clients/tests/test-client.check-on-disk/test_003-025.expected4
-rw-r--r--clients/tests/test-client.check-on-disk/test_003-027.expected4
-rw-r--r--clients/tests/test-client.check-on-disk/test_003-046.expected6
-rw-r--r--clients/tests/test-client.check-on-disk/test_003-048.expected6
-rw-r--r--clients/tests/test-client.check-on-disk/test_003-070.expected6
-rw-r--r--clients/tests/test-client.check-on-disk/test_003-072.expected4
-rw-r--r--clients/tests/test-client.check-on-disk/test_003-091.expected20
-rw-r--r--clients/tests/test-client.check-on-disk/test_003-092.expected20
12 files changed, 176 insertions, 131 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index eb9c1ae1b0..47eff09c04 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -441,22 +441,106 @@ const NmcMetaGenericInfo *const metagen_con_show[_NMC_GENERIC_INFO_TYPE_CON_SHOW
/*****************************************************************************/
-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","\
@@ -507,7 +591,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 */
@@ -1043,77 +1127,6 @@ nmc_active_connection_state_to_color (NMActiveConnectionState state)
return NM_META_COLOR_CONNECTION_UNKNOWN;
}
-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;
@@ -1258,29 +1271,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 */
diff --git a/clients/cli/connections.h b/clients/cli/connections.h
index 0a2f5ac984..43cd97f697 100644
--- a/clients/cli/connections.h
+++ b/clients/cli/connections.h
@@ -36,7 +36,7 @@ nmc_read_connection_properties (NmCli *nmc,
NMMetaColor nmc_active_connection_state_to_color (NMActiveConnectionState state);
extern const NmcMetaGenericInfo *const metagen_con_show[];
-extern const NmcMetaGenericInfo *const nmc_fields_con_active_details_general[];
+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 4d2c9806de..6407f50beb 100644
--- a/clients/cli/nmcli.c
+++ b/clients/cli/nmcli.c
@@ -189,7 +189,7 @@ complete_fields (const char *option, const char *prefix)
complete_field (h, nmc_fields_dhcp_config);
complete_field (h, nmc_fields_ip6_config);
complete_field (h, metagen_con_show);
- complete_field (h, nmc_fields_con_active_details_general);
+ 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/utils.h b/clients/cli/utils.h
index de07e119a7..3122b8808c 100644
--- a/clients/cli/utils.h
+++ b/clients/cli/utils.h
@@ -137,6 +137,20 @@ typedef enum {
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/test_003-025.expected b/clients/tests/test-client.check-on-disk/test_003-025.expected
index 4ab03e2b6f..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
@@ -2,9 +2,9 @@ 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: 50 bytes
+stdout: 51 bytes
>>>
-GENERAL.STATE: activated
+GENERAL.STATE: aktywowano
<<<
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 5af531d619..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
@@ -2,7 +2,7 @@ location: clients/tests/test-client.py:752:test_003()/27
cmd: $NMCLI con s ethernet
lang: pl_PL.UTF-8
returncode: 0
-stdout: 4201 bytes
+stdout: 4202 bytes
>>>
connection.id: ethernet
connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL
@@ -85,7 +85,7 @@ proxy.pac-script: --
GENERAL.NAME: ethernet
GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL
GENERAL.DEVICES: eth0
-GENERAL.STATE: activated
+GENERAL.STATE: aktywowano
GENERAL.DEFAULT: nie
GENERAL.DEFAULT6: nie
GENERAL.SPEC-OBJECT: --
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 5140e9b392..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
@@ -2,11 +2,11 @@ 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: 101 bytes
+stdout: 103 bytes
>>>
-GENERAL.STATE: activated
+GENERAL.STATE: aktywowano
-GENERAL.STATE: activated
+GENERAL.STATE: aktywowano
<<<
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 f10c731e50..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
@@ -2,7 +2,7 @@ location: clients/tests/test-client.py:752:test_003()/48
cmd: $NMCLI con s ethernet
lang: pl_PL.UTF-8
returncode: 0
-stdout: 4869 bytes
+stdout: 4871 bytes
>>>
connection.id: ethernet
connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL
@@ -85,7 +85,7 @@ proxy.pac-script: --
GENERAL.NAME: ethernet
GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL
GENERAL.DEVICES: eth0
-GENERAL.STATE: activated
+GENERAL.STATE: aktywowano
GENERAL.DEFAULT: nie
GENERAL.DEFAULT6: nie
GENERAL.SPEC-OBJECT: --
@@ -98,7 +98,7 @@ GENERAL.MASTER-PATH: --
GENERAL.NAME: ethernet
GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL
GENERAL.DEVICES: eth1
-GENERAL.STATE: activated
+GENERAL.STATE: aktywowano
GENERAL.DEFAULT: nie
GENERAL.DEFAULT6: nie
GENERAL.SPEC-OBJECT: --
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
index aaf8307126..7ad9541102 100644
--- a/clients/tests/test-client.check-on-disk/test_003-070.expected
+++ b/clients/tests/test-client.check-on-disk/test_003-070.expected
@@ -2,7 +2,7 @@ location: clients/tests/test-client.py:796:test_003()/70
cmd: $NMCLI con s ethernet
lang: pl_PL.UTF-8
returncode: 0
-stdout: 4872 bytes
+stdout: 4875 bytes
>>>
connection.id: ethernet
connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL
@@ -85,7 +85,7 @@ proxy.pac-script: --
GENERAL.NAME: ethernet
GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL
GENERAL.DEVICES: eth1
-GENERAL.STATE: activated
+GENERAL.STATE: aktywowano
GENERAL.DEFAULT: nie
GENERAL.DEFAULT6: nie
GENERAL.SPEC-OBJECT: --
@@ -98,7 +98,7 @@ GENERAL.MASTER-PATH: --
GENERAL.NAME: ethernet
GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL
GENERAL.DEVICES: eth0
-GENERAL.STATE: deactivating
+GENERAL.STATE: dezaktywowanie
GENERAL.DEFAULT: nie
GENERAL.DEFAULT6: nie
GENERAL.SPEC-OBJECT: --
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
index 525c564619..11d084d412 100644
--- a/clients/tests/test-client.check-on-disk/test_003-072.expected
+++ b/clients/tests/test-client.check-on-disk/test_003-072.expected
@@ -2,7 +2,7 @@ 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: 4204 bytes
+stdout: 4206 bytes
>>>
connection.id: ethernet
connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL
@@ -85,7 +85,7 @@ proxy.pac-script: --
GENERAL.NAME: ethernet
GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL
GENERAL.DEVICES: eth0
-GENERAL.STATE: deactivating
+GENERAL.STATE: dezaktywowanie
GENERAL.DEFAULT: nie
GENERAL.DEFAULT6: nie
GENERAL.SPEC-OBJECT: --
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
index c72d1f76c3..b5d36c6983 100644
--- a/clients/tests/test-client.check-on-disk/test_003-091.expected
+++ b/clients/tests/test-client.check-on-disk/test_003-091.expected
@@ -1,14 +1,24 @@
location: clients/tests/test-client.py:799:test_003()/91
cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1
lang: C
-returncode: -6
-stdout: 0 bytes
+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: 103 bytes
+stderr: 0 bytes
>>>
-**
-nmcli:ERROR:clients/cli/connections.c:1068:fill_output_active_connection: assertion failed: (s_con)
<<<
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
index c00d63d082..d7d4a4cf8a 100644
--- a/clients/tests/test-client.check-on-disk/test_003-092.expected
+++ b/clients/tests/test-client.check-on-disk/test_003-092.expected
@@ -1,14 +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: -6
-stdout: 0 bytes
+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: 103 bytes
+stderr: 0 bytes
>>>
-**
-nmcli:ERROR:clients/cli/connections.c:1068:fill_output_active_connection: assertion failed: (s_con)
<<<