@@ -565,6 +565,16 @@ void CrmOrch::getResAvailableCounters()
565
565
sai_status_t status = sai_object_type_get_availability (gSwitchId , objType, 0 , nullptr , &availCount);
566
566
if (status != SAI_STATUS_SUCCESS)
567
567
{
568
+ if ((status == SAI_STATUS_NOT_SUPPORTED) ||
569
+ (status == SAI_STATUS_NOT_IMPLEMENTED) ||
570
+ SAI_STATUS_IS_ATTR_NOT_SUPPORTED (status) ||
571
+ SAI_STATUS_IS_ATTR_NOT_IMPLEMENTED (status))
572
+ {
573
+ // mark unsupported resources
574
+ res.second .resStatus = CrmResourceStatus::CRM_RES_NOT_SUPPORTED;
575
+ SWSS_LOG_NOTICE (" CRM Resource %s not supported" , crmResTypeNameMap.at (res.first ).c_str ());
576
+ break ;
577
+ }
568
578
SWSS_LOG_ERROR (" Failed to get availability for object_type %u , rv:%d" , objType, status);
569
579
break ;
570
580
}
@@ -585,6 +595,16 @@ void CrmOrch::getResAvailableCounters()
585
595
sai_status_t status = sai_object_type_get_availability (gSwitchId , objType, 1 , &attr, &availCount);
586
596
if (status != SAI_STATUS_SUCCESS)
587
597
{
598
+ if ((status == SAI_STATUS_NOT_SUPPORTED) ||
599
+ (status == SAI_STATUS_NOT_IMPLEMENTED) ||
600
+ SAI_STATUS_IS_ATTR_NOT_SUPPORTED (status) ||
601
+ SAI_STATUS_IS_ATTR_NOT_IMPLEMENTED (status))
602
+ {
603
+ // mark unsupported resources
604
+ res.second .resStatus = CrmResourceStatus::CRM_RES_NOT_SUPPORTED;
605
+ SWSS_LOG_NOTICE (" CRM Resource %s not supported" , crmResTypeNameMap.at (res.first ).c_str ());
606
+ break ;
607
+ }
588
608
SWSS_LOG_ERROR (" Failed to get availability for object_type %u , rv:%d" , objType, status);
589
609
break ;
590
610
}
0 commit comments