diff --git a/meta/saiserialize.cpp b/meta/saiserialize.cpp index d05a655999e9..6f67a92bc16b 100644 --- a/meta/saiserialize.cpp +++ b/meta/saiserialize.cpp @@ -3305,6 +3305,12 @@ void sai_deserialize_attr_id( auto m = sai_metadata_get_attr_metadata_by_attr_id_name(s.c_str()); + if (m == NULL) + { + // check ignored attributes names for backward compatibility + m = sai_metadata_get_ignored_attr_metadata_by_attr_id_name(s.c_str()); + } + if (m == NULL) { SWSS_LOG_THROW("invalid attr id: %s", s.c_str()); diff --git a/tests/BCM56850.pl b/tests/BCM56850.pl index fd2d34671d2e..c541891c2c0d 100755 --- a/tests/BCM56850.pl +++ b/tests/BCM56850.pl @@ -681,8 +681,16 @@ sub test_sairedis_client } } +sub test_ignore_attributes +{ + fresh_start; + + play "ignore_attributes.rec"; +} + # RUN TESTS +test_ignore_attributes; test_sairedis_client; test_macsec_p2p_establishment; test_no_lag_label; diff --git a/tests/BCM56850/ignore_attributes.rec b/tests/BCM56850/ignore_attributes.rec new file mode 100644 index 000000000000..2d8e3fa01feb --- /dev/null +++ b/tests/BCM56850/ignore_attributes.rec @@ -0,0 +1,7 @@ +2017-06-14.01:55:46.543987|a|INIT_VIEW +2017-06-14.01:55:46.551164|A|SAI_STATUS_SUCCESS +2017-06-14.01:55:46.555975|c|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_INIT_SWITCH=true +2017-06-14.01:56:05.520538|g|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_PORT_NUMBER=0 +2017-06-14.01:56:05.525938|G|SAI_STATUS_SUCCESS|SAI_SWITCH_ATTR_PORT_NUMBER=32 +2017-06-14.01:56:06.151337|a|APPLY_VIEW +2017-06-14.01:56:06.156740|A|SAI_STATUS_SUCCESS