Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-12 Thread Damjan Marion via lists.fd.io
— Damjan > On 12.05.2022., at 15:12, Andrew 👽 Yourtchenko wrote: > > Inline > >> On 12 May 2022, at 14:21, Damjan Marion wrote: >> >> Inline.. >> >> — >> Damjan >> >> >> >>> On 12.05.2022., at 09:06, Andrew 👽 Yourtchenko wrote: >>> Damjan, >>> it is true we do not “guarantee” the

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-12 Thread Andrew Yourtchenko
Inline > On 12 May 2022, at 14:21, Damjan Marion wrote: > > Inline.. > > — > Damjan > > > >> On 12.05.2022., at 09:06, Andrew 👽 Yourtchenko wrote: >> Damjan, >> it is true we do not “guarantee” the behavior of the CLIs, but it is also >> true that a lot of people use them, that is why t

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-12 Thread Damjan Marion via lists.fd.io
Inline.. — Damjan > On 12.05.2022., at 09:06, Andrew 👽 Yourtchenko wrote: > > Damjan, > > it is true we do not “guarantee” the behavior of the CLIs, but it is also > true that a lot of people use them, that is why this warrants a bit more > discussion and heads up. Lot of people use cli,

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-12 Thread Dave Barach
how "unix exec" executes cli scripts Hi Damjan, Currently command: define also has some problem. In cli file have the following content: cat /tmp/a.cli: ``` define IP1 192.168.200.11 show macro ping $IP1 ``` in vpp cli will fail with the output: ``` IP1 192.168.200.11 ping: expecti

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-12 Thread Andrew Yourtchenko
Damjan, it is true we do not “guarantee” the behavior of the CLIs, but it is also true that a lot of people use them, that is why this warrants a bit more discussion and heads up. This issue was there since day 1. What is driving the urgency of it ? --a > On 11 May 2022, at 14:29, Damjan Mari

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-11 Thread jiangxiaoming
[Edited Message Follows] Hi Damjan, Currently command: define also has some problem. In cli file have the following content: cat /tmp/a.cli: define IP1 192.168.200.11 show macro ping $IP1 in vpp cli will fail with the output: IP1 192.168.200.11 ping: expecting IP4/IP6 address `$IP1'. Usage:

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-11 Thread jiangxiaoming
Hi Damjan, Currently command: define also has some problem. In cli file have the following content: cat /tmp/a.cli: ``` define IP1 192.168.200.11 show macro ping $IP1 ``` in vpp cli will fail with the output: ``` IP1 192.168.200.11 ping: expecting IP4/IP6 address `$IP1'. Usage: ping { | ipv4

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-11 Thread Damjan Marion via lists.fd.io
I didn’t hear back from anybody, so let me elaborate this change a bit. It is clear that current behaviour is broken, as some CLI handlers which work well in interactive mode simply eat rest of the content of exec file. As result of that I can see people submitting patches to fix CLI handlers th

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-09 Thread Damjan Marion via lists.fd.io
Hmm, not sure I understand concern about blast radius. I also replied to your comment in gerrit. — Damjan > On 09.05.2022., at 07:31, Andrew 👽 Yourtchenko wrote: > > Damjan, > > I have left the comment on the change itself - in short, given its blast > radius, it needs to wait at least u

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-09 Thread Damjan Marion via lists.fd.io
Why do you think so? — Damjan > On 09.05.2022., at 03:43, jiangxiaom...@outlook.com wrote: > > Hi Damjan, > With your patch, most of current clis have to be modified, it may be a large > work. I think the suitable way is changing the meaning of VLIB_CLI_COMMAND > function's second params f

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-08 Thread Andrew Yourtchenko
Damjan, I have left the comment on the change itself - in short, given its blast radius, it needs to wait at least until 22.06 RC1 is done. --a > On 8 May 2022, at 19:39, Damjan Marion via lists.fd.io > wrote: > > Guys, > > I just submitted following patch which fixes long standing issue i

Re: [vpp-dev] Change how "unix exec" executes cli scripts

2022-05-08 Thread jiangxiaoming
Hi Damjan, With your patch, most of current clis have to be modified, it may be a large work. I think the suitable way is changing the meaning of VLIB_CLI_COMMAND function's second params from input to args. That's: /* CLI command callback function. */ typedef clib_error_t *( vlib_cli_command_fun

[vpp-dev] Change how "unix exec" executes cli scripts

2022-05-08 Thread Damjan Marion via lists.fd.io
Guys, I just submitted following patch which fixes long standing issue in how cli scripts are executed. https://gerrit.fd.io/r/c/vpp/+/36101 Problem was that there was no way to execute CLIs which have optional arguments. I.e. “show version” and “show version verbose”. CLI parser was passing w