Subject: Re: [patch net-next v2 3/3] tools: ynl-gen: raise exception when subset attribute contains more than "name" key

From: Jiri Pirko <[email-masked]>
Date: Thu, 5 Oct 2023 16:50:14 +0200

Thu, Oct 05, 2023 at 04:21:51PM CEST, [email-masked] wrote:
>On Thu, 5 Oct 2023 09:25:55 +0200 Jiri Pirko wrote:
>> >> The only key used in the elem dictionary is "name" to lookup the real
>> >> attribute of a set. Raise exception in case there are other keys
>> >> present.  
>> >
>> >Mm, there are definitely other things that can be set. I'm not fully  
>> 
>> Which ones? The name is used, the rest is ignored in the existing code.
>> I just make this obvious to the user. If future show other keys are
>> needed here, the patch adding that would just adjust the exception
>> condition. Do you see any problem in that?
>
>Just don't want to give people the impression that this is what's
>intended, rather than it was simply not implemented yet.
>If you want to keep the exception please update the message
>(and the if, no outer brackets necessary in Python ;)).

I don't mind dropping the patch entirely. I just thought it would be
nice to do some sanitization so the user is not surprised that other
possible keys are ignored. I tried and I was :)