Commit 3a43ded0 authored by Jakub Kicinski's avatar Jakub Kicinski

tools: ynl: store ops in ordered dict to avoid random ordering

When rendering code we should walk the ops in the order in which
they are declared in the spec. This is both more intuitive and
prevents code from jumping around when hashing in the dict changes.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b49c34e2
#!/usr/bin/env python
import argparse
import collections
import jsonschema
import os
import yaml
......@@ -793,7 +794,7 @@ class Family:
# list of all operations
self.msg_list = []
# dict of operations which have their own message type (have attributes)
self.ops = dict()
self.ops = collections.OrderedDict()
self.attr_sets = dict()
self.attr_sets_list = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment