Skip to content

Commit

Permalink
[sonic-yang-mgmt/sonic_yang.py]: fix add_data_node in sonic_yang.
Browse files Browse the repository at this point in the history
Changes:
-- fix add_data_node in sonic-yang.
-- Fixing tests of sonic-yang.

Signed-off-by: Praveen Chaudhary [email protected]
  • Loading branch information
Praveen Chaudhary committed Jun 30, 2020
1 parent 501e103 commit de9f907
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sonic-yang-mgmt/sonic_yang.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def find_data_node_schema_xpath(self, data_xpath):
return path

"""
add_node(): add a node to Yang schema or data tree
add_data_node(): add a node to Yang schema or data tree
input: xpath and value of the node to be added
returns: Exception if failed
"""
Expand All @@ -380,7 +380,7 @@ def add_data_node(self, data_xpath, value):
#check if the node added to the data tree
self.find_data_node(data_xpath)
except Exception as e:
print("add_node(): Failed to add data node for xpath: " + str(data_xpath))
print("add_data_node(): Failed to add data node for xpath: " + str(data_xpath))
self.fail(e)

"""
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-yang-mgmt/sonic_yang_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def cropConfigDB(self, croppedFile=None):

if len(self.tablesWithOutYang):
print("Note: Below table(s) have no YANG models:")
self.sysLog("Extra Tables in Config {}".format(self.tablesWithOutYang.keys))
self.sysLog(msg="Extra Tables in Config {}".format(self.tablesWithOutYang.keys))
for table in self.tablesWithOutYang.keys():
print(unicode(table), end=", ")
print()
Expand Down

0 comments on commit de9f907

Please sign in to comment.