diff --git a/generic_config_updater/patch_sorter.py b/generic_config_updater/patch_sorter.py index 2943c5fea7f8..e89c542e73b1 100644 --- a/generic_config_updater/patch_sorter.py +++ b/generic_config_updater/patch_sorter.py @@ -589,6 +589,7 @@ def __init__(self, path_addressing): ["BGP_MONITORS", "*", "local_addr"], ["BGP_MONITORS", "*", "nhopself"], ["BGP_MONITORS", "*", "rrclient"], + ["MIRROR_SESSION", "*", "*"], ], path_addressing) diff --git a/tests/generic_config_updater/patch_sorter_test.py b/tests/generic_config_updater/patch_sorter_test.py index 406d07cbe8d5..12d76c528399 100644 --- a/tests/generic_config_updater/patch_sorter_test.py +++ b/tests/generic_config_updater/patch_sorter_test.py @@ -1033,6 +1033,15 @@ def test_hard_coded_create_only_paths(self): "nhopself": "0", "rrclient": "0" } + }, + "MIRROR_SESSION": { + "mirror_session_dscp": { + "dscp": "5", + "dst_ip": "2.2.2.2", + "src_ip": "1.1.1.1", + "ttl": "32", + "type": "ERSPAN" + } } } expected = [ @@ -1058,6 +1067,11 @@ def test_hard_coded_create_only_paths(self): "/BGP_MONITORS/5.6.7.8/name", "/BGP_MONITORS/5.6.7.8/nhopself", "/BGP_MONITORS/5.6.7.8/rrclient", + "/MIRROR_SESSION/mirror_session_dscp/dscp", + "/MIRROR_SESSION/mirror_session_dscp/dst_ip", + "/MIRROR_SESSION/mirror_session_dscp/src_ip", + "/MIRROR_SESSION/mirror_session_dscp/ttl", + "/MIRROR_SESSION/mirror_session_dscp/type", ] actual = self.validator._get_create_only_paths(config)