Dave,

> Before we deprecate vat - and the vat plugins - it would be nice to solve
> the CLI problem. In particular, to make the "binary-api" debug CLI work in
> some reasonable way with vat2. 

Agree, I think a proper answer to that question is required gating for vat2 
ever becoming a replacement.
(apologies if that wasn't clear from the message, I had no intention of 
pressing that button any time soon. ;-))

> I have operational configuration files of considerable length full of stuff
> like this:
> 
> binary-api mactime_add_del_range name lg-tv mac xxx  allow-static
> binary-api mactime_add_del_range name old-mac mac xxy allow-static
> binary-api mactime_add_del_range name joe-iphone mac xxz allow-static
> 
> I can deal with the problem by converting xxx_test.c code into debug CLI
> commands in the affected data-plane plugin(s). Perhaps that's the answer. 
> 
> Thoughts?

If we were to explore the future solution space...
Looking purely at API trace/API inject and VAT2 tool.
You could convert those messages to JSON {"name": "lg-tv", "mac": 
"0xaabbccddeeff"} ...
and we could do one of:

1) Inside of VPP: vpp# trace api replay json <json-api-file>
2) Outside of VPP: vat2 <json-api-file>
3) Link VAT2 inside of VPP: binary-api2 mactime_add_del_range {"name": "lg-tv", 
"mac": "0xaabbccddeeff"}

Taking a step back, if we are talking about configuration files. I would love 
to make a ordering independent fully supported configuration file for VPP 
though.
So you'd instead have:

vpp.cfg:

{
  "mactime": [{"name": "lg-tv",
               "mac": "xx"},
              {"name": "old-mac",
               "mac": "xx"}]
}
      
You are going to hate randomized MACs though. Don't upgrade your iphone. ;-)

Best regards,
Ole
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18095): https://lists.fd.io/g/vpp-dev/message/18095
Mute This Topic: https://lists.fd.io/mt/78362835/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to