[review] New key-value output in mmcli

Dan Williams dcbw at redhat.com
Fri Nov 9 18:14:47 UTC 2018


On Fri, 2018-11-09 at 18:31 +0100, Aleksander Morgado wrote:
> Hey,
> 
> > 
> > > See this MR: https://gitlab.freedesktop.org/mobile-broadband/Mode
> > > mMan
> > > 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?
> > 
> 
> Attached

Thanks; looks like the main difference is long lines are intelligently
wrapped now, so code expecting one-value-per-line will break.  I
haven't checked the implementation in detail, but does it hardcode the
wrapping at a certain point or determine it based on terminal size or
something?

Dan


More information about the ModemManager-devel mailing list