On Tue, Sep 15, 2020 at 01:24:04PM -0300, Joao Morais wrote:
> 
> 
> > Em 15 de set de 2020, à(s) 12:36, William Lallemand 
> > <[email protected]> escreveu:
> > 
> > Oh right... the space in "[was: ]" is troublesome for cutting the string,
> > we must remove it.
> 
> It's not a problem at all when using chunks of fixed size, even if columns 
> differ between them, and the lay out ([was: ...]) remains the same.

Sure, but the spaces are only alignment, it could change in the future,
the real separator are the spaces, and the fields are not supposed to
contain a space or to be empty.

So the parsing should be as easy with awk or cut.
> 
> > Regarding the size of the fields, 16 bytes should be enough but there is
> > the expection of the version field that can be much larger if a dev
> > version with the commit ID in the version is used.
> 
Sorry, I wasn't clear here, I meant if you use a dev version you could
have something like this:

2.0-dev7-0124c9-7

> If changing the spec, please provide also a way to distinguish the
> haproxy version via master cli which is not in the same `show proc`
> command, something like a `show info` or `version`, or at most in a
> fixed position at the start of `show proc`, so I can use it to version
> the output parser.
> 

I only intend to remove the space in the brackets for 2.3, if you want a
parser which works in any case, just consider that the brackets work
like quotes and allow spaces in this field.

I'll add a "show info" on the master CLI, that will be useful.


-- 
William Lallemand

Reply via email to