diff --git a/cfgmgr/buffermgr.cpp b/cfgmgr/buffermgr.cpp index c466fc64c11..9e2c1ec8781 100644 --- a/cfgmgr/buffermgr.cpp +++ b/cfgmgr/buffermgr.cpp @@ -106,7 +106,7 @@ Create/update two tables: profile (in m_cfgBufferProfileTable) and port buffer ( "BUFFER_PROFILE": { "pg_lossless_100G_300m_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", + "pool":"ingress_lossless_pool", "xon":"18432", "xon_offset":"2496", "xoff":"165888", @@ -116,7 +116,7 @@ Create/update two tables: profile (in m_cfgBufferProfileTable) and port buffer ( } "BUFFER_PG" :{ Ethernet44|3-4": { - "profile" : "[BUFFER_PROFILE:pg_lossless_100000_300m_profile]" + "profile" : "pg_lossless_100000_300m_profile" } } */ diff --git a/doc/Configuration.md b/doc/Configuration.md index fcec60be43a..a619531f70f 100644 --- a/doc/Configuration.md +++ b/doc/Configuration.md @@ -343,13 +343,13 @@ When the system is running in traditional buffer model, profiles needs to explic { "BUFFER_PG": { "Ethernet0|3-4": { - "profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]" + "profile": "pg_lossless_40000_5m_profile" }, "Ethernet1|3-4": { - "profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]" + "profile": "pg_lossless_40000_5m_profile" }, "Ethernet2|3-4": { - "profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]" + "profile": "pg_lossless_40000_5m_profile" } } } @@ -371,7 +371,7 @@ When the system is running in dynamic buffer model, profiles can be: "profile": "NULL" }, "Ethernet2|3-4": { - "profile": "[BUFFER_PROFILE|static_profile]" + "profile": "static_profile" } } } @@ -437,17 +437,17 @@ When the system is running in dynamic buffer model, the size of some of the buff "BUFFER_PROFILE": { "egress_lossless_profile": { "static_th": "3995680", - "pool": "[BUFFER_POOL|egress_lossless_pool]", + "pool": "egress_lossless_pool", "size": "1518" }, "egress_lossy_profile": { "dynamic_th": "3", - "pool": "[BUFFER_POOL|egress_lossy_pool]", + "pool": "egress_lossy_pool", "size": "1518" }, "ingress_lossy_profile": { "dynamic_th": "3", - "pool": "[BUFFER_POOL|ingress_lossless_pool]", + "pool": "ingress_lossless_pool", "size": "0" }, "pg_lossless_40000_5m_profile": { @@ -455,7 +455,7 @@ When the system is running in dynamic buffer model, the size of some of the buff "dynamic_th": "-3", "xon": "2288", "xoff": "66560", - "pool": "[BUFFER_POOL|ingress_lossless_pool]", + "pool": "ingress_lossless_pool", "size": "1248" }, "pg_lossless_40000_40m_profile": { @@ -463,7 +463,7 @@ When the system is running in dynamic buffer model, the size of some of the buff "dynamic_th": "-3", "xon": "2288", "xoff": "71552", - "pool": "[BUFFER_POOL|ingress_lossless_pool]", + "pool": "ingress_lossless_pool", "size": "1248" } } @@ -491,13 +491,13 @@ This kind of profiles will be handled by buffer manager and won't be applied to { "BUFFER_QUEUE": { "Ethernet50,Ethernet52,Ethernet54,Ethernet56|0-2": { - "profile": "[BUFFER_PROFILE|egress_lossy_profile]" + "profile": "egress_lossy_profile" }, "Ethernet50,Ethernet52,Ethernet54,Ethernet56|3-4": { - "profile": "[BUFFER_PROFILE|egress_lossless_profile]" + "profile": "egress_lossless_profile" }, "Ethernet50,Ethernet52,Ethernet54,Ethernet56|5-6": { - "profile": "[BUFFER_PROFILE|egress_lossy_profile]" + "profile": "egress_lossy_profile" } } } @@ -1104,12 +1104,12 @@ name as object key and member list as attribute. { "PORT_QOS_MAP": { "Ethernet50,Ethernet52,Ethernet54,Ethernet56": { - "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", - "tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map": "AZURE", + "tc_to_queue_map": "AZURE", "pfc_enable": "3,4", - "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", - "dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", - "scheduler": "[SCHEDULER|scheduler.port]" + "pfc_to_queue_map": "AZURE", + "dscp_to_tc_map": "AZURE", + "scheduler": "scheduler.port" } } } @@ -1120,14 +1120,14 @@ name as object key and member list as attribute. { "QUEUE": { "Ethernet56|4": { - "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]", - "scheduler": "[SCHEDULER|scheduler.1]" + "wred_profile": "AZURE_LOSSLESS", + "scheduler": "scheduler.1" }, "Ethernet56|5": { - "scheduler": "[SCHEDULER|scheduler.0]" + "scheduler": "scheduler.0" }, "Ethernet56|6": { - "scheduler": "[SCHEDULER|scheduler.0]" + "scheduler": "scheduler.0" } } } diff --git a/doc/swss-schema.md b/doc/swss-schema.md index 7f25803a287..3ccc7b74afe 100644 --- a/doc/swss-schema.md +++ b/doc/swss-schema.md @@ -35,9 +35,9 @@ Stores information for physical switch ports managed by the switch chip. Ports t Example: 127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4 1) "dscp_to_tc_map" - 2) "[DSCP_TO_TC_MAP_TABLE:AZURE]" + 2) "AZURE" 3) "tc_to_queue_map" - 4) "[TC_TO_QUEUE_MAP_TABLE:AZURE]" + 4) "AZURE" --------------------------------------------- ### INTF_TABLE @@ -209,9 +209,9 @@ and reflects the LAG ports into the redis under: `LAG_TABLE::port` Example: 127.0.0.1:6379> hgetall QUEUE_TABLE:ETHERNET4:1 1) "scheduler" - 2) "[SCHEDULER_TABLE:BEST_EFFORT]" + 2) "BEST_EFFORT" 3) "wred_profile" - 4) "[WRED_PROFILE_TABLE:AZURE]" + 4) "AZURE" --------------------------------------------- ### TC\_TO\_QUEUE\_MAP\_TABLE diff --git a/orchagent/bufferorch.cpp b/orchagent/bufferorch.cpp index 88fd9846aad..d5a97c856f2 100644 --- a/orchagent/bufferorch.cpp +++ b/orchagent/bufferorch.cpp @@ -904,7 +904,7 @@ task_process_status BufferOrch::processPriorityGroup(KeyOpFieldsValuesTuple &tup } /* -Input sample:"[BUFFER_PROFILE_TABLE:i_port.profile0],[BUFFER_PROFILE_TABLE:i_port.profile1]" +Input sample:"i_port.profile0,i_port.profile1" */ task_process_status BufferOrch::processIngressBufferProfileList(KeyOpFieldsValuesTuple &tuple) { @@ -962,7 +962,7 @@ task_process_status BufferOrch::processIngressBufferProfileList(KeyOpFieldsValue } /* -Input sample:"[BUFFER_PROFILE_TABLE:e_port.profile0],[BUFFER_PROFILE_TABLE:e_port.profile1]" +Input sample:"e_port.profile0,e_port.profile1" */ task_process_status BufferOrch::processEgressBufferProfileList(KeyOpFieldsValuesTuple &tuple) { diff --git a/orchagent/orch.cpp b/orchagent/orch.cpp index 7375c96d966..622c0724419 100644 --- a/orchagent/orch.cpp +++ b/orchagent/orch.cpp @@ -301,7 +301,7 @@ bool Orch::bake() } /* -- Validates reference has proper format which is [table_name:object_name] +- Validates reference has proper format which is not ABNF [table_name:object_name] - validates table_name exists - validates object with object_name exists @@ -557,7 +557,7 @@ ref_resolve_status Orch::resolveFieldRefArray( vector &sai_object_arr, string &object_name_list) { - // example: [BUFFER_PROFILE_TABLE:e_port.profile0],[BUFFER_PROFILE_TABLE:e_port.profile1] + // example: e_port.profile0,e_port.profile1 SWSS_LOG_ENTER(); size_t count = 0; sai_object_arr.clear(); diff --git a/swssconfig/sample/sample.json b/swssconfig/sample/sample.json index 7fb0ff0ac2b..c00cdb0b9f0 100644 --- a/swssconfig/sample/sample.json +++ b/swssconfig/sample/sample.json @@ -18,8 +18,8 @@ }, { "QOS_TABLE:PORT_TABLE:ETHERNET4": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP_TABLE:AZURE]", - "tc_to_queue_map": "[TC_TO_QUEUE_MAP_TABLE:AZURE]" + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map": "AZURE" }, "OP": "SET" }, @@ -46,9 +46,9 @@ }, { "QUEUE_TABLE:ETHERNET4:1" : { - "scheduler" : "[SCHEDULER_TABLE:BEST_EFFORT]", - "wred_profile" : "[WRED_PROFILE_TABLE:AZURE]" + "scheduler" : "BEST_EFFORT", + "wred_profile" : "AZURE" }, "OP": "SET" } - ] \ No newline at end of file + ] diff --git a/swssconfig/sample/sample.json.output.txt b/swssconfig/sample/sample.json.output.txt index 8508de60c6f..11f4203771c 100644 --- a/swssconfig/sample/sample.json.output.txt +++ b/swssconfig/sample/sample.json.output.txt @@ -67,14 +67,14 @@ hgetall WRED_PROFILE_TABLE:AZURE 10) "8" 127.0.0.1:6379> hgetall QUEUE_TABLE:ETHERNET4:1 1) "scheduler" -2) "[SCHEDULER_TABLE:BEST_EFFORT]" +2) "BEST_EFFORT" 3) "wred_profile" -4) "[WRED_PROFILE_TABLE:AZURE]" +4) "AZURE" 127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4 1) "dscp_to_tc_map" -2) "[DSCP_TO_TC_MAP_TABLE:AZURE]" +2) "AZURE" 3) "tc_to_queue_map" -4) "[TC_TO_QUEUE_MAP_TABLE:AZURE]" +4) "AZURE" 127.0.0.1:6379> hgetall TC_TO_QUEUE_MAP_TABLE:AZURE diff --git a/tests/buffer_model.py b/tests/buffer_model.py index 51f6305c33d..ae2d1ecb796 100644 --- a/tests/buffer_model.py +++ b/tests/buffer_model.py @@ -69,7 +69,7 @@ def disable_dynamic_buffer(config_db, cmd_runner): pgs = config_db.get_keys('BUFFER_PG') for key in pgs: pg = config_db.get_entry('BUFFER_PG', key) - if pg['profile'] != '[BUFFER_PROFILE|ingress_lossy_profile]': + if pg['profile'] != 'ingress_lossy_profile': config_db.delete_entry('BUFFER_PG', key) # Remove all the non-default profiles diff --git a/tests/test_buffer_dynamic.py b/tests/test_buffer_dynamic.py index 0d831f70354..b707953c460 100644 --- a/tests/test_buffer_dynamic.py +++ b/tests/test_buffer_dynamic.py @@ -158,7 +158,7 @@ def test_changeSpeed(self, dvs, testlog): self.check_new_profile_in_asic_db(dvs, expectedProfile) # Check whether buffer pg align - bufferPg = self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + bufferPg = self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # Remove lossless PG self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') @@ -170,7 +170,7 @@ def test_changeSpeed(self, dvs, testlog): # Re-add another lossless PG self.config_db.update_entry('BUFFER_PG', 'Ethernet0|6', {'profile': 'NULL'}) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": expectedProfile}) # Remove the lossless PG 6 self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|6') @@ -183,7 +183,7 @@ def test_changeSpeed(self, dvs, testlog): expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.originalCableLen) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) self.check_new_profile_in_asic_db(dvs, expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # Remove lossless PG 3-4 on interface self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') @@ -206,7 +206,7 @@ def test_changeCableLen(self, dvs, testlog): expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.cableLenTest1) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) self.check_new_profile_in_asic_db(dvs, expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # Remove the lossless PGs self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') @@ -223,7 +223,7 @@ def test_changeCableLen(self, dvs, testlog): # Check the BUFFER_PROFILE_TABLE and BUFFER_PG_TABLE self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) self.check_new_profile_in_asic_db(dvs, expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # Revert the cable length self.change_cable_length(self.originalCableLen) @@ -234,7 +234,7 @@ def test_changeCableLen(self, dvs, testlog): expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.originalCableLen) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # Remove lossless PG 3-4 on interface self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') @@ -254,14 +254,14 @@ def test_MultipleLosslessPg(self, dvs, testlog): # Add another lossless PG self.config_db.update_entry('BUFFER_PG', 'Ethernet0|6', {'profile': 'NULL'}) expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.originalCableLen) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": expectedProfile}) # Change speed and check dvs.runcmd("config interface speed Ethernet0 " + self.speedToTest1) expectedProfile = self.make_lossless_profile_name(self.speedToTest1, self.originalCableLen) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": expectedProfile}) # Change cable length and check self.change_cable_length(self.cableLenTest1) @@ -269,8 +269,8 @@ def test_MultipleLosslessPg(self, dvs, testlog): expectedProfile = self.make_lossless_profile_name(self.speedToTest1, self.cableLenTest1) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) self.check_new_profile_in_asic_db(dvs, expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": expectedProfile}) # Revert the speed and cable length and check self.change_cable_length(self.originalCableLen) @@ -279,8 +279,8 @@ def test_MultipleLosslessPg(self, dvs, testlog): self.asic_db.wait_for_deleted_entry("ASIC_STATE:SAI_OBJECT_TYPE_BUFFER_PROFILE", self.newProfileInAsicDb) expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.originalCableLen) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": expectedProfile}) # Remove lossless PG 3-4 and 6 on interface self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') @@ -301,11 +301,11 @@ def test_headroomOverride(self, dvs, testlog): 'xoff': '16384', 'size': '34816', 'dynamic_th': '0', - 'pool': '[BUFFER_POOL|ingress_lossless_pool]'}) + 'pool': 'ingress_lossless_pool'}) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", "test") self.app_db.wait_for_exact_match("BUFFER_PROFILE_TABLE", "test", - { "pool" : "[BUFFER_POOL_TABLE:ingress_lossless_pool]", + { "pool" : "ingress_lossless_pool", "xon" : "18432", "xoff" : "16384", "size" : "34816", @@ -319,14 +319,14 @@ def test_headroomOverride(self, dvs, testlog): self.change_cable_length(self.cableLenTest1) expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.cableLenTest1) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # configure lossless PG 3-4 with headroom override - self.config_db.update_entry('BUFFER_PG', 'Ethernet0|3-4', {'profile': '[BUFFER_PROFILE|test]'}) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:test]"}) + self.config_db.update_entry('BUFFER_PG', 'Ethernet0|3-4', {'profile': 'test'}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "test"}) # configure lossless PG 6 with headroom override - self.config_db.update_entry('BUFFER_PG', 'Ethernet0|6', {'profile': '[BUFFER_PROFILE|test]'}) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:test]"}) + self.config_db.update_entry('BUFFER_PG', 'Ethernet0|6', {'profile': 'test'}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "test"}) # update the profile self.config_db.update_entry('BUFFER_PROFILE', 'test', @@ -334,9 +334,9 @@ def test_headroomOverride(self, dvs, testlog): 'xoff': '18432', 'size': '36864', 'dynamic_th': '0', - 'pool': '[BUFFER_POOL|ingress_lossless_pool]'}) + 'pool': 'ingress_lossless_pool'}) self.app_db.wait_for_exact_match("BUFFER_PROFILE_TABLE", "test", - { "pool" : "[BUFFER_POOL_TABLE:ingress_lossless_pool]", + { "pool" : "ingress_lossless_pool", "xon" : "18432", "xoff" : "18432", "size" : "36864", @@ -353,7 +353,7 @@ def test_headroomOverride(self, dvs, testlog): # readd lossless PG with dynamic profile self.config_db.update_entry('BUFFER_PG', 'Ethernet0|3-4', {'profile': 'NULL'}) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # remove the headroom override profile self.config_db.delete_entry('BUFFER_PROFILE', 'test') @@ -364,7 +364,7 @@ def test_headroomOverride(self, dvs, testlog): self.app_db.wait_for_deleted_entry("BUFFER_PROFILE_TABLE", expectedProfile) expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.originalCableLen) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # remove lossless PG 3-4 on interface self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') @@ -392,13 +392,13 @@ def test_mtuUpdate(self, dvs, testlog): self.app_db.wait_for_entry("BUFFER_PG_TABLE", "Ethernet0:3-4") self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfileMtu) self.check_new_profile_in_asic_db(dvs, expectedProfileMtu) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:{}]".format(expectedProfileMtu)}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "{}".format(expectedProfileMtu)}) dvs.runcmd("config interface mtu Ethernet0 {}".format(default_mtu)) self.app_db.wait_for_deleted_entry("BUFFER_PROFILE_TABLE", expectedProfileMtu) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfileNormal) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:{}]".format(expectedProfileNormal)}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "{}".format(expectedProfileNormal)}) # clear configuration self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') @@ -421,25 +421,25 @@ def test_nonDefaultAlpha(self, dvs, testlog): self.config_db.update_entry('BUFFER_PROFILE', 'non-default-dynamic', {'dynamic_th': test_dynamic_th_1, 'headroom_type': 'dynamic', - 'pool': '[BUFFER_POOL|ingress_lossless_pool]'}) + 'pool': 'ingress_lossless_pool'}) # configure lossless PG 3-4 on interface - self.config_db.update_entry('BUFFER_PG', 'Ethernet0|3-4', {'profile': '[BUFFER_PROFILE|non-default-dynamic]'}) + self.config_db.update_entry('BUFFER_PG', 'Ethernet0|3-4', {'profile': 'non-default-dynamic'}) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile_th1) self.check_new_profile_in_asic_db(dvs, expectedProfile_th1) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile_th1 + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile_th1}) # modify the profile to another dynamic_th self.config_db.update_entry('BUFFER_PROFILE', 'non-default-dynamic', {'dynamic_th': test_dynamic_th_2, 'headroom_type': 'dynamic', - 'pool': '[BUFFER_POOL|ingress_lossless_pool]'}) + 'pool': 'ingress_lossless_pool'}) self.app_db.wait_for_deleted_entry("BUFFER_PROFILE_TABLE", expectedProfile_th1) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile_th2) self.check_new_profile_in_asic_db(dvs, expectedProfile_th2) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile_th2 + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile_th2}) # clear configuration self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') @@ -459,7 +459,7 @@ def test_sharedHeadroomPool(self, dvs, testlog): expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.originalCableLen) self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) self.check_new_profile_in_asic_db(dvs, expectedProfile) profileInApplDb = self.app_db.get_entry('BUFFER_PROFILE_TABLE', expectedProfile) @@ -554,7 +554,7 @@ def test_shutdownPort(self, dvs, testlog): # Configure lossless PG 3-4 on interface self.config_db.update_entry('BUFFER_PG', 'Ethernet0|3-4', {'profile': 'NULL'}) expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.originalCableLen) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) # Shutdown port and check whether all the PGs have been removed dvs.runcmd("config interface shutdown Ethernet0") @@ -566,8 +566,8 @@ def test_shutdownPort(self, dvs, testlog): # Startup port and check whether all the PGs haved been added dvs.runcmd("config interface startup Ethernet0") - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) - self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:" + expectedProfile + "]"}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile}) + self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": expectedProfile}) # Remove lossless PG 3-4 on interface self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4') diff --git a/tests/test_qos_map.py b/tests/test_qos_map.py index 32a8b396aa4..1970d5f60b7 100644 --- a/tests/test_qos_map.py +++ b/tests/test_qos_map.py @@ -63,7 +63,7 @@ def find_dot1p_profile(self): def apply_dot1p_profile_on_all_ports(self): tbl = swsscommon.Table(self.config_db, CFG_PORT_QOS_MAP_TABLE_NAME) - fvs = swsscommon.FieldValuePairs([(CFG_PORT_QOS_MAP_FIELD, "[" + CFG_DOT1P_TO_TC_MAP_TABLE_NAME + "|" + CFG_DOT1P_TO_TC_MAP_KEY + "]")]) + fvs = swsscommon.FieldValuePairs([(CFG_PORT_QOS_MAP_FIELD, CFG_DOT1P_TO_TC_MAP_KEY)]) ports = swsscommon.Table(self.config_db, CFG_PORT_TABLE_NAME).getKeys() for port in ports: tbl.set(port, fvs) diff --git a/tests/test_speed.py b/tests/test_speed.py index 0f3e51c5d88..7f7b8e7083b 100644 --- a/tests/test_speed.py +++ b/tests/test_speed.py @@ -70,7 +70,7 @@ def test_SpeedAndBufferSet(self, dvs, testlog): expected_pg_table = "Ethernet{}|3-4".format(i * 4) assert expected_pg_table in pg_tables - expected_fields = {"profile": "[BUFFER_PROFILE|{}]".format(expected_new_profile_name)} + expected_fields = {"profile": "{}".format(expected_new_profile_name)} cdb.wait_for_field_match("BUFFER_PG", expected_pg_table, expected_fields)