From cec89aa2e4f360a0212967e8aa40334d7e9883e8 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 14 Mar 2023 08:31:40 +0100 Subject: [PATCH] cli: drop unused readonly properties "wifi.{rate,tx-power}" These properties were never implemented. Also, they were not settable via nmcli. Drop them from being shown. This is an API break, but hopefully something that does not affect anybody in a bad way. --- src/libnmc-setting/nm-meta-setting-desc.c | 8 -------- src/nmcli/gen-metadata-nm-settings-nmcli.xml.in | 4 ---- .../test-client.check-on-disk/test_004.expected | 12 ++++-------- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/libnmc-setting/nm-meta-setting-desc.c b/src/libnmc-setting/nm-meta-setting-desc.c index 1770a2c753..6addbd55ce 100644 --- a/src/libnmc-setting/nm-meta-setting-desc.c +++ b/src/libnmc-setting/nm-meta-setting-desc.c @@ -8027,14 +8027,6 @@ static const NMMetaPropertyInfo *const property_infos_WIRELESS[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_WIRELESS_BSSID, .property_type = &_pt_gobject_mac, ), - PROPERTY_INFO_WITH_DESC (NM_SETTING_WIRELESS_RATE, - /* Do not allow setting 'rate'. It is not implemented in NM core. */ - .property_type = &_pt_gobject_readonly, - ), - PROPERTY_INFO_WITH_DESC (NM_SETTING_WIRELESS_TX_POWER, - /* Do not allow setting 'tx-power'. It is not implemented in NM core. */ - .property_type = &_pt_gobject_readonly, - ), PROPERTY_INFO_WITH_DESC (NM_SETTING_WIRELESS_MAC_ADDRESS, .property_type = &_pt_gobject_mac, .is_cli_option = TRUE, diff --git a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in index 8ac924c829..ab79fb8263 100644 --- a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in +++ b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in @@ -30,10 +30,6 @@ description="Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the "band" property to be set." /> - - diff --git a/src/tests/client/test-client.check-on-disk/test_004.expected b/src/tests/client/test-client.check-on-disk/test_004.expected index b69eb1d9d6..af377f2b5b 100644 --- a/src/tests/client/test-client.check-on-disk/test_004.expected +++ b/src/tests/client/test-client.check-on-disk/test_004.expected @@ -58,12 +58,12 @@ location: src/tests/client/test-client.py:test_004()/7 cmd: $NMCLI connection mod con-xx1 ipv4.addresses 192.168.77.5/24 ipv4.routes '2.3.4.5/32 192.168.77.1' ipv6.addresses 1:2:3:4::6/64 ipv6.routes 1:2:3:4:5:6::5/128 lang: C returncode: 0 -size: 5164 +size: 5080 location: src/tests/client/test-client.py:test_004()/8 cmd: $NMCLI con s con-xx1 lang: C returncode: 0 -stdout: 5033 bytes +stdout: 4949 bytes >>> connection.id: con-xx1 connection.uuid: UUID-con-xx1-REPLACED-REPLACED-REPLA @@ -97,8 +97,6 @@ connection.wait-activation-delay: -1 802-11-wireless.band: a 802-11-wireless.channel: 0 802-11-wireless.bssid: -- -802-11-wireless.rate: 0 -802-11-wireless.tx-power: 0 802-11-wireless.mac-address: -- 802-11-wireless.cloned-mac-address: -- 802-11-wireless.generate-mac-address-mask:-- @@ -174,12 +172,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 5200 +size: 5116 location: src/tests/client/test-client.py:test_004()/9 cmd: $NMCLI con s con-xx1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5059 bytes +stdout: 4975 bytes >>> connection.id: con-xx1 connection.uuid: UUID-con-xx1-REPLACED-REPLACED-REPLA @@ -213,8 +211,6 @@ connection.wait-activation-delay: -1 802-11-wireless.band: a 802-11-wireless.channel: 0 802-11-wireless.bssid: -- -802-11-wireless.rate: 0 -802-11-wireless.tx-power: 0 802-11-wireless.mac-address: -- 802-11-wireless.cloned-mac-address: -- 802-11-wireless.generate-mac-address-mask:--