[review] New key-value output in mmcli
Dan Williams
dcbw at redhat.com
Fri Nov 9 17:07:27 UTC 2018
On Sat, 2018-11-03 at 16:04 +0100, Aleksander Morgado wrote:
> Hey!
>
> See this MR: https://gitlab.freedesktop.org/mobile-broadband/ModemMan
> ager/merge_requests/51
>
> This enables a new "-K" (or longer, "--output-keyvalue") that allows
> all operations that print some kind of modem info (e.g. modem list,
> modem info, sim info, bearer info, sms info, 3gpp scan...) to be
> dumped in a simple "key-value" pair format.
>
> Along with these changes, I've also made some additional changes:
> deprecating ListBearers() method and removing the redundant
> --simple-status and --location-get-XXX actions.
>
> Worth noting: the original human-friendly output is more or less
> maintained but it is NOT equal to the old one. Applications (e.g. the
> openwrt integration) that were parsing that original output should
> switch to the new key-value pair output.
Do you have a before/after example of the tabular output?
Dan
> Comments welcome!
>
> $ mmcli -L -K
> modem-list.length : 2
> modem-list.value[1] : /org/freedesktop/ModemManager1/Modem/0
> modem-list.value[2] : /org/freedesktop/ModemManager1/Modem/6
>
> $ mmcli -m 0 -K
> modem.dbus-path :
> /org/freedesktop/ModemManager1/Modem/0
> modem.generic.device-identifier :
> 1a48f1180f1fb0166d91f7b139d027136b59ba63
> modem.generic.manufacturer : Sierra Wireless Inc.
> modem.generic.model : Sierra Wireless
> EM7345 4G LTE
> modem.generic.revision :
> FIH7160_V1.1_MODEM_01.1349.12
> modem.generic.hardware-revision :
> XMM7160_V1.1_MBIM_GNSS_NAND_RE
> modem.generic.supported-capabilities.length : 1
> modem.generic.supported-capabilities.value[1] : gsm-umts, lte
> modem.generic.current-capabilities.length : 1
> modem.generic.current-capabilities.value[1] : gsm-umts, lte
> modem.generic.equipment-identifier : 013937003110648
> modem.generic.device :
> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-4
> modem.generic.drivers.length : 1
> modem.generic.drivers.value[1] : cdc_mbim
> modem.generic.plugin : Sierra
> modem.generic.primary-port : cdc-wdm0
> modem.generic.ports.length : 2
> modem.generic.ports.value[1] : cdc-wdm0 (mbim)
> modem.generic.ports.value[2] : wwan0 (net)
> modem.generic.own-numbers : --
> modem.generic.unlock-required : --
> modem.generic.unlock-retries.length : 1
> modem.generic.unlock-retries.value[1] : sim-pin (3)
> modem.generic.state : connected
> modem.generic.state-failed-reason : --
> modem.generic.power-state : on
> modem.generic.access-technologies.length : 1
> modem.generic.access-technologies.value[1] : lte
> modem.generic.signal-quality.value : 22
> modem.generic.signal-quality.recent : no
> modem.generic.supported-modes.length : 1
> modem.generic.supported-modes.value[1] : allowed: 2g, 3g, 4g;
> preferred: none
> modem.generic.current-modes : allowed: 2g, 3g, 4g;
> preferred: none
> modem.generic.supported-bands : --
> modem.generic.current-bands : --
> modem.generic.supported-ip-families.length : 3
> modem.generic.supported-ip-families.value[1] : ipv4
> modem.generic.supported-ip-families.value[2] : ipv6
> modem.generic.supported-ip-families.value[3] : ipv4v6
> modem.3gpp.imei : 013937003110222
> modem.3gpp.enabled-locks.length : 1
> modem.3gpp.enabled-locks.value[1] : fixed-dialing
> modem.3gpp.operator-code : 21407
> modem.3gpp.operator-name : Movistar
> modem.3gpp.registration-state : home
> modem.3gpp.eps-ue-mode-operation : --
> modem.3gpp.pco : --
> modem.cdma.meid : --
> modem.cdma.esn : --
> modem.cdma.sid : --
> modem.cdma.nid : --
> modem.cdma.cdma1x-registration-state : --
> modem.cdma.evdo-registration-state : --
> modem.cdma.activation-state : --
> modem.generic.sim :
> /org/freedesktop/ModemManager1/SIM/0
> modem.generic.bearers.length : 1
> modem.generic.bearers.value[1] :
> /org/freedesktop/ModemManager1/Bearer/0
>
>
More information about the ModemManager-devel
mailing list