From 703f9784e46488ac9f25b788946271eed53c5d4b Mon Sep 17 00:00:00 2001 From: AshokDaparthi Date: Mon, 18 Oct 2021 11:01:02 -0700 Subject: [PATCH] Alignment --- src/sonic-yang-mgmt/sonic_yang_ext.py | 2 -- .../tests/files/sample_config_db.json | 31 +++++++++++-------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/sonic-yang-mgmt/sonic_yang_ext.py b/src/sonic-yang-mgmt/sonic_yang_ext.py index 02ebe5710b0d..845588d70dbd 100644 --- a/src/sonic-yang-mgmt/sonic_yang_ext.py +++ b/src/sonic-yang-mgmt/sonic_yang_ext.py @@ -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)) @@ -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') diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index d91f2709e9e8..35cb22074106 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -1200,6 +1200,7 @@ "4": "4" } }, + "DOT1P_TO_TC_MAP": { "Dot1p_to_tc_map1": { "1": "1", @@ -1210,6 +1211,7 @@ "4": "4" } }, + "TC_TO_PRIORITY_GROUP_MAP": { "tc_to_pg_map1": { "1": "1", @@ -1220,6 +1222,7 @@ "4": "4" } }, + "TC_TO_QUEUE_MAP": { "tc_to_q_map1": { "1": "1", @@ -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" } } },