Skip to content

Commit

Permalink
Add sairedis tam api tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Aug 23, 2021
1 parent f1570e5 commit 9d1032b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unittest/lib/test_sai_redis_tam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ TEST(libsairedis, tam)

sai_object_id_t id;

sai_object_list_t list;

EXPECT_EQ(SAI_STATUS_NOT_IMPLEMENTED, sai_tam_telemetry_get_data(0,list,0,0,0));

EXPECT_NE(SAI_STATUS_SUCCESS, api->create_tam(&id,0,0,0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_tam(0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tam_attribute(0,0));
Expand Down
12 changes: 12 additions & 0 deletions vslib/sai_vs_tam.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#include "sai_vs.h"

sai_status_t sai_tam_telemetry_get_data(
_In_ sai_object_id_t switch_id,
_In_ sai_object_list_t obj_list,
_In_ bool clear_on_read,
_Inout_ sai_size_t *buffer_size,
_Out_ void *buffer)
{
SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

VS_GENERIC_QUAD(TAM,tam);
VS_GENERIC_QUAD(TAM_MATH_FUNC,tam_math_func);
VS_GENERIC_QUAD(TAM_REPORT,tam_report);
Expand Down

0 comments on commit 9d1032b

Please sign in to comment.