From 46b7d52109bfc5f0181af4b51cfb55f2ba6495ac Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 29 May 2018 07:53:54 +0200 Subject: [PATCH 1/7] clients/tests: add tests for output of `nmcli con show` --- .../test-client.check-on-disk/Makefile.am | 12 ++ .../test_003-016.expected | 84 +------------ .../test_003-017.expected | 84 +------------ .../test_003-018.expected | 96 +-------------- .../test_003-019.expected | 96 +-------------- .../test_003-020.expected | 15 +-- .../test_003-021.expected | 15 +-- .../test_003-022.expected | 112 ++++++++++++----- .../test_003-023.expected | 112 ++++++++++++----- .../test_003-024.expected | 97 ++++++++++++++- .../test_003-025.expected | 102 +++++++++++++-- .../test_003-026.expected | 21 ++-- .../test_003-027.expected | 21 ++-- .../test_003-028.expected | 42 +++++-- .../test_003-029.expected | 116 +++++------------- .../test_003-030.expected | 87 +------------ .../test_003-031.expected | 113 ++--------------- .../test_003-032.expected | 113 ++--------------- .../test_003-033.expected | 19 ++- .../test_003-034.expected | 19 ++- .../test_003-035.expected | 38 +----- .../test_003-036.expected | 38 +----- .../test_003-037.expected | 12 +- .../test_003-038.expected | 12 +- .../test_003-039.expected | 10 +- .../test_003-040.expected | 10 +- .../test_003-041.expected | 90 ++++++++++++-- .../test_003-042.expected | 90 ++++++++++++-- .../test_003-043.expected | 115 +++++++++++++++-- .../test_003-044.expected | 115 +++++++++++++++-- .../test_003-045.expected | 27 ++-- .../test_003-046.expected | 27 ++-- .../test_003-047.expected | 40 ++++-- .../test_003-048.expected | 40 ++++-- .../test_003-049.expected | 13 +- .../test_003-050.expected | 13 +- .../test_003-051.expected | 10 +- .../test_003-052.expected | 10 +- .../test_003-053.expected | 115 ++--------------- .../test_003-054.expected | 115 ++--------------- .../test_003-055.expected | 18 +++ .../test_003-056.expected | 18 +++ .../test_003-057.expected | 24 ++++ .../test_003-058.expected | 24 ++++ .../test_003-059.expected | 16 +++ .../test_003-060.expected | 16 +++ .../test_003-061.expected | 15 +++ .../test_003-062.expected | 15 +++ .../test_003-063.expected | 20 +++ .../test_003-064.expected | 20 +++ .../test_003-065.expected | 115 +++++++++++++++++ .../test_003-066.expected | 115 +++++++++++++++++ .../test_004-001.expected | 2 +- .../test_004-002.expected | 2 +- .../test_004-003.expected | 2 +- .../test_004-004.expected | 2 +- .../test_004-005.expected | 2 +- .../test_004-006.expected | 2 +- clients/tests/test-client.py | 9 ++ 59 files changed, 1471 insertions(+), 1282 deletions(-) create mode 100644 clients/tests/test-client.check-on-disk/test_003-055.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-056.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-057.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-058.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-059.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-060.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-061.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-062.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-063.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-064.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-065.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-066.expected diff --git a/clients/tests/test-client.check-on-disk/Makefile.am b/clients/tests/test-client.check-on-disk/Makefile.am index aa49eda643..983865be59 100644 --- a/clients/tests/test-client.check-on-disk/Makefile.am +++ b/clients/tests/test-client.check-on-disk/Makefile.am @@ -105,6 +105,18 @@ 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_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..8429e4979f 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,99 @@ -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 con s ethernet lang: C returncode: 0 -stdout: 106 bytes +stdout: 4180 bytes >>> -Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2) +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-025.expected b/clients/tests/test-client.check-on-disk/test_003-025.expected index 3806099b97..0e3c598318 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,99 @@ -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 con s ethernet +lang: pl_PL.UTF-8 returncode: 0 -stdout: 264 bytes +stdout: 4201 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: 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: -- <<< 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..03d957e0a7 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,16 +1,19 @@ -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 -f ALL dev s eth0 +lang: C returncode: 0 -stdout: 264 bytes +stdout: 1056 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 -- +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-027.expected b/clients/tests/test-client.check-on-disk/test_003-027.expected index 96924a425a..62109dbf1f 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,16 +1,19 @@ -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 -f ALL dev s eth0 +lang: pl_PL.UTF-8 returncode: 0 -stdout: 1084 bytes +stdout: 1061 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 -- -- -- -- +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-028.expected b/clients/tests/test-client.check-on-disk/test_003-028.expected index 6065d1ea44..f824d83fb0 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,13 +1,39 @@ -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 show eth0 +lang: C returncode: 0 -stdout: 1088 bytes +stdout: 1487 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 -- -- -- -- +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-029.expected b/clients/tests/test-client.check-on-disk/test_003-029.expected index ebb89619ad..1e0f96ed94 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,87 +1,39 @@ -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 show eth0 +lang: pl_PL.UTF-8 returncode: 0 -stdout: 3516 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.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-030.expected b/clients/tests/test-client.check-on-disk/test_003-030.expected index adf743d87d..23f45d284b 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,10 @@ -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:728:test_003()/30 +cmd: $NMCLI con up ethernet ifname eth1 +lang: C returncode: 0 -stdout: 3534 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: -- +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-031.expected b/clients/tests/test-client.check-on-disk/test_003-031.expected index cbf57afcec..5574b1d386 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,13 @@ -location: clients/tests/test-client.py:740:test_003()/31 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:731:test_003()/31 +cmd: $NMCLI con lang: C returncode: 0 -stdout: 4845 bytes +stdout: 264 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: -- +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 -- <<< 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..aebad4026d 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,13 @@ -location: clients/tests/test-client.py:740:test_003()/32 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:731:test_003()/32 +cmd: $NMCLI con lang: pl_PL.UTF-8 returncode: 0 -stdout: 4869 bytes +stdout: 264 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: -- +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 -- <<< 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..3290228e46 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,16 @@ -location: clients/tests/test-client.py:743:test_003()/33 -cmd: $NMCLI -f ALL dev s eth0 +location: clients/tests/test-client.py:734:test_003()/33 +cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 1056 bytes +stdout: 1084 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 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 -- -- -- -- <<< -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..a96aac2d0e 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,16 @@ -location: clients/tests/test-client.py:743:test_003()/34 -cmd: $NMCLI -f ALL dev s eth0 +location: clients/tests/test-client.py:734:test_003()/34 +cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 1061 bytes +stdout: 1088 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 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 -- -- -- -- <<< -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..88b693c2c4 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,11 @@ -location: clients/tests/test-client.py:746:test_003()/35 -cmd: $NMCLI -f ALL dev show eth0 +location: clients/tests/test-client.py:737:test_003()/35 +cmd: $NMCLI -f ALL con s -a lang: C returncode: 0 -stdout: 1487 bytes +stdout: 542 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 -- <<< 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..f32284df46 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,11 @@ -location: clients/tests/test-client.py:746:test_003()/36 -cmd: $NMCLI -f ALL dev show eth0 +location: clients/tests/test-client.py:737:test_003()/36 +cmd: $NMCLI -f ALL con s -a lang: pl_PL.UTF-8 returncode: 0 -stdout: 1510 bytes +stdout: 544 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 -- <<< 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..ca053f7367 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,11 @@ -location: clients/tests/test-client.py:755:test_003()/37 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:740:test_003()/37 +cmd: $NMCLI -f ACTIVE-PATH,DEVICE,UUID con s -act lang: C returncode: 0 -stdout: 1096 bytes +stdout: 196 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 -- -- -- -- +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-038.expected b/clients/tests/test-client.check-on-disk/test_003-038.expected index 81c7c237d7..3713c83a26 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,11 @@ -location: clients/tests/test-client.py:755:test_003()/38 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:740:test_003()/38 +cmd: $NMCLI -f ACTIVE-PATH,DEVICE,UUID con s -act lang: pl_PL.UTF-8 returncode: 0 -stdout: 1104 bytes +stdout: 196 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 -- -- -- -- +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-039.expected b/clients/tests/test-client.check-on-disk/test_003-039.expected index 3640d0c9d2..60988bf673 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,11 @@ -location: clients/tests/test-client.py:758:test_003()/39 -cmd: $NMCLI -f UUID,TYPE con +location: clients/tests/test-client.py:743:test_003()/39 +cmd: $NMCLI -f UUID,NAME con s --active lang: C returncode: 0 -stdout: 192 bytes +stdout: 96 bytes >>> -UUID TYPE +UUID NAME 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-040.expected b/clients/tests/test-client.check-on-disk/test_003-040.expected index fd263f5507..0160b6648f 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,11 @@ -location: clients/tests/test-client.py:758:test_003()/40 -cmd: $NMCLI -f UUID,TYPE con +location: clients/tests/test-client.py:743:test_003()/40 +cmd: $NMCLI -f UUID,NAME con s --active lang: pl_PL.UTF-8 returncode: 0 -stdout: 192 bytes +stdout: 96 bytes >>> -UUID TYPE +UUID NAME 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-041.expected b/clients/tests/test-client.check-on-disk/test_003-041.expected index f61fb681a0..c27b6aaeb9 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,87 @@ -location: clients/tests/test-client.py:761:test_003()/41 -cmd: $NMCLI -f UUID,TYPE --mode multiline con +location: clients/tests/test-client.py:746:test_003()/41 +cmd: $NMCLI -f ALL con s ethernet lang: C returncode: 0 -stdout: 378 bytes +stdout: 3516 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 +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-042.expected b/clients/tests/test-client.check-on-disk/test_003-042.expected index 6ea659e9d4..09229c22c2 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,87 @@ -location: clients/tests/test-client.py:761:test_003()/42 -cmd: $NMCLI -f UUID,TYPE --mode multiline con +location: clients/tests/test-client.py:746:test_003()/42 +cmd: $NMCLI -f ALL con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 378 bytes +stdout: 3534 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 +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-043.expected b/clients/tests/test-client.check-on-disk/test_003-043.expected index 8f5aeb7049..41ddfcd3c6 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,112 @@ -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:749:test_003()/43 +cmd: $NMCLI con s ethernet lang: C returncode: 0 -stdout: 186 bytes +stdout: 4845 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: -- +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-044.expected b/clients/tests/test-client.check-on-disk/test_003-044.expected index fbe01dab80..67fd20782a 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,112 @@ -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:749:test_003()/44 +cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 186 bytes +stdout: 4869 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: -- +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: -- <<< 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..4545fcfa4e 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,24 +1,19 @@ -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:752:test_003()/45 +cmd: $NMCLI -f ALL dev s eth0 lang: C returncode: 0 -stdout: 835 bytes +stdout: 1056 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 -------------------------------------------------------------------------------- +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-046.expected b/clients/tests/test-client.check-on-disk/test_003-046.expected index d853d48743..628383d789 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,24 +1,19 @@ -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:752:test_003()/46 +cmd: $NMCLI -f ALL dev s eth0 lang: pl_PL.UTF-8 returncode: 0 -stdout: 841 bytes +stdout: 1061 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 -------------------------------------------------------------------------------- +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-047.expected b/clients/tests/test-client.check-on-disk/test_003-047.expected index 6522c7b20e..0b8013ffa9 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,39 @@ -location: clients/tests/test-client.py:770:test_003()/47 -cmd: $NMCLI -f UUID,TYPE --mode tabular con +location: clients/tests/test-client.py:755:test_003()/47 +cmd: $NMCLI -f ALL dev show eth0 lang: C returncode: 0 -stdout: 192 bytes +stdout: 1487 bytes >>> -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-048.expected b/clients/tests/test-client.check-on-disk/test_003-048.expected index 08d3ae95c0..86a80ab378 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,39 @@ -location: clients/tests/test-client.py:770:test_003()/48 -cmd: $NMCLI -f UUID,TYPE --mode tabular con +location: clients/tests/test-client.py:755:test_003()/48 +cmd: $NMCLI -f ALL dev show eth0 lang: pl_PL.UTF-8 returncode: 0 -stdout: 192 bytes +stdout: 1510 bytes >>> -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-049.expected b/clients/tests/test-client.check-on-disk/test_003-049.expected index 3f8f30602a..4ca02a71a2 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,12 +1,13 @@ -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:764:test_003()/49 +cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 156 bytes +stdout: 1096 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 +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 -- -- -- -- <<< stderr: 0 bytes 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..94f73ccf01 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,12 +1,13 @@ -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:764:test_003()/50 +cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 156 bytes +stdout: 1104 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 +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 -- -- -- -- <<< stderr: 0 bytes 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..1e411624b3 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,14 +1,10 @@ -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:767:test_003()/51 +cmd: $NMCLI -f UUID,TYPE con lang: C returncode: 0 -stdout: 394 bytes +stdout: 192 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 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..1b35cce420 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,14 +1,10 @@ -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:767:test_003()/52 +cmd: $NMCLI -f UUID,TYPE con lang: pl_PL.UTF-8 returncode: 0 -stdout: 414 bytes +stdout: 192 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 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..344e5137c8 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,15 @@ -location: clients/tests/test-client.py:779:test_003()/53 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:770:test_003()/53 +cmd: $NMCLI -f UUID,TYPE --mode multiline con lang: C returncode: 0 -stdout: 4848 bytes +stdout: 378 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: -- +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-054.expected b/clients/tests/test-client.check-on-disk/test_003-054.expected index 7379f872c6..3fc40383db 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,15 @@ -location: clients/tests/test-client.py:779:test_003()/54 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:770:test_003()/54 +cmd: $NMCLI -f UUID,TYPE --mode multiline con lang: pl_PL.UTF-8 returncode: 0 -stdout: 4872 bytes +stdout: 378 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: -- +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-055.expected b/clients/tests/test-client.check-on-disk/test_003-055.expected new file mode 100644 index 0000000000..b7127fe633 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-055.expected @@ -0,0 +1,18 @@ +location: clients/tests/test-client.py:773:test_003()/55 +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-056.expected b/clients/tests/test-client.check-on-disk/test_003-056.expected new file mode 100644 index 0000000000..5fd2903f93 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-056.expected @@ -0,0 +1,18 @@ +location: clients/tests/test-client.py:773:test_003()/56 +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-057.expected b/clients/tests/test-client.check-on-disk/test_003-057.expected new file mode 100644 index 0000000000..97beb7cc13 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-057.expected @@ -0,0 +1,24 @@ +location: clients/tests/test-client.py:776:test_003()/57 +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-058.expected b/clients/tests/test-client.check-on-disk/test_003-058.expected new file mode 100644 index 0000000000..9992a2d8a4 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-058.expected @@ -0,0 +1,24 @@ +location: clients/tests/test-client.py:776:test_003()/58 +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-059.expected b/clients/tests/test-client.check-on-disk/test_003-059.expected new file mode 100644 index 0000000000..c8ba8072b8 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-059.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:779:test_003()/59 +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-060.expected b/clients/tests/test-client.check-on-disk/test_003-060.expected new file mode 100644 index 0000000000..a73eb11c88 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-060.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:779:test_003()/60 +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-061.expected b/clients/tests/test-client.check-on-disk/test_003-061.expected new file mode 100644 index 0000000000..7ed41d0b61 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-061.expected @@ -0,0 +1,15 @@ +location: clients/tests/test-client.py:782:test_003()/61 +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-062.expected b/clients/tests/test-client.check-on-disk/test_003-062.expected new file mode 100644 index 0000000000..cf7f3378b8 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-062.expected @@ -0,0 +1,15 @@ +location: clients/tests/test-client.py:782:test_003()/62 +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-063.expected b/clients/tests/test-client.check-on-disk/test_003-063.expected new file mode 100644 index 0000000000..1d46e678cd --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-063.expected @@ -0,0 +1,20 @@ +location: clients/tests/test-client.py:785:test_003()/63 +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-064.expected b/clients/tests/test-client.check-on-disk/test_003-064.expected new file mode 100644 index 0000000000..8bb2133e6c --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-064.expected @@ -0,0 +1,20 @@ +location: clients/tests/test-client.py:785:test_003()/64 +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-065.expected b/clients/tests/test-client.check-on-disk/test_003-065.expected new file mode 100644 index 0000000000..839ceb4ae0 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-065.expected @@ -0,0 +1,115 @@ +location: clients/tests/test-client.py:788:test_003()/65 +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: 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: -- + +<<< +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..92eed2c372 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-066.expected @@ -0,0 +1,115 @@ +location: clients/tests/test-client.py:788:test_003()/66 +cmd: $NMCLI con s ethernet +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 4872 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: -- + +<<< +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..ab01dd6a3d 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:798: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..856faaffcd 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:800: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..e86635447d 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:801: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..3b4ef64ba4 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:802: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..512ab81973 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:803: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..3ac5a4ff11 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:804: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..51dd5cec3d 100755 --- a/clients/tests/test-client.py +++ b/clients/tests/test-client.py @@ -733,6 +733,15 @@ 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) From 3645be64846b0751c5fba1cb3f4b16a26544f592 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 29 May 2018 10:13:18 +0200 Subject: [PATCH 2/7] clients/tests: add test for showing invisible connection in nmcli It also shows how we handle invisible connections wrongly, when we have multiple active-connections that reference them. --- .../test-client.check-on-disk/Makefile.am | 22 ++++ .../test_003-049.expected | 2 +- .../test_003-050.expected | 2 +- .../test_003-051.expected | 2 +- .../test_003-052.expected | 2 +- .../test_003-053.expected | 2 +- .../test_003-054.expected | 2 +- .../test_003-055.expected | 2 +- .../test_003-056.expected | 2 +- .../test_003-057.expected | 2 +- .../test_003-058.expected | 2 +- .../test_003-059.expected | 2 +- .../test_003-060.expected | 2 +- .../test_003-061.expected | 2 +- .../test_003-062.expected | 2 +- .../test_003-063.expected | 2 +- .../test_003-064.expected | 2 +- .../test_003-065.expected | 2 +- .../test_003-066.expected | 2 +- .../test_003-067.expected | 102 ++++++++++++++++++ .../test_003-068.expected | 102 ++++++++++++++++++ .../test_003-069.expected | 17 +++ .../test_003-070.expected | 17 +++ .../test_003-071.expected | 17 +++ .../test_003-072.expected | 17 +++ .../test_003-073.expected | 20 ++++ .../test_003-074.expected | 20 ++++ .../test_003-075.expected | 20 ++++ .../test_003-076.expected | 20 ++++ .../test_003-077.expected | 27 +++++ .../test_003-078.expected | 27 +++++ .../test_003-079.expected | 17 +++ .../test_003-080.expected | 17 +++ .../test_003-081.expected | 16 +++ .../test_003-082.expected | 16 +++ .../test_003-083.expected | 21 ++++ .../test_003-084.expected | 21 ++++ .../test_003-085.expected | 13 +++ .../test_003-086.expected | 13 +++ .../test_003-087.expected | 14 +++ .../test_003-088.expected | 14 +++ .../test_004-001.expected | 2 +- .../test_004-002.expected | 2 +- .../test_004-003.expected | 2 +- .../test_004-004.expected | 2 +- .../test_004-005.expected | 2 +- .../test_004-006.expected | 2 +- clients/tests/test-client.py | 44 ++++---- tools/test-networkmanager-service.py | 10 +- 49 files changed, 648 insertions(+), 44 deletions(-) create mode 100644 clients/tests/test-client.check-on-disk/test_003-067.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-068.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-069.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-070.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-071.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-072.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-073.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-074.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-075.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-076.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-077.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-078.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-079.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-080.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-081.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-082.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-083.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-084.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-085.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-086.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-087.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-088.expected diff --git a/clients/tests/test-client.check-on-disk/Makefile.am b/clients/tests/test-client.check-on-disk/Makefile.am index 983865be59..db12ff24c7 100644 --- a/clients/tests/test-client.check-on-disk/Makefile.am +++ b/clients/tests/test-client.check-on-disk/Makefile.am @@ -117,6 +117,28 @@ clients_tests_expected_files = \ 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_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-049.expected b/clients/tests/test-client.check-on-disk/test_003-049.expected index 4ca02a71a2..4022d80674 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,4 +1,4 @@ -location: clients/tests/test-client.py:764:test_003()/49 +location: clients/tests/test-client.py:769:test_003()/49 cmd: $NMCLI -f ALL con lang: C returncode: 0 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 94f73ccf01..41751260e3 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,4 +1,4 @@ -location: clients/tests/test-client.py:764:test_003()/50 +location: clients/tests/test-client.py:769:test_003()/50 cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 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 1e411624b3..52bcb89ecf 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,4 +1,4 @@ -location: clients/tests/test-client.py:767:test_003()/51 +location: clients/tests/test-client.py:772:test_003()/51 cmd: $NMCLI -f UUID,TYPE con lang: C returncode: 0 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 1b35cce420..53776caa8d 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,4 +1,4 @@ -location: clients/tests/test-client.py:767:test_003()/52 +location: clients/tests/test-client.py:772:test_003()/52 cmd: $NMCLI -f UUID,TYPE con lang: pl_PL.UTF-8 returncode: 0 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 344e5137c8..2c5b000862 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,4 +1,4 @@ -location: clients/tests/test-client.py:770:test_003()/53 +location: clients/tests/test-client.py:775:test_003()/53 cmd: $NMCLI -f UUID,TYPE --mode multiline con lang: C returncode: 0 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 3fc40383db..6ee73932bb 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,4 +1,4 @@ -location: clients/tests/test-client.py:770:test_003()/54 +location: clients/tests/test-client.py:775:test_003()/54 cmd: $NMCLI -f UUID,TYPE --mode multiline con lang: pl_PL.UTF-8 returncode: 0 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 index b7127fe633..54b76365d5 100644 --- a/clients/tests/test-client.check-on-disk/test_003-055.expected +++ b/clients/tests/test-client.check-on-disk/test_003-055.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:773:test_003()/55 +location: clients/tests/test-client.py:778:test_003()/55 cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con lang: C returncode: 0 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 index 5fd2903f93..bdeb65e698 100644 --- a/clients/tests/test-client.check-on-disk/test_003-056.expected +++ b/clients/tests/test-client.check-on-disk/test_003-056.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:773:test_003()/56 +location: clients/tests/test-client.py:778:test_003()/56 cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con lang: pl_PL.UTF-8 returncode: 0 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 index 97beb7cc13..bc7aceb720 100644 --- a/clients/tests/test-client.check-on-disk/test_003-057.expected +++ b/clients/tests/test-client.check-on-disk/test_003-057.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:776:test_003()/57 +location: clients/tests/test-client.py:781:test_003()/57 cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con lang: C returncode: 0 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 index 9992a2d8a4..1d3c44856e 100644 --- a/clients/tests/test-client.check-on-disk/test_003-058.expected +++ b/clients/tests/test-client.check-on-disk/test_003-058.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:776:test_003()/58 +location: clients/tests/test-client.py:781:test_003()/58 cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con lang: pl_PL.UTF-8 returncode: 0 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 index c8ba8072b8..261e4ed832 100644 --- a/clients/tests/test-client.check-on-disk/test_003-059.expected +++ b/clients/tests/test-client.check-on-disk/test_003-059.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:779:test_003()/59 +location: clients/tests/test-client.py:784:test_003()/59 cmd: $NMCLI -f UUID,TYPE --mode tabular con lang: C returncode: 0 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 index a73eb11c88..4b5fdaa299 100644 --- a/clients/tests/test-client.check-on-disk/test_003-060.expected +++ b/clients/tests/test-client.check-on-disk/test_003-060.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:779:test_003()/60 +location: clients/tests/test-client.py:784:test_003()/60 cmd: $NMCLI -f UUID,TYPE --mode tabular con lang: pl_PL.UTF-8 returncode: 0 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 index 7ed41d0b61..cd4c321a96 100644 --- a/clients/tests/test-client.check-on-disk/test_003-061.expected +++ b/clients/tests/test-client.check-on-disk/test_003-061.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:782:test_003()/61 +location: clients/tests/test-client.py:787:test_003()/61 cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con lang: C returncode: 0 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 index cf7f3378b8..4b243935bd 100644 --- a/clients/tests/test-client.check-on-disk/test_003-062.expected +++ b/clients/tests/test-client.check-on-disk/test_003-062.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:782:test_003()/62 +location: clients/tests/test-client.py:787:test_003()/62 cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con lang: pl_PL.UTF-8 returncode: 0 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 index 1d46e678cd..42102cb4ef 100644 --- a/clients/tests/test-client.check-on-disk/test_003-063.expected +++ b/clients/tests/test-client.check-on-disk/test_003-063.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:785:test_003()/63 +location: clients/tests/test-client.py:790:test_003()/63 cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con lang: C returncode: 0 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 index 8bb2133e6c..d6c9cb6261 100644 --- a/clients/tests/test-client.check-on-disk/test_003-064.expected +++ b/clients/tests/test-client.check-on-disk/test_003-064.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:785:test_003()/64 +location: clients/tests/test-client.py:790:test_003()/64 cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con lang: pl_PL.UTF-8 returncode: 0 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 index 839ceb4ae0..06144a0d9c 100644 --- a/clients/tests/test-client.check-on-disk/test_003-065.expected +++ b/clients/tests/test-client.check-on-disk/test_003-065.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:788:test_003()/65 +location: clients/tests/test-client.py:793:test_003()/65 cmd: $NMCLI con s ethernet lang: C returncode: 0 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 index 92eed2c372..f7848d54fe 100644 --- a/clients/tests/test-client.check-on-disk/test_003-066.expected +++ b/clients/tests/test-client.check-on-disk/test_003-066.expected @@ -1,4 +1,4 @@ -location: clients/tests/test-client.py:788:test_003()/66 +location: clients/tests/test-client.py:793:test_003()/66 cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 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..0bbd025fe4 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-067.expected @@ -0,0 +1,102 @@ +location: clients/tests/test-client.py:796:test_003()/67 +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-068.expected b/clients/tests/test-client.check-on-disk/test_003-068.expected new file mode 100644 index 0000000000..d17c51a5d2 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-068.expected @@ -0,0 +1,102 @@ +location: clients/tests/test-client.py:796:test_003()/68 +cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 4204 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: -- + +<<< +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..3e7a8fad2c --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-069.expected @@ -0,0 +1,17 @@ +location: clients/tests/test-client.py:769:test_003()/69 +cmd: $NMCLI -f ALL con +lang: C +returncode: 0 +stdout: 1430 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 -- -- -- -- -- -- yes eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- + ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- -- 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-070.expected b/clients/tests/test-client.check-on-disk/test_003-070.expected new file mode 100644 index 0000000000..bf869b915d --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-070.expected @@ -0,0 +1,17 @@ +location: clients/tests/test-client.py:769:test_003()/70 +cmd: $NMCLI -f ALL con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 1430 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 -- -- -- -- -- -- tak eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- + ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- -- tak eth1 activated /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-071.expected b/clients/tests/test-client.check-on-disk/test_003-071.expected new file mode 100644 index 0000000000..7d9c0fa534 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-071.expected @@ -0,0 +1,17 @@ +location: clients/tests/test-client.py:772:test_003()/71 +cmd: $NMCLI -f UUID,TYPE con +lang: C +returncode: 0 +stdout: 240 bytes +>>> +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-072.expected b/clients/tests/test-client.check-on-disk/test_003-072.expected new file mode 100644 index 0000000000..8a60c41f9c --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-072.expected @@ -0,0 +1,17 @@ +location: clients/tests/test-client.py:772:test_003()/72 +cmd: $NMCLI -f UUID,TYPE con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 240 bytes +>>> +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-073.expected b/clients/tests/test-client.check-on-disk/test_003-073.expected new file mode 100644 index 0000000000..d2d547a9dd --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-073.expected @@ -0,0 +1,20 @@ +location: clients/tests/test-client.py:775:test_003()/73 +cmd: $NMCLI -f UUID,TYPE --mode multiline con +lang: C +returncode: 0 +stdout: 504 bytes +>>> +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +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-074.expected b/clients/tests/test-client.check-on-disk/test_003-074.expected new file mode 100644 index 0000000000..9691013962 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-074.expected @@ -0,0 +1,20 @@ +location: clients/tests/test-client.py:775:test_003()/74 +cmd: $NMCLI -f UUID,TYPE --mode multiline con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 504 bytes +>>> +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +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-075.expected b/clients/tests/test-client.check-on-disk/test_003-075.expected new file mode 100644 index 0000000000..01c6e13909 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-075.expected @@ -0,0 +1,20 @@ +location: clients/tests/test-client.py:778:test_003()/75 +cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +lang: C +returncode: 0 +stdout: 248 bytes +>>> +UUID:UUID-ethernet-REPLACED-REPLACED-REPL +TYPE:802-3-ethernet +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-076.expected b/clients/tests/test-client.check-on-disk/test_003-076.expected new file mode 100644 index 0000000000..e059ac9ca3 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-076.expected @@ -0,0 +1,20 @@ +location: clients/tests/test-client.py:778:test_003()/76 +cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 248 bytes +>>> +UUID:UUID-ethernet-REPLACED-REPLACED-REPL +TYPE:802-3-ethernet +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-077.expected b/clients/tests/test-client.check-on-disk/test_003-077.expected new file mode 100644 index 0000000000..0b975d7ea2 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-077.expected @@ -0,0 +1,27 @@ +location: clients/tests/test-client.py:781:test_003()/77 +cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +lang: C +returncode: 0 +stdout: 1041 bytes +>>> +=============================================================================== + NetworkManager connection profiles +=============================================================================== +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +------------------------------------------------------------------------------- +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-078.expected b/clients/tests/test-client.check-on-disk/test_003-078.expected new file mode 100644 index 0000000000..6fdbc06434 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-078.expected @@ -0,0 +1,27 @@ +location: clients/tests/test-client.py:781:test_003()/78 +cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 1047 bytes +>>> +=============================================================================== + Profile połączeń usługi NetworkManager +=============================================================================== +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +------------------------------------------------------------------------------- +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-079.expected b/clients/tests/test-client.check-on-disk/test_003-079.expected new file mode 100644 index 0000000000..7538da7935 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-079.expected @@ -0,0 +1,17 @@ +location: clients/tests/test-client.py:784:test_003()/79 +cmd: $NMCLI -f UUID,TYPE --mode tabular con +lang: C +returncode: 0 +stdout: 240 bytes +>>> +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-080.expected b/clients/tests/test-client.check-on-disk/test_003-080.expected new file mode 100644 index 0000000000..d3ef378cce --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-080.expected @@ -0,0 +1,17 @@ +location: clients/tests/test-client.py:784:test_003()/80 +cmd: $NMCLI -f UUID,TYPE --mode tabular con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 240 bytes +>>> +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-081.expected b/clients/tests/test-client.check-on-disk/test_003-081.expected new file mode 100644 index 0000000000..4a347c7b56 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-081.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:787:test_003()/81 +cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +lang: C +returncode: 0 +stdout: 208 bytes +>>> +UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet +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-082.expected b/clients/tests/test-client.check-on-disk/test_003-082.expected new file mode 100644 index 0000000000..4e8d1f7934 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-082.expected @@ -0,0 +1,16 @@ +location: clients/tests/test-client.py:787:test_003()/82 +cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 208 bytes +>>> +UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet +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-083.expected b/clients/tests/test-client.check-on-disk/test_003-083.expected new file mode 100644 index 0000000000..4be68f994e --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-083.expected @@ -0,0 +1,21 @@ +location: clients/tests/test-client.py:790:test_003()/83 +cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +lang: C +returncode: 0 +stdout: 442 bytes +>>> +====================================== + NetworkManager connection profiles +====================================== +UUID TYPE +-------------------------------------------------------------------------------------- +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-084.expected b/clients/tests/test-client.check-on-disk/test_003-084.expected new file mode 100644 index 0000000000..f0d2e09df8 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-084.expected @@ -0,0 +1,21 @@ +location: clients/tests/test-client.py:790:test_003()/84 +cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +lang: pl_PL.UTF-8 +returncode: 0 +stdout: 462 bytes +>>> +========================================== + Profile połączeń usługi NetworkManager +========================================== +UUID TYPE +------------------------------------------------------------------------------------------ +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-085.expected b/clients/tests/test-client.check-on-disk/test_003-085.expected new file mode 100644 index 0000000000..d61f42c2b8 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-085.expected @@ -0,0 +1,13 @@ +location: clients/tests/test-client.py:793:test_003()/85 +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-086.expected b/clients/tests/test-client.check-on-disk/test_003-086.expected new file mode 100644 index 0000000000..719197328a --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-086.expected @@ -0,0 +1,13 @@ +location: clients/tests/test-client.py:793:test_003()/86 +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-087.expected b/clients/tests/test-client.check-on-disk/test_003-087.expected new file mode 100644 index 0000000000..345d6803b3 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-087.expected @@ -0,0 +1,14 @@ +location: clients/tests/test-client.py:796:test_003()/87 +cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +lang: C +returncode: -6 +stdout: 0 bytes +>>> + +<<< +stderr: 102 bytes +>>> +** +nmcli:ERROR:clients/cli/connections.c:893:fill_output_active_connection: assertion failed: (s_con) + +<<< 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..dbc6fcf427 --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-088.expected @@ -0,0 +1,14 @@ +location: clients/tests/test-client.py:796:test_003()/88 +cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +lang: pl_PL.UTF-8 +returncode: -6 +stdout: 0 bytes +>>> + +<<< +stderr: 102 bytes +>>> +** +nmcli:ERROR:clients/cli/connections.c:893:fill_output_active_connection: assertion failed: (s_con) + +<<< 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 ab01dd6a3d..e24ecb6527 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:798:test_004()/1 +location: clients/tests/test-client.py:806: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 856faaffcd..dc292d9b7c 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:800:test_004()/2 +location: clients/tests/test-client.py:808: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 e86635447d..7c7c028007 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:801:test_004()/3 +location: clients/tests/test-client.py:809: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 3b4ef64ba4..67f5a6bcdf 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:802:test_004()/4 +location: clients/tests/test-client.py:810: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 512ab81973..f0938581e4 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:803:test_004()/5 +location: clients/tests/test-client.py:811: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 3ac5a4ff11..50fa540f23 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:804:test_004()/6 +location: clients/tests/test-client.py:812: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 51dd5cec3d..474a8917db 100755 --- a/clients/tests/test-client.py +++ b/clients/tests/test-client.py @@ -760,32 +760,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") From 3690f8bcd5f18326e697c734016bec2b8084e81f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 1 Jun 2018 09:13:41 +0200 Subject: [PATCH 3/7] clients/tests: add test for showing connection's active state --- .../test-client.check-on-disk/Makefile.am | 4 + .../test_003-024.expected | 93 +----------- .../test_003-025.expected | 93 +----------- .../test_003-026.expected | 103 +++++++++++-- .../test_003-027.expected | 103 +++++++++++-- .../test_003-028.expected | 43 ++---- .../test_003-029.expected | 43 ++---- .../test_003-030.expected | 37 ++++- .../test_003-031.expected | 42 +++++- .../test_003-032.expected | 13 +- .../test_003-033.expected | 14 +- .../test_003-034.expected | 14 +- .../test_003-035.expected | 8 +- .../test_003-036.expected | 8 +- .../test_003-037.expected | 10 +- .../test_003-038.expected | 10 +- .../test_003-039.expected | 10 +- .../test_003-040.expected | 10 +- .../test_003-041.expected | 86 +---------- .../test_003-042.expected | 86 +---------- .../test_003-043.expected | 31 +--- .../test_003-044.expected | 31 +--- .../test_003-045.expected | 18 +-- .../test_003-046.expected | 18 +-- .../test_003-047.expected | 139 +++++++++++++----- .../test_003-048.expected | 139 +++++++++++++----- .../test_003-049.expected | 19 ++- .../test_003-050.expected | 19 ++- .../test_003-051.expected | 40 ++++- .../test_003-052.expected | 40 ++++- .../test_003-053.expected | 16 +- .../test_003-054.expected | 16 +- .../test_003-055.expected | 16 +- .../test_003-056.expected | 16 +- .../test_003-057.expected | 12 +- .../test_003-058.expected | 12 +- .../test_003-059.expected | 16 +- .../test_003-060.expected | 16 +- .../test_003-061.expected | 21 ++- .../test_003-062.expected | 21 ++- .../test_003-063.expected | 10 +- .../test_003-064.expected | 10 +- .../test_003-065.expected | 112 +------------- .../test_003-066.expected | 112 +------------- .../test_003-067.expected | 104 ++----------- .../test_003-068.expected | 104 ++----------- .../test_003-069.expected | 114 +++++++++++++- .../test_003-070.expected | 114 +++++++++++++- .../test_003-071.expected | 101 ++++++++++++- .../test_003-072.expected | 101 ++++++++++++- .../test_003-073.expected | 19 +-- .../test_003-074.expected | 19 +-- .../test_003-075.expected | 19 +-- .../test_003-076.expected | 19 +-- .../test_003-077.expected | 13 +- .../test_003-078.expected | 13 +- .../test_003-079.expected | 19 ++- .../test_003-080.expected | 19 ++- .../test_003-081.expected | 25 +++- .../test_003-082.expected | 25 +++- .../test_003-083.expected | 10 +- .../test_003-084.expected | 10 +- .../test_003-085.expected | 21 +-- .../test_003-086.expected | 21 +-- .../test_003-087.expected | 27 ++-- .../test_003-088.expected | 27 ++-- .../test_003-089.expected | 13 ++ .../test_003-090.expected | 13 ++ .../test_003-091.expected | 14 ++ .../test_003-092.expected | 14 ++ .../test_004-001.expected | 2 +- .../test_004-002.expected | 2 +- .../test_004-003.expected | 2 +- .../test_004-004.expected | 2 +- .../test_004-005.expected | 2 +- .../test_004-006.expected | 2 +- clients/tests/test-client.py | 3 + 77 files changed, 1403 insertions(+), 1340 deletions(-) create mode 100644 clients/tests/test-client.check-on-disk/test_003-089.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-090.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-091.expected create mode 100644 clients/tests/test-client.check-on-disk/test_003-092.expected diff --git a/clients/tests/test-client.check-on-disk/Makefile.am b/clients/tests/test-client.check-on-disk/Makefile.am index db12ff24c7..e917a3aaa5 100644 --- a/clients/tests/test-client.check-on-disk/Makefile.am +++ b/clients/tests/test-client.check-on-disk/Makefile.am @@ -139,6 +139,10 @@ clients_tests_expected_files = \ 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-024.expected b/clients/tests/test-client.check-on-disk/test_003-024.expected index 8429e4979f..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,99 +1,10 @@ location: clients/tests/test-client.py:749:test_003()/24 -cmd: $NMCLI con s ethernet +cmd: $NMCLI -f GENERAL.STATE con s ethernet lang: C returncode: 0 -stdout: 4180 bytes +stdout: 50 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: -- <<< 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 0e3c598318..4ab03e2b6f 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,99 +1,10 @@ location: clients/tests/test-client.py:749:test_003()/25 -cmd: $NMCLI con s ethernet +cmd: $NMCLI -f GENERAL.STATE con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 4201 bytes +stdout: 50 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: -- <<< 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 03d957e0a7..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,19 +1,102 @@ location: clients/tests/test-client.py:752:test_003()/26 -cmd: $NMCLI -f ALL dev s eth0 +cmd: $NMCLI con s ethernet lang: C returncode: 0 -stdout: 1056 bytes +stdout: 4180 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 +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: 24 bytes +stderr: 0 bytes >>> -Unknown parameter: eth0 <<< 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 62109dbf1f..5af531d619 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,19 +1,102 @@ location: clients/tests/test-client.py:752:test_003()/27 -cmd: $NMCLI -f ALL dev s eth0 +cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 1061 bytes +stdout: 4201 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 +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: -- <<< -stderr: 24 bytes +stderr: 0 bytes >>> -Nieznany parametr: eth0 <<< 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 f824d83fb0..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,42 +1,19 @@ location: clients/tests/test-client.py:755:test_003()/28 -cmd: $NMCLI -f ALL dev show eth0 +cmd: $NMCLI -f ALL dev s eth0 lang: C returncode: 0 -stdout: 1487 bytes +stdout: 1056 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: -- +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 1e0f96ed94..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,42 +1,19 @@ location: clients/tests/test-client.py:755:test_003()/29 -cmd: $NMCLI -f ALL dev show eth0 +cmd: $NMCLI -f ALL dev s eth0 lang: pl_PL.UTF-8 returncode: 0 -stdout: 1510 bytes +stdout: 1061 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: -- +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 23f45d284b..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,10 +1,39 @@ -location: clients/tests/test-client.py:728:test_003()/30 -cmd: $NMCLI con up ethernet ifname eth1 +location: clients/tests/test-client.py:758:test_003()/30 +cmd: $NMCLI -f ALL dev show eth0 lang: C returncode: 0 -stdout: 106 bytes +stdout: 1487 bytes >>> -Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2) +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 5574b1d386..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,13 +1,39 @@ -location: clients/tests/test-client.py:731:test_003()/31 -cmd: $NMCLI con -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: 264 bytes +stdout: 1510 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.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 aebad4026d..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,13 +1,10 @@ -location: clients/tests/test-client.py:731:test_003()/32 -cmd: $NMCLI con -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: 264 bytes +stdout: 106 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 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 3290228e46..9ab67cdc9f 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,13 +1,13 @@ -location: clients/tests/test-client.py:734:test_003()/33 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:731:test_003()/33 +cmd: $NMCLI con lang: C returncode: 0 -stdout: 1084 bytes +stdout: 264 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 -- -- -- -- +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 -- <<< stderr: 0 bytes 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 a96aac2d0e..3048c5bc8c 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,13 +1,13 @@ -location: clients/tests/test-client.py:734:test_003()/34 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:731:test_003()/34 +cmd: $NMCLI con lang: pl_PL.UTF-8 returncode: 0 -stdout: 1088 bytes +stdout: 264 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 -- -- -- -- +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 -- <<< stderr: 0 bytes 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 88b693c2c4..bf987c7f35 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,11 +1,13 @@ -location: clients/tests/test-client.py:737:test_003()/35 -cmd: $NMCLI -f ALL con s -a +location: clients/tests/test-client.py:734:test_003()/35 +cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 542 bytes +stdout: 1084 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 -- -- -- -- <<< 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 f32284df46..b9d32e1c45 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,11 +1,13 @@ -location: clients/tests/test-client.py:737:test_003()/36 -cmd: $NMCLI -f ALL con s -a +location: clients/tests/test-client.py:734:test_003()/36 +cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 544 bytes +stdout: 1088 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 -- -- -- -- <<< 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 ca053f7367..3bda1cb341 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,11 +1,11 @@ -location: clients/tests/test-client.py:740:test_003()/37 -cmd: $NMCLI -f ACTIVE-PATH,DEVICE,UUID con s -act +location: clients/tests/test-client.py:737:test_003()/37 +cmd: $NMCLI -f ALL con s -a lang: C returncode: 0 -stdout: 196 bytes +stdout: 542 bytes >>> -ACTIVE-PATH DEVICE UUID -/org/freedesktop/NetworkManager/ActiveConnection/1 eth0 UUID-ethernet-REPLACED-REPLACED-REPL +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-038.expected b/clients/tests/test-client.check-on-disk/test_003-038.expected index 3713c83a26..9f20d220c9 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,11 +1,11 @@ -location: clients/tests/test-client.py:740:test_003()/38 -cmd: $NMCLI -f ACTIVE-PATH,DEVICE,UUID con s -act +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: 196 bytes +stdout: 544 bytes >>> -ACTIVE-PATH DEVICE UUID -/org/freedesktop/NetworkManager/ActiveConnection/1 eth0 UUID-ethernet-REPLACED-REPLACED-REPL +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-039.expected b/clients/tests/test-client.check-on-disk/test_003-039.expected index 60988bf673..3598657c2e 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,11 +1,11 @@ -location: clients/tests/test-client.py:743:test_003()/39 -cmd: $NMCLI -f UUID,NAME con s --active +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: 96 bytes +stdout: 196 bytes >>> -UUID NAME -UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-040.expected b/clients/tests/test-client.check-on-disk/test_003-040.expected index 0160b6648f..02376adba3 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,11 +1,11 @@ -location: clients/tests/test-client.py:743:test_003()/40 -cmd: $NMCLI -f UUID,NAME con s --active +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: 96 bytes +stdout: 196 bytes >>> -UUID NAME -UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-041.expected b/clients/tests/test-client.check-on-disk/test_003-041.expected index c27b6aaeb9..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,87 +1,11 @@ -location: clients/tests/test-client.py:746:test_003()/41 -cmd: $NMCLI -f ALL con s ethernet +location: clients/tests/test-client.py:743:test_003()/41 +cmd: $NMCLI -f UUID,NAME con s --active lang: C returncode: 0 -stdout: 3516 bytes +stdout: 96 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: -- +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 09229c22c2..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,87 +1,11 @@ -location: clients/tests/test-client.py:746:test_003()/42 -cmd: $NMCLI -f ALL con s ethernet +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: 3534 bytes +stdout: 96 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: -- +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 41ddfcd3c6..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,8 +1,8 @@ -location: clients/tests/test-client.py:749:test_003()/43 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:746:test_003()/43 +cmd: $NMCLI -f ALL con s ethernet lang: C returncode: 0 -stdout: 4845 bytes +stdout: 3516 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -82,31 +82,6 @@ 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-044.expected b/clients/tests/test-client.check-on-disk/test_003-044.expected index 67fd20782a..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,8 +1,8 @@ -location: clients/tests/test-client.py:749:test_003()/44 -cmd: $NMCLI con s ethernet +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: 4869 bytes +stdout: 3534 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -82,31 +82,6 @@ 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: -- <<< 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 4545fcfa4e..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,19 +1,15 @@ -location: clients/tests/test-client.py:752:test_003()/45 -cmd: $NMCLI -f ALL dev s eth0 +location: clients/tests/test-client.py:749:test_003()/45 +cmd: $NMCLI -f GENERAL.STATE con s ethernet lang: C returncode: 0 -stdout: 1056 bytes +stdout: 101 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 +GENERAL.STATE: activated + +GENERAL.STATE: activated <<< -stderr: 24 bytes +stderr: 0 bytes >>> -Unknown parameter: eth0 <<< 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 628383d789..5140e9b392 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,19 +1,15 @@ -location: clients/tests/test-client.py:752:test_003()/46 -cmd: $NMCLI -f ALL dev s eth0 +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: 1061 bytes +stdout: 101 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 +GENERAL.STATE: activated + +GENERAL.STATE: activated <<< -stderr: 24 bytes +stderr: 0 bytes >>> -Nieznany parametr: eth0 <<< 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 0b8013ffa9..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,39 +1,112 @@ -location: clients/tests/test-client.py:755:test_003()/47 -cmd: $NMCLI -f ALL dev show eth0 +location: clients/tests/test-client.py:752:test_003()/47 +cmd: $NMCLI con s ethernet lang: C returncode: 0 -stdout: 1487 bytes +stdout: 4845 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: -- +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 86a80ab378..f10c731e50 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,39 +1,112 @@ -location: clients/tests/test-client.py:755:test_003()/48 -cmd: $NMCLI -f ALL dev show eth0 +location: clients/tests/test-client.py:752:test_003()/48 +cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 1510 bytes +stdout: 4869 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: -- +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: -- <<< 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 4022d80674..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,16 +1,19 @@ -location: clients/tests/test-client.py:769:test_003()/49 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:755:test_003()/49 +cmd: $NMCLI -f ALL dev s eth0 lang: C returncode: 0 -stdout: 1096 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 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 -- -- -- -- +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 41751260e3..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,16 +1,19 @@ -location: clients/tests/test-client.py:769:test_003()/50 -cmd: $NMCLI -f ALL 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: 1104 bytes +stdout: 1061 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 -- -- -- -- +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 52bcb89ecf..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,13 +1,39 @@ -location: clients/tests/test-client.py:772:test_003()/51 -cmd: $NMCLI -f UUID,TYPE con +location: clients/tests/test-client.py:758:test_003()/51 +cmd: $NMCLI -f ALL dev show eth0 lang: C returncode: 0 -stdout: 192 bytes +stdout: 1487 bytes >>> -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 53776caa8d..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,13 +1,39 @@ -location: clients/tests/test-client.py:772:test_003()/52 -cmd: $NMCLI -f UUID,TYPE 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: 192 bytes +stdout: 1510 bytes >>> -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 2c5b000862..e9cd2be23c 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,15 +1,13 @@ -location: clients/tests/test-client.py:775:test_003()/53 -cmd: $NMCLI -f UUID,TYPE --mode multiline con +location: clients/tests/test-client.py:772:test_003()/53 +cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 378 bytes +stdout: 1096 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 +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 -- -- -- -- <<< 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 6ee73932bb..9f92c7f1fa 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,15 +1,13 @@ -location: clients/tests/test-client.py:775:test_003()/54 -cmd: $NMCLI -f UUID,TYPE --mode multiline con +location: clients/tests/test-client.py:772:test_003()/54 +cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 378 bytes +stdout: 1104 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 +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 -- -- -- -- <<< 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 index 54b76365d5..ced8608586 100644 --- a/clients/tests/test-client.check-on-disk/test_003-055.expected +++ b/clients/tests/test-client.check-on-disk/test_003-055.expected @@ -1,15 +1,13 @@ -location: clients/tests/test-client.py:778:test_003()/55 -cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +location: clients/tests/test-client.py:775:test_003()/55 +cmd: $NMCLI -f UUID,TYPE con lang: C returncode: 0 -stdout: 186 bytes +stdout: 192 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 +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 index bdeb65e698..fc67a94dda 100644 --- a/clients/tests/test-client.check-on-disk/test_003-056.expected +++ b/clients/tests/test-client.check-on-disk/test_003-056.expected @@ -1,15 +1,13 @@ -location: clients/tests/test-client.py:778:test_003()/56 -cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +location: clients/tests/test-client.py:775:test_003()/56 +cmd: $NMCLI -f UUID,TYPE con lang: pl_PL.UTF-8 returncode: 0 -stdout: 186 bytes +stdout: 192 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 +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 index bc7aceb720..aa62abbea4 100644 --- a/clients/tests/test-client.check-on-disk/test_003-057.expected +++ b/clients/tests/test-client.check-on-disk/test_003-057.expected @@ -1,21 +1,15 @@ -location: clients/tests/test-client.py:781:test_003()/57 -cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +location: clients/tests/test-client.py:778:test_003()/57 +cmd: $NMCLI -f UUID,TYPE --mode multiline con lang: C returncode: 0 -stdout: 835 bytes +stdout: 378 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-058.expected b/clients/tests/test-client.check-on-disk/test_003-058.expected index 1d3c44856e..d13a7c03ca 100644 --- a/clients/tests/test-client.check-on-disk/test_003-058.expected +++ b/clients/tests/test-client.check-on-disk/test_003-058.expected @@ -1,21 +1,15 @@ -location: clients/tests/test-client.py:781:test_003()/58 -cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +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: 841 bytes +stdout: 378 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-059.expected b/clients/tests/test-client.check-on-disk/test_003-059.expected index 261e4ed832..f40fe7b6b4 100644 --- a/clients/tests/test-client.check-on-disk/test_003-059.expected +++ b/clients/tests/test-client.check-on-disk/test_003-059.expected @@ -1,13 +1,15 @@ -location: clients/tests/test-client.py:784:test_003()/59 -cmd: $NMCLI -f UUID,TYPE --mode tabular con +location: clients/tests/test-client.py:781:test_003()/59 +cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con lang: C returncode: 0 -stdout: 192 bytes +stdout: 186 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +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 index 4b5fdaa299..c43731fca9 100644 --- a/clients/tests/test-client.check-on-disk/test_003-060.expected +++ b/clients/tests/test-client.check-on-disk/test_003-060.expected @@ -1,13 +1,15 @@ -location: clients/tests/test-client.py:784:test_003()/60 -cmd: $NMCLI -f UUID,TYPE --mode tabular con +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: 192 bytes +stdout: 186 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +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 index cd4c321a96..83c6949aef 100644 --- a/clients/tests/test-client.check-on-disk/test_003-061.expected +++ b/clients/tests/test-client.check-on-disk/test_003-061.expected @@ -1,12 +1,21 @@ -location: clients/tests/test-client.py:787:test_003()/61 -cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +location: clients/tests/test-client.py:784:test_003()/61 +cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con lang: C returncode: 0 -stdout: 156 bytes +stdout: 835 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 +=============================================================================== + 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 index 4b243935bd..29c93d37c2 100644 --- a/clients/tests/test-client.check-on-disk/test_003-062.expected +++ b/clients/tests/test-client.check-on-disk/test_003-062.expected @@ -1,12 +1,21 @@ -location: clients/tests/test-client.py:787:test_003()/62 -cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +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: 156 bytes +stdout: 841 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 +=============================================================================== + 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 index 42102cb4ef..6850dbccb9 100644 --- a/clients/tests/test-client.check-on-disk/test_003-063.expected +++ b/clients/tests/test-client.check-on-disk/test_003-063.expected @@ -1,14 +1,10 @@ -location: clients/tests/test-client.py:790:test_003()/63 -cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +location: clients/tests/test-client.py:787:test_003()/63 +cmd: $NMCLI -f UUID,TYPE --mode tabular con lang: C returncode: 0 -stdout: 394 bytes +stdout: 192 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 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 index d6c9cb6261..d6466e4a95 100644 --- a/clients/tests/test-client.check-on-disk/test_003-064.expected +++ b/clients/tests/test-client.check-on-disk/test_003-064.expected @@ -1,14 +1,10 @@ -location: clients/tests/test-client.py:790:test_003()/64 -cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +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: 414 bytes +stdout: 192 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 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 index 06144a0d9c..40d64e0afd 100644 --- a/clients/tests/test-client.check-on-disk/test_003-065.expected +++ b/clients/tests/test-client.check-on-disk/test_003-065.expected @@ -1,112 +1,12 @@ -location: clients/tests/test-client.py:793:test_003()/65 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:790:test_003()/65 +cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con lang: C returncode: 0 -stdout: 4848 bytes +stdout: 156 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: -- +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 index f7848d54fe..e5af348b18 100644 --- a/clients/tests/test-client.check-on-disk/test_003-066.expected +++ b/clients/tests/test-client.check-on-disk/test_003-066.expected @@ -1,112 +1,12 @@ -location: clients/tests/test-client.py:793:test_003()/66 -cmd: $NMCLI con s ethernet +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: 4872 bytes +stdout: 156 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: -- +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 index 0bbd025fe4..99d788f7c0 100644 --- a/clients/tests/test-client.check-on-disk/test_003-067.expected +++ b/clients/tests/test-client.check-on-disk/test_003-067.expected @@ -1,99 +1,17 @@ -location: clients/tests/test-client.py:796:test_003()/67 -cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +location: clients/tests/test-client.py:793:test_003()/67 +cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con lang: C returncode: 0 -stdout: 4183 bytes +stdout: 394 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: -- +====================================== + 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 index d17c51a5d2..6d8a57f13d 100644 --- a/clients/tests/test-client.check-on-disk/test_003-068.expected +++ b/clients/tests/test-client.check-on-disk/test_003-068.expected @@ -1,99 +1,17 @@ -location: clients/tests/test-client.py:796:test_003()/68 -cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +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: 4204 bytes +stdout: 414 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: -- +========================================== + 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 index 3e7a8fad2c..49877a059d 100644 --- a/clients/tests/test-client.check-on-disk/test_003-069.expected +++ b/clients/tests/test-client.check-on-disk/test_003-069.expected @@ -1,14 +1,112 @@ -location: clients/tests/test-client.py:769:test_003()/69 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:796:test_003()/69 +cmd: $NMCLI con s ethernet lang: C returncode: 0 -stdout: 1430 bytes +stdout: 4848 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 -- -- -- -- -- -- yes eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- - ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- -- 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 -- -- -- -- +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: -- <<< 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 index bf869b915d..ecefcf3860 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 @@ -1,14 +1,112 @@ -location: clients/tests/test-client.py:769:test_003()/70 -cmd: $NMCLI -f ALL con +location: clients/tests/test-client.py:796:test_003()/70 +cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 1430 bytes +stdout: 4872 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 -- -- -- -- -- -- tak eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- - ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- -- tak eth1 activated /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 -- -- -- -- +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: -- <<< 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 index 7d9c0fa534..9e92fd03ec 100644 --- a/clients/tests/test-client.check-on-disk/test_003-071.expected +++ b/clients/tests/test-client.check-on-disk/test_003-071.expected @@ -1,14 +1,99 @@ -location: clients/tests/test-client.py:772:test_003()/71 -cmd: $NMCLI -f UUID,TYPE con +location: clients/tests/test-client.py:799:test_003()/71 +cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 240 bytes +stdout: 4183 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -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: 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 index 8a60c41f9c..525c564619 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 @@ -1,14 +1,99 @@ -location: clients/tests/test-client.py:772:test_003()/72 -cmd: $NMCLI -f UUID,TYPE con +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: 240 bytes +stdout: 4204 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -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: 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: -- <<< 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 index d2d547a9dd..cfa2ab2d85 100644 --- a/clients/tests/test-client.check-on-disk/test_003-073.expected +++ b/clients/tests/test-client.check-on-disk/test_003-073.expected @@ -1,17 +1,14 @@ -location: clients/tests/test-client.py:775:test_003()/73 -cmd: $NMCLI -f UUID,TYPE --mode multiline con +location: clients/tests/test-client.py:772:test_003()/73 +cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 504 bytes +stdout: 1430 bytes >>> -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -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 +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 -- -- -- -- -- -- yes eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- + ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- -- 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-074.expected b/clients/tests/test-client.check-on-disk/test_003-074.expected index 9691013962..486554e931 100644 --- a/clients/tests/test-client.check-on-disk/test_003-074.expected +++ b/clients/tests/test-client.check-on-disk/test_003-074.expected @@ -1,17 +1,14 @@ -location: clients/tests/test-client.py:775:test_003()/74 -cmd: $NMCLI -f UUID,TYPE --mode multiline con +location: clients/tests/test-client.py:772:test_003()/74 +cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 504 bytes +stdout: 1430 bytes >>> -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -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 +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 -- -- -- -- -- -- tak eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- + ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- -- tak eth1 activated /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-075.expected b/clients/tests/test-client.check-on-disk/test_003-075.expected index 01c6e13909..5e433f5623 100644 --- a/clients/tests/test-client.check-on-disk/test_003-075.expected +++ b/clients/tests/test-client.check-on-disk/test_003-075.expected @@ -1,17 +1,14 @@ -location: clients/tests/test-client.py:778:test_003()/75 -cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +location: clients/tests/test-client.py:775:test_003()/75 +cmd: $NMCLI -f UUID,TYPE con lang: C returncode: 0 -stdout: 248 bytes +stdout: 240 bytes >>> -UUID:UUID-ethernet-REPLACED-REPLACED-REPL -TYPE:802-3-ethernet -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 +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-076.expected b/clients/tests/test-client.check-on-disk/test_003-076.expected index e059ac9ca3..84998e7bd6 100644 --- a/clients/tests/test-client.check-on-disk/test_003-076.expected +++ b/clients/tests/test-client.check-on-disk/test_003-076.expected @@ -1,17 +1,14 @@ -location: clients/tests/test-client.py:778:test_003()/76 -cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con +location: clients/tests/test-client.py:775:test_003()/76 +cmd: $NMCLI -f UUID,TYPE con lang: pl_PL.UTF-8 returncode: 0 -stdout: 248 bytes +stdout: 240 bytes >>> -UUID:UUID-ethernet-REPLACED-REPLACED-REPL -TYPE:802-3-ethernet -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 +UUID TYPE +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +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-077.expected b/clients/tests/test-client.check-on-disk/test_003-077.expected index 0b975d7ea2..a903ecfc96 100644 --- a/clients/tests/test-client.check-on-disk/test_003-077.expected +++ b/clients/tests/test-client.check-on-disk/test_003-077.expected @@ -1,24 +1,17 @@ -location: clients/tests/test-client.py:781:test_003()/77 -cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +location: clients/tests/test-client.py:778:test_003()/77 +cmd: $NMCLI -f UUID,TYPE --mode multiline con lang: C returncode: 0 -stdout: 1041 bytes +stdout: 504 bytes >>> -=============================================================================== - NetworkManager connection profiles -=============================================================================== UUID: UUID-ethernet-REPLACED-REPLACED-REPL TYPE: ethernet -------------------------------------------------------------------------------- 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-078.expected b/clients/tests/test-client.check-on-disk/test_003-078.expected index 6fdbc06434..ce67ede1cd 100644 --- a/clients/tests/test-client.check-on-disk/test_003-078.expected +++ b/clients/tests/test-client.check-on-disk/test_003-078.expected @@ -1,24 +1,17 @@ -location: clients/tests/test-client.py:781:test_003()/78 -cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con +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: 1047 bytes +stdout: 504 bytes >>> -=============================================================================== - Profile połączeń usługi NetworkManager -=============================================================================== UUID: UUID-ethernet-REPLACED-REPLACED-REPL TYPE: ethernet -------------------------------------------------------------------------------- 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-079.expected b/clients/tests/test-client.check-on-disk/test_003-079.expected index 7538da7935..51782d3448 100644 --- a/clients/tests/test-client.check-on-disk/test_003-079.expected +++ b/clients/tests/test-client.check-on-disk/test_003-079.expected @@ -1,14 +1,17 @@ -location: clients/tests/test-client.py:784:test_003()/79 -cmd: $NMCLI -f UUID,TYPE --mode tabular con +location: clients/tests/test-client.py:781:test_003()/79 +cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con lang: C returncode: 0 -stdout: 240 bytes +stdout: 248 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +UUID:UUID-ethernet-REPLACED-REPLACED-REPL +TYPE:802-3-ethernet +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-080.expected b/clients/tests/test-client.check-on-disk/test_003-080.expected index d3ef378cce..0a4a3667bc 100644 --- a/clients/tests/test-client.check-on-disk/test_003-080.expected +++ b/clients/tests/test-client.check-on-disk/test_003-080.expected @@ -1,14 +1,17 @@ -location: clients/tests/test-client.py:784:test_003()/80 -cmd: $NMCLI -f UUID,TYPE --mode tabular con +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: 240 bytes +stdout: 248 bytes >>> -UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet +UUID:UUID-ethernet-REPLACED-REPLACED-REPL +TYPE:802-3-ethernet +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-081.expected b/clients/tests/test-client.check-on-disk/test_003-081.expected index 4a347c7b56..ff5feb073b 100644 --- a/clients/tests/test-client.check-on-disk/test_003-081.expected +++ b/clients/tests/test-client.check-on-disk/test_003-081.expected @@ -1,13 +1,24 @@ -location: clients/tests/test-client.py:787:test_003()/81 -cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +location: clients/tests/test-client.py:784:test_003()/81 +cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con lang: C returncode: 0 -stdout: 208 bytes +stdout: 1041 bytes >>> -UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet -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 +=============================================================================== + NetworkManager connection profiles +=============================================================================== +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +------------------------------------------------------------------------------- +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-082.expected b/clients/tests/test-client.check-on-disk/test_003-082.expected index 4e8d1f7934..70aa72caa2 100644 --- a/clients/tests/test-client.check-on-disk/test_003-082.expected +++ b/clients/tests/test-client.check-on-disk/test_003-082.expected @@ -1,13 +1,24 @@ -location: clients/tests/test-client.py:787:test_003()/82 -cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con +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: 208 bytes +stdout: 1047 bytes >>> -UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet -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 +=============================================================================== + Profile połączeń usługi NetworkManager +=============================================================================== +UUID: UUID-ethernet-REPLACED-REPLACED-REPL +TYPE: ethernet +------------------------------------------------------------------------------- +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-083.expected b/clients/tests/test-client.check-on-disk/test_003-083.expected index 4be68f994e..c7414ac5ae 100644 --- a/clients/tests/test-client.check-on-disk/test_003-083.expected +++ b/clients/tests/test-client.check-on-disk/test_003-083.expected @@ -1,14 +1,10 @@ -location: clients/tests/test-client.py:790:test_003()/83 -cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +location: clients/tests/test-client.py:787:test_003()/83 +cmd: $NMCLI -f UUID,TYPE --mode tabular con lang: C returncode: 0 -stdout: 442 bytes +stdout: 240 bytes >>> -====================================== - NetworkManager connection profiles -====================================== UUID TYPE --------------------------------------------------------------------------------------- UUID-ethernet-REPLACED-REPLACED-REPL ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 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 index f0d2e09df8..876a200dde 100644 --- a/clients/tests/test-client.check-on-disk/test_003-084.expected +++ b/clients/tests/test-client.check-on-disk/test_003-084.expected @@ -1,14 +1,10 @@ -location: clients/tests/test-client.py:790:test_003()/84 -cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con +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: 462 bytes +stdout: 240 bytes >>> -========================================== - Profile połączeń usługi NetworkManager -========================================== UUID TYPE ------------------------------------------------------------------------------------------- UUID-ethernet-REPLACED-REPLACED-REPL ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet 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 index d61f42c2b8..1db6b9bcc2 100644 --- a/clients/tests/test-client.check-on-disk/test_003-085.expected +++ b/clients/tests/test-client.check-on-disk/test_003-085.expected @@ -1,13 +1,16 @@ -location: clients/tests/test-client.py:793:test_003()/85 -cmd: $NMCLI con s ethernet +location: clients/tests/test-client.py:790:test_003()/85 +cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con lang: C -returncode: 10 -stdout: 0 bytes +returncode: 0 +stdout: 208 bytes +>>> +UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet +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 >>> <<< -stderr: 46 bytes ->>> -Error: ethernet - no such connection profile. - -<<< 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 index 719197328a..375c82e939 100644 --- a/clients/tests/test-client.check-on-disk/test_003-086.expected +++ b/clients/tests/test-client.check-on-disk/test_003-086.expected @@ -1,13 +1,16 @@ -location: clients/tests/test-client.py:793:test_003()/86 -cmd: $NMCLI con s ethernet +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: 10 -stdout: 0 bytes +returncode: 0 +stdout: 208 bytes +>>> +UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet +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 >>> <<< -stderr: 58 bytes ->>> -Błąd: ethernet — nie ma takiego profilu połączenia. - -<<< 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 index 345d6803b3..95b3a1a226 100644 --- a/clients/tests/test-client.check-on-disk/test_003-087.expected +++ b/clients/tests/test-client.check-on-disk/test_003-087.expected @@ -1,14 +1,21 @@ -location: clients/tests/test-client.py:796:test_003()/87 -cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +location: clients/tests/test-client.py:793:test_003()/87 +cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con lang: C -returncode: -6 -stdout: 0 bytes +returncode: 0 +stdout: 442 bytes +>>> +====================================== + NetworkManager connection profiles +====================================== +UUID TYPE +-------------------------------------------------------------------------------------- +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes >>> <<< -stderr: 102 bytes ->>> -** -nmcli:ERROR:clients/cli/connections.c:893:fill_output_active_connection: assertion failed: (s_con) - -<<< 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 index dbc6fcf427..7bc47995eb 100644 --- a/clients/tests/test-client.check-on-disk/test_003-088.expected +++ b/clients/tests/test-client.check-on-disk/test_003-088.expected @@ -1,14 +1,21 @@ -location: clients/tests/test-client.py:796:test_003()/88 -cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 +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: -6 -stdout: 0 bytes +returncode: 0 +stdout: 462 bytes +>>> +========================================== + Profile połączeń usługi NetworkManager +========================================== +UUID TYPE +------------------------------------------------------------------------------------------ +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +UUID-ethernet-REPLACED-REPLACED-REPL ethernet +5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet +UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet + +<<< +stderr: 0 bytes >>> <<< -stderr: 102 bytes ->>> -** -nmcli:ERROR:clients/cli/connections.c:893:fill_output_active_connection: assertion failed: (s_con) - -<<< 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..b56c95ef4d --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-091.expected @@ -0,0 +1,14 @@ +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 +>>> + +<<< +stderr: 102 bytes +>>> +** +nmcli:ERROR:clients/cli/connections.c:893: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 new file mode 100644 index 0000000000..3c3b1906af --- /dev/null +++ b/clients/tests/test-client.check-on-disk/test_003-092.expected @@ -0,0 +1,14 @@ +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 +>>> + +<<< +stderr: 102 bytes +>>> +** +nmcli:ERROR:clients/cli/connections.c:893:fill_output_active_connection: assertion failed: (s_con) + +<<< 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 e24ecb6527..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:806: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 dc292d9b7c..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:808: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 7c7c028007..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:809: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 67f5a6bcdf..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:810: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 f0938581e4..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:811: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 50fa540f23..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:812: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 474a8917db..74e6d5a816 100755 --- a/clients/tests/test-client.py +++ b/clients/tests/test-client.py @@ -745,6 +745,9 @@ class TestNmcli(NmTestBase): 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) From a1b25a47b08ce4bfcfda5af0b454afa84fe32882 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 25 Apr 2018 10:00:40 +0200 Subject: [PATCH 4/7] cli: rework printing of `nmcli connection` for multiple active connections The output of `nmcli connection show` contains also information about whether the profile is currently active, for example the device and the current (activation) state. Even when a profile can be activated only once (without supporting mutiple activations at the same time), there are moments when a connection is activating and still deactivating on another device. NetworkManager ensures in the case with single activations that a profile cannot be in state "activated" multiple times. But that doesn't mean, that one profile cannot have multiple active connection which reference it. That was already handled wrongly before, because `nmcli connection show` would only search the first matching active-connection. That is, it would arbitrarily pick an active connection in case there were multiple and only show activation state about one. Furthermore, we will soon also add the possibility, that a profile can be active multiple times (at the same time). Especially then, we need to extend the output format to show all the devices on which the profile is currently active. Rework printing the connection list to use nmc_print(), and fix various issues. - as discussed, a profile may have multiple active connections at each time. There are only two possibilities: if a profile is active multiple times, show a line for each activation, or otherwise, show the information about multiple activations combined in one line, e.g. by printing "DEVICE eth0,eth1". This patch, does the former. We will now print a line for each active connection, to show all the devices and activation states in multiple lines. Yes, this may result in the same profile being printed multiple times. That is a change in behavior, and inconvenient if you do something like for UUID in $(nmcli connection show | awk '{print$2}'); do ... However, above is anyway wrong because it assumes that there are no spaces in the connection name. The proper way to do this is like for UUID in $(nmcli -g UUID connection show); do ... In the latter case, whenever a user selects a subset of fields (--fields, --get) which don't print information about active connections, these multiple lines are combined. So, above still works as expected, never returning duplicate UUIDs. - if a user has no permissions to see a connection, we previously would print " $NAME". No longer do this but just print the ID was it is reported by the active-connection. If the goal of this was to prevent users from accidentally access the non-existing connection by $NAME, then this was a bad solution, because a script would instead try to access " $NAME". This is now solved better by hiding the active connection if the user selects "-g NAME". - the --order option now sorts according to how the fields are shown. For example, with --terse mode, it will evaluate type "802-11-wireless" but with pretty mode it will consider "wifi". This may change the ordering in which connections are shown. Also, for sorting the name, we use g_utf8_collate() because it's unicode. --- clients/cli/connections.c | 823 +++++++++++------- clients/cli/connections.h | 2 +- clients/cli/nmcli.c | 2 +- clients/cli/nmcli.h | 8 + clients/cli/utils.c | 6 +- clients/cli/utils.h | 16 + .../test_003-033.expected | 3 +- .../test_003-034.expected | 3 +- .../test_003-035.expected | 3 +- .../test_003-036.expected | 3 +- .../test_003-037.expected | 3 +- .../test_003-038.expected | 3 +- .../test_003-039.expected | 3 +- .../test_003-040.expected | 3 +- .../test_003-053.expected | 3 +- .../test_003-054.expected | 3 +- .../test_003-073.expected | 12 +- .../test_003-074.expected | 12 +- .../test_003-075.expected | 4 +- .../test_003-076.expected | 4 +- .../test_003-077.expected | 6 +- .../test_003-078.expected | 6 +- .../test_003-079.expected | 6 +- .../test_003-080.expected | 6 +- .../test_003-081.expected | 8 +- .../test_003-082.expected | 8 +- .../test_003-083.expected | 4 +- .../test_003-084.expected | 4 +- .../test_003-085.expected | 4 +- .../test_003-086.expected | 4 +- .../test_003-087.expected | 4 +- .../test_003-088.expected | 4 +- .../test_003-091.expected | 4 +- .../test_003-092.expected | 4 +- 34 files changed, 610 insertions(+), 381 deletions(-) diff --git a/clients/cli/connections.c b/clients/cli/connections.c index a4f129b6a3..26b56067b7 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,25 +182,265 @@ 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, +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 */ @@ -767,107 +1037,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, @@ -1347,154 +1516,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 +1851,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 +1881,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 +2068,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 +2081,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..0a2f5ac984 100644 --- a/clients/cli/connections.h +++ b/clients/cli/connections.h @@ -35,7 +35,7 @@ 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 metagen_con_show[]; extern const NmcMetaGenericInfo *const nmc_fields_con_active_details_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..4d2c9806de 100644 --- a/clients/cli/nmcli.c +++ b/clients/cli/nmcli.c @@ -188,7 +188,7 @@ 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, metagen_con_show); complete_field (h, nmc_fields_con_active_details_general); complete_field (h, nmc_fields_con_active_details_vpn); complete_field (h, nmc_fields_con_active_details_groups); 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..de07e119a7 100644 --- a/clients/cli/utils.h +++ b/clients/cli/utils.h @@ -121,6 +121,22 @@ 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, + } NmcGenericInfoType; #define NMC_HANDLE_COLOR(color) \ 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 9ab67cdc9f..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 @@ -2,10 +2,11 @@ location: clients/tests/test-client.py:731:test_003()/33 cmd: $NMCLI con lang: C returncode: 0 -stdout: 264 bytes +stdout: 330 bytes >>> 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 -- 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 3048c5bc8c..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 @@ -2,10 +2,11 @@ location: clients/tests/test-client.py:731:test_003()/34 cmd: $NMCLI con lang: pl_PL.UTF-8 returncode: 0 -stdout: 264 bytes +stdout: 330 bytes >>> 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 -- 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 bf987c7f35..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 @@ -2,10 +2,11 @@ location: clients/tests/test-client.py:734:test_003()/35 cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 1084 bytes +stdout: 1355 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 -- +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 -- -- -- -- 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 b9d32e1c45..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 @@ -2,10 +2,11 @@ location: clients/tests/test-client.py:734:test_003()/36 cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 1088 bytes +stdout: 1360 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 -- +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 -- -- -- -- 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 3bda1cb341..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 @@ -2,10 +2,11 @@ location: clients/tests/test-client.py:737:test_003()/37 cmd: $NMCLI -f ALL con s -a lang: C returncode: 0 -stdout: 542 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 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 9f20d220c9..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 @@ -2,10 +2,11 @@ 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: 544 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 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 3598657c2e..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 @@ -2,10 +2,11 @@ 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: 196 bytes +stdout: 294 bytes >>> 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 02376adba3..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 @@ -2,10 +2,11 @@ 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: 196 bytes +stdout: 294 bytes >>> 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-053.expected b/clients/tests/test-client.check-on-disk/test_003-053.expected index e9cd2be23c..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 @@ -2,9 +2,10 @@ location: clients/tests/test-client.py:772:test_003()/53 cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 1096 bytes +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 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 -- -- -- -- 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 9f92c7f1fa..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 @@ -2,9 +2,10 @@ location: clients/tests/test-client.py:772:test_003()/54 cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 1104 bytes +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 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 -- -- -- -- 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 index cfa2ab2d85..16fa6521b2 100644 --- a/clients/tests/test-client.check-on-disk/test_003-073.expected +++ b/clients/tests/test-client.check-on-disk/test_003-073.expected @@ -2,13 +2,13 @@ location: clients/tests/test-client.py:772:test_003()/73 cmd: $NMCLI -f ALL con lang: C returncode: 0 -stdout: 1430 bytes +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 -- -- -- -- -- -- yes eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- - ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- -- 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 -- -- -- -- +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 index 486554e931..b73c604dfb 100644 --- a/clients/tests/test-client.check-on-disk/test_003-074.expected +++ b/clients/tests/test-client.check-on-disk/test_003-074.expected @@ -2,13 +2,13 @@ location: clients/tests/test-client.py:772:test_003()/74 cmd: $NMCLI -f ALL con lang: pl_PL.UTF-8 returncode: 0 -stdout: 1430 bytes +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 -- -- -- -- -- -- tak eth0 deactivating /org/freedesktop/NetworkManager/ActiveConnection/1 -- - ethernet UUID-ethernet-REPLACED-REPLACED-REPL ethernet -- -- -- -- -- -- tak eth1 activated /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 -- -- -- -- +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 index 5e433f5623..4a26382a4a 100644 --- a/clients/tests/test-client.check-on-disk/test_003-075.expected +++ b/clients/tests/test-client.check-on-disk/test_003-075.expected @@ -2,11 +2,9 @@ location: clients/tests/test-client.py:775:test_003()/75 cmd: $NMCLI -f UUID,TYPE con lang: C returncode: 0 -stdout: 240 bytes +stdout: 144 bytes >>> UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -UUID-ethernet-REPLACED-REPLACED-REPL ethernet 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 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 index 84998e7bd6..1f8446c5c1 100644 --- a/clients/tests/test-client.check-on-disk/test_003-076.expected +++ b/clients/tests/test-client.check-on-disk/test_003-076.expected @@ -2,11 +2,9 @@ location: clients/tests/test-client.py:775:test_003()/76 cmd: $NMCLI -f UUID,TYPE con lang: pl_PL.UTF-8 returncode: 0 -stdout: 240 bytes +stdout: 144 bytes >>> UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -UUID-ethernet-REPLACED-REPLACED-REPL ethernet 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 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 index a903ecfc96..314a6452fb 100644 --- a/clients/tests/test-client.check-on-disk/test_003-077.expected +++ b/clients/tests/test-client.check-on-disk/test_003-077.expected @@ -2,12 +2,8 @@ location: clients/tests/test-client.py:778:test_003()/77 cmd: $NMCLI -f UUID,TYPE --mode multiline con lang: C returncode: 0 -stdout: 504 bytes +stdout: 252 bytes >>> -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d TYPE: ethernet UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA 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 index ce67ede1cd..00354b314c 100644 --- a/clients/tests/test-client.check-on-disk/test_003-078.expected +++ b/clients/tests/test-client.check-on-disk/test_003-078.expected @@ -2,12 +2,8 @@ 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: 504 bytes +stdout: 252 bytes >>> -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d TYPE: ethernet UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA 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 index 51782d3448..3e2f2d7e72 100644 --- a/clients/tests/test-client.check-on-disk/test_003-079.expected +++ b/clients/tests/test-client.check-on-disk/test_003-079.expected @@ -2,12 +2,8 @@ location: clients/tests/test-client.py:781:test_003()/79 cmd: $NMCLI -f UUID,TYPE --mode multiline --terse con lang: C returncode: 0 -stdout: 248 bytes +stdout: 124 bytes >>> -UUID:UUID-ethernet-REPLACED-REPLACED-REPL -TYPE:802-3-ethernet -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 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 index 0a4a3667bc..7b8fb5c078 100644 --- a/clients/tests/test-client.check-on-disk/test_003-080.expected +++ b/clients/tests/test-client.check-on-disk/test_003-080.expected @@ -2,12 +2,8 @@ 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: 248 bytes +stdout: 124 bytes >>> -UUID:UUID-ethernet-REPLACED-REPLACED-REPL -TYPE:802-3-ethernet -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 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 index ff5feb073b..26f2f94824 100644 --- a/clients/tests/test-client.check-on-disk/test_003-081.expected +++ b/clients/tests/test-client.check-on-disk/test_003-081.expected @@ -2,17 +2,11 @@ location: clients/tests/test-client.py:784:test_003()/81 cmd: $NMCLI -f UUID,TYPE --mode multiline --pretty con lang: C returncode: 0 -stdout: 1041 bytes +stdout: 629 bytes >>> =============================================================================== NetworkManager connection profiles =============================================================================== -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -------------------------------------------------------------------------------- -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -------------------------------------------------------------------------------- UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d TYPE: ethernet ------------------------------------------------------------------------------- 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 index 70aa72caa2..249a876215 100644 --- a/clients/tests/test-client.check-on-disk/test_003-082.expected +++ b/clients/tests/test-client.check-on-disk/test_003-082.expected @@ -2,17 +2,11 @@ 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: 1047 bytes +stdout: 635 bytes >>> =============================================================================== Profile połączeń usługi NetworkManager =============================================================================== -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -------------------------------------------------------------------------------- -UUID: UUID-ethernet-REPLACED-REPLACED-REPL -TYPE: ethernet -------------------------------------------------------------------------------- UUID: 5fcfd6d7-1e63-3332-8826-a7eda103792d TYPE: ethernet ------------------------------------------------------------------------------- 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 index c7414ac5ae..e8e0710c87 100644 --- a/clients/tests/test-client.check-on-disk/test_003-083.expected +++ b/clients/tests/test-client.check-on-disk/test_003-083.expected @@ -2,11 +2,9 @@ location: clients/tests/test-client.py:787:test_003()/83 cmd: $NMCLI -f UUID,TYPE --mode tabular con lang: C returncode: 0 -stdout: 240 bytes +stdout: 144 bytes >>> UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -UUID-ethernet-REPLACED-REPLACED-REPL ethernet 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 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 index 876a200dde..cfc62ee2bb 100644 --- a/clients/tests/test-client.check-on-disk/test_003-084.expected +++ b/clients/tests/test-client.check-on-disk/test_003-084.expected @@ -2,11 +2,9 @@ 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: 240 bytes +stdout: 144 bytes >>> UUID TYPE -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -UUID-ethernet-REPLACED-REPLACED-REPL ethernet 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 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 index 1db6b9bcc2..8894c409aa 100644 --- a/clients/tests/test-client.check-on-disk/test_003-085.expected +++ b/clients/tests/test-client.check-on-disk/test_003-085.expected @@ -2,10 +2,8 @@ location: clients/tests/test-client.py:790:test_003()/85 cmd: $NMCLI -f UUID,TYPE --mode tabular --terse con lang: C returncode: 0 -stdout: 208 bytes +stdout: 104 bytes >>> -UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet -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 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 index 375c82e939..2038aa2d87 100644 --- a/clients/tests/test-client.check-on-disk/test_003-086.expected +++ b/clients/tests/test-client.check-on-disk/test_003-086.expected @@ -2,10 +2,8 @@ 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: 208 bytes +stdout: 104 bytes >>> -UUID-ethernet-REPLACED-REPLACED-REPL:802-3-ethernet -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 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 index 95b3a1a226..d2d74c3400 100644 --- a/clients/tests/test-client.check-on-disk/test_003-087.expected +++ b/clients/tests/test-client.check-on-disk/test_003-087.expected @@ -2,15 +2,13 @@ location: clients/tests/test-client.py:793:test_003()/87 cmd: $NMCLI -f UUID,TYPE --mode tabular --pretty con lang: C returncode: 0 -stdout: 442 bytes +stdout: 346 bytes >>> ====================================== NetworkManager connection profiles ====================================== UUID TYPE -------------------------------------------------------------------------------------- -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -UUID-ethernet-REPLACED-REPLACED-REPL ethernet 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 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 index 7bc47995eb..4b11b81dfd 100644 --- a/clients/tests/test-client.check-on-disk/test_003-088.expected +++ b/clients/tests/test-client.check-on-disk/test_003-088.expected @@ -2,15 +2,13 @@ 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: 462 bytes +stdout: 366 bytes >>> ========================================== Profile połączeń usługi NetworkManager ========================================== UUID TYPE ------------------------------------------------------------------------------------------ -UUID-ethernet-REPLACED-REPLACED-REPL ethernet -UUID-ethernet-REPLACED-REPLACED-REPL ethernet 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet 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 b56c95ef4d..754ca9a0dd 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 @@ -6,9 +6,9 @@ stdout: 0 bytes >>> <<< -stderr: 102 bytes +stderr: 103 bytes >>> ** -nmcli:ERROR:clients/cli/connections.c:893:fill_output_active_connection: assertion failed: (s_con) +nmcli:ERROR:clients/cli/connections.c:1062: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 3c3b1906af..338027ef8b 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 @@ -6,9 +6,9 @@ stdout: 0 bytes >>> <<< -stderr: 102 bytes +stderr: 103 bytes >>> ** -nmcli:ERROR:clients/cli/connections.c:893:fill_output_active_connection: assertion failed: (s_con) +nmcli:ERROR:clients/cli/connections.c:1062:fill_output_active_connection: assertion failed: (s_con) <<< From b990cee00cda1d3af55a5f71ecd337739ec5e3cd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 26 Apr 2018 11:46:16 +0200 Subject: [PATCH 5/7] cli: sort active-connection for `nmcli connection show $PROFILE` output There might be multiple active connections. Output them in a defined order. --- clients/cli/connections.c | 26 ++++++++++++------- .../test_003-069.expected | 26 +++++++++---------- .../test_003-070.expected | 26 +++++++++---------- .../test_003-091.expected | 2 +- .../test_003-092.expected | 2 +- 5 files changed, 44 insertions(+), 38 deletions(-) diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 26b56067b7..eb9c1ae1b0 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -865,36 +865,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; } 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 index 49877a059d..a966f20fd8 100644 --- a/clients/tests/test-client.check-on-disk/test_003-069.expected +++ b/clients/tests/test-client.check-on-disk/test_003-069.expected @@ -82,19 +82,6 @@ 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 @@ -108,6 +95,19 @@ GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings 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 index ecefcf3860..aaf8307126 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 @@ -82,19 +82,6 @@ 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 @@ -108,6 +95,19 @@ GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- +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: -- + <<< stderr: 0 bytes >>> 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 754ca9a0dd..c72d1f76c3 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 @@ -9,6 +9,6 @@ stdout: 0 bytes stderr: 103 bytes >>> ** -nmcli:ERROR:clients/cli/connections.c:1062:fill_output_active_connection: assertion failed: (s_con) +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 338027ef8b..c00d63d082 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 @@ -9,6 +9,6 @@ stdout: 0 bytes stderr: 103 bytes >>> ** -nmcli:ERROR:clients/cli/connections.c:1062:fill_output_active_connection: assertion failed: (s_con) +nmcli:ERROR:clients/cli/connections.c:1068:fill_output_active_connection: assertion failed: (s_con) <<< From 68fa68b3ed95b8b776a7db8ebd2bcbed879c0003 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 26 Apr 2018 13:19:20 +0200 Subject: [PATCH 6/7] 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); --- clients/cli/connections.c | 219 +++++++++--------- clients/cli/connections.h | 2 +- clients/cli/nmcli.c | 2 +- clients/cli/utils.h | 14 ++ .../test_003-025.expected | 4 +- .../test_003-027.expected | 4 +- .../test_003-046.expected | 6 +- .../test_003-048.expected | 6 +- .../test_003-070.expected | 6 +- .../test_003-072.expected | 4 +- .../test_003-091.expected | 26 ++- .../test_003-092.expected | 26 ++- 12 files changed, 182 insertions(+), 137 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: 0 bytes >>> <<< -stderr: 103 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: 0 bytes >>> <<< -stderr: 103 bytes ->>> -** -nmcli:ERROR:clients/cli/connections.c:1068:fill_output_active_connection: assertion failed: (s_con) - -<<< From 5d716defc1984ba2955f11f236a5bc74796563c5 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 26 Apr 2018 14:49:45 +0200 Subject: [PATCH 7/7] cli/trivial: move code --- clients/cli/connections.c | 160 +++++++++++++++++++------------------- 1 file changed, 81 insertions(+), 79 deletions(-) diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 47eff09c04..21f2f0df0b 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -182,6 +182,87 @@ get_ac_device_string (NMActiveConnection *active) /*****************************************************************************/ +/* 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; @@ -1140,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) {