Support upper case identifier in vm.cfg for xl?
Hi,
It seems we only support [a-z][._0-9a-z]* as identifiers in vm.cfg for xl and upper case letter is not supported. This is different from xm.
An use case is: management tools may put arbitrary key/value pairs into vm.cfg. Current xl has limited support of this feature: xl will ignore unknown options.
I wonder whether we can make xl support uppercase letters? Then management tools don't need to change if they already use upper letter identifiers.
Attached patch is a quick fix and seems working for me. Please help to comment on:
1. Was there a specific reason not to support upper cases? (I know it's simple and if there's no xm, this design is the best.)
2. If we support upper case letters, will it affect other components?
2. Is this patch correct?
3. If we want this patch, someone (Ian J.?) also need to generate the in tree libxlu_cfg_i.h and libxlu_cfg_l.c.
Thanks,
Zhigang
commit d347511769289703e534a999c75badb5cc93b3eb
Author: Zhigang Wang <[email protected]> Date: Fri Jun 13 16:06:10 2014 -0400
tools/xl: support upper case letters as vm.cfg identifiers
tools/libxl/libxlu_cfg_l.l +1 -1
@@ -52,7 +52,7 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner); %% -[a-z][._0-9a-z]* { +[a-zA-Z][._0-9a-zA-Z]* { yylval->string= xlu__cfgl_strdup(ctx,yytext); GOT(IDENT); }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines · Zhigang Wang
Hi,
It seems we only support
[a-z][._0-9a-z]*as identifiers in vm.cfg for xl and upper case letter is not supported. This is different from xm.An use case is: management tools may put arbitrary key/value pairs into vm.cfg. Current xl has limited support of this feature: xl will ignore unknown options.
I wonder whether we can make xl support uppercase letters?
I think maybe you mean "make the libxlu cfg file parser support uppercase letters", because you are reusing that library in your management tool perhaps?
Quoted 23 lines
Then management
tools don't need to change if they already use upper letter identifiers.Attached patch is a quick fix and seems working for me. Please help to comment on:
1. Was there a specific reason not to support upper cases? (I know it's simple and if there's no xm, this design is the best.)
2. If we support upper case letters, will it affect other components?
2. Is this patch correct?
3. If we want this patch, someone (Ian J.?) also need to generate the in tree
libxlu_cfg_i.handlibxlu_cfg_l.c.Thanks,
Zhigang
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Ian Campbell
Quoted 5 lines · Zhigang Wang
Hi,
It seems we only support
[a-z][._0-9a-z]*as identifiers in vm.cfg for xl and upper case letter is not supported. This is different from xm.
Quoted 8 lines
Quoted 4 lines
An use case is: management tools may put arbitrary key/value pairs into vm.cfg. Current xl has limited support of this feature: xl will ignore unknown options.
I wonder whether we can make xl support uppercase letters?
I think maybe you mean "make the libxlu cfg file parser support uppercase letters", because you are reusing that library in your management tool perhaps?
Yes. That's what I want.
We are planning to use both xl command line and the libxl library.
Thanks,
Zhigang
Quoted 25 lines
Quoted 23 lines
Then management
tools don't need to change if they already use upper letter identifiers.Attached patch is a quick fix and seems working for me. Please help to comment on:
1. Was there a specific reason not to support upper cases? (I know it's simple and if there's no xm, this design is the best.)
2. If we support upper case letters, will it affect other components?
2. Is this patch correct?
3. If we want this patch, someone (Ian J.?) also need to generate the in tree
libxlu_cfg_i.handlibxlu_cfg_l.c.Thanks,
Zhigang
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 12 lines · Zhigang Wang
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Zhigang Wang
Hi,
It seems we only support
[a-z][._0-9a-z]*as identifiers in vm.cfg for xl and upper case letter is not supported. This is different from xm.An use case is: management tools may put arbitrary key/value pairs into vm.cfg. Current xl has limited support of this feature: xl will ignore unknown options.
I wonder whether we can make xl support uppercase letters?
Quoted 7 lines
Quoted 3 lines
I think maybe you mean "make the libxlu cfg file parser support uppercase letters", because you are reusing that library in your management tool perhaps?
Yes. That's what I want.
We are planning to use both xl command line and the libxl library.
OK. Just to be pedantic the xl cfg parser is part of the libxlu utility library, which is neither libxl nor xl. libxlu is essentially xl stuff which might be useful to other toolstack but which isn't formally part of libxl. (e.g. disk parsing is in there because we knew libvirt would also want to parse xm style disk configuration strings)
Ian.