Skip to content

Commit f3f3f21

Browse files
committed
debug
1 parent dbb3fd5 commit f3f3f21

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/sonic-yang-mgmt/sonic_yang.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import libyang as ly
22
import syslog
33

4-
from json import dump
4+
from json import dump, dumps
55
from glob import glob
66
from sonic_yang_ext import SonicYangExtMixin, SonicYangException
77

@@ -483,6 +483,8 @@ def _cache_schema_dependencies(self):
483483
self.backlinkMap[target] = list()
484484
self.backlinkMap[target].append(path)
485485

486+
print("**backlinkMap: {}",dumps(self.backlinkMap, indent=4))
487+
486488
"""
487489
find_schema_dependencies(): find the schema dependencies from schema xpath
488490
input: match_path target node path to use as a filter
@@ -504,9 +506,11 @@ def _find_schema_dependencies(self, match_path, match_ancestors: bool=False):
504506
for target, leafrefs in my_dict.items():
505507
if match_path is None or target == match_path or target.startswith(match_path + "/"):
506508
ret.extend(leafrefs)
509+
print("_find_schema_dependencies({},{})={}".format(match_path, match_ancestors, dumps(ret)))
507510
return ret
508511

509512
# Common case
513+
print("_find_schema_dependencies({},{})={}".format(match_path, match_ancestors, dumps(self.backlinkMap.get(match_path))))
510514
return self.backlinkMap.get(match_path)
511515

512516
"""

0 commit comments

Comments
 (0)