Skip to content

Commit

Permalink
Alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
AshokDaparthi committed Oct 18, 2021
1 parent c132df1 commit 703f978
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/sonic-yang-mgmt/sonic_yang_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ def _xlateQosMapList(self, model, yang, config, table, exceptionList):
if inner_listKey != lkey:
inner_listVal = lkey

leafDict = self._createLeafDict(model, table)
# get keys from YANG model list itself
listKeys = model['key']['@value']
self.sysLog(msg="xlateList keyList:{}".format(listKeys))
Expand Down Expand Up @@ -795,7 +794,6 @@ def _revQosMapXlateList(self, model, yang, config, table):
# create a dict to map each key under primary key with a dict yang model.
# This is done to improve performance of mapping from values of TABLEs in
# config DB to leaf in YANG LIST.
leafDict = self._createLeafDict(model, table)

# Gather inner list key and value from model
inner_clist = model.get('list')
Expand Down
31 changes: 18 additions & 13 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,7 @@
"4": "4"
}
},

"DOT1P_TO_TC_MAP": {
"Dot1p_to_tc_map1": {
"1": "1",
Expand All @@ -1210,6 +1211,7 @@
"4": "4"
}
},

"TC_TO_PRIORITY_GROUP_MAP": {
"tc_to_pg_map1": {
"1": "1",
Expand All @@ -1220,6 +1222,7 @@
"4": "4"
}
},

"TC_TO_QUEUE_MAP": {
"tc_to_q_map1": {
"1": "1",
Expand All @@ -1230,45 +1233,47 @@
"4": "4"
}
},

"MAP_PFC_PRIORITY_TO_QUEUE": {
"pfc_prio_to_q_map1": {
"1": "1",
"2": "2"
},
},
"pfc_prio_to_q_map2": {
"3": "3",
"4": "4"
}
},

"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
"pfc_prio_to_pg_map1": {
"1": "1",
"2": "2"
},
"pfc_prio_to_pg_map2": {
"pfc_prio_to_pg_map2": {
"3": "3",
"4": "4"
}
},

"PORT_QOS_MAP": {
"PORT_QOS_MAP": {
"Ethernet0": {
"dot1p_to_tc_map" : "Dot1p_to_tc_map1",
"dscp_to_tc_map": "Dscp_to_tc_map1",
"tc_to_queue_map": "tc_to_q_map1",
"tc_to_pg_map": "tc_to_pg_map1",
"pfc_to_queue_map": "pfc_prio_to_q_map1",
"pfc_to_pg_map" : "pfc_prio_to_pg_map1",
"pfc_enable" : "3,4"
"tc_to_queue_map": "tc_to_q_map1",
"tc_to_pg_map": "tc_to_pg_map1",
"pfc_to_queue_map": "pfc_prio_to_q_map1",
"pfc_to_pg_map" : "pfc_prio_to_pg_map1",
"pfc_enable" : "3,4"
},
"Ethernet4": {
"dot1p_to_tc_map" : "Dot1p_to_tc_map2",
"dscp_to_tc_map": "Dscp_to_tc_map2",
"tc_to_queue_map": "tc_to_q_map2",
"tc_to_pg_map": "tc_to_pg_map2",
"pfc_to_queue_map": "pfc_prio_to_q_map2",
"pfc_to_pg_map" : "pfc_prio_to_pg_map2",
"pfc_enable" : "3,4"
"tc_to_queue_map": "tc_to_q_map2",
"tc_to_pg_map": "tc_to_pg_map2",
"pfc_to_queue_map": "pfc_prio_to_q_map2",
"pfc_to_pg_map" : "pfc_prio_to_pg_map2",
"pfc_enable" : "3,4"
}
}
},
Expand Down

0 comments on commit 703f978

Please sign in to comment.