diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-06-08 14:11:57 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-09 14:40:31 -0700 |
commit | ced1568862bdb985eb4e5ca854cc7734a4ad3543 (patch) | |
tree | a66eb3a447b1db6c6c60f3b72b7e52fc949525d6 /tools/net/ynl/lib/nlspec.py | |
parent | d0915d64c3a636f73065dbb7e5aab78eb7e75f0d (diff) |
tools: ynl-gen: sanitize notification tracking
Don't modify the raw dicts (as loaded from YAML) to pretend
that the notify attributes also exist on the ops. This makes
the code easier to follow.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/lib/nlspec.py')
-rw-r--r-- | tools/net/ynl/lib/nlspec.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/net/ynl/lib/nlspec.py b/tools/net/ynl/lib/nlspec.py index 9f7ad87d69af..623c5702bd10 100644 --- a/tools/net/ynl/lib/nlspec.py +++ b/tools/net/ynl/lib/nlspec.py @@ -329,8 +329,8 @@ class SpecFamily(SpecElement): attr_sets dict of attribute sets msgs dict of all messages (index by name) - msgs_by_value dict of all messages (indexed by name) ops dict of all valid requests / responses + ntfs dict of all async events consts dict of all constants/enums fixed_header string, optional name of family default fixed header struct """ @@ -370,6 +370,7 @@ class SpecFamily(SpecElement): self.req_by_value = collections.OrderedDict() self.rsp_by_value = collections.OrderedDict() self.ops = collections.OrderedDict() + self.ntfs = collections.OrderedDict() self.consts = collections.OrderedDict() last_exception = None @@ -491,3 +492,5 @@ class SpecFamily(SpecElement): self.rsp_by_value[op.rsp_value] = op if not op.is_async and 'attribute-set' in op: self.ops[op.name] = op + elif op.is_async: + self.ntfs[op.name] = op |