From 3f61a44ff3b373216c353b5378a36ad08cfcd6b0 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Mon, 24 Oct 2016 16:59:03 -0700 Subject: [PATCH] Change some error code to SAI_STATUS_ITEM_ALREADY_EXISTS (#99) --- meta/sai_meta.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/sai_meta.cpp b/meta/sai_meta.cpp index 4c1b5abb6126..386a620ae659 100644 --- a/meta/sai_meta.cpp +++ b/meta/sai_meta.cpp @@ -1415,7 +1415,7 @@ sai_status_t meta_generic_validation_create( { SWSS_LOG_ERROR("object key %s already exists", key.c_str()); - return SAI_STATUS_INVALID_PARAMETER; + return SAI_STATUS_ITEM_ALREADY_EXISTS; } break; @@ -3371,7 +3371,7 @@ sai_status_t meta_sai_validate_fdb_entry( { SWSS_LOG_ERROR("object key %s already exists", key_fdb.c_str()); - return SAI_STATUS_INVALID_PARAMETER; + return SAI_STATUS_ITEM_ALREADY_EXISTS; } return SAI_STATUS_SUCCESS; @@ -3666,7 +3666,7 @@ sai_status_t meta_sai_validate_neighbor_entry( { SWSS_LOG_ERROR("object key %s already exists", key_neighbor.c_str()); - return SAI_STATUS_INVALID_PARAMETER; + return SAI_STATUS_ITEM_ALREADY_EXISTS; } return SAI_STATUS_SUCCESS; @@ -3908,7 +3908,7 @@ sai_status_t meta_sai_validate_vlan_id( { SWSS_LOG_ERROR("object key %s already exists", key_vlan.c_str()); - return SAI_STATUS_INVALID_PARAMETER; + return SAI_STATUS_ITEM_ALREADY_EXISTS; } return SAI_STATUS_SUCCESS; @@ -4218,7 +4218,7 @@ sai_status_t meta_sai_validate_route_entry( { SWSS_LOG_ERROR("object key %s already exists", key_route.c_str()); - return SAI_STATUS_INVALID_PARAMETER; + return SAI_STATUS_ITEM_ALREADY_EXISTS; } return SAI_STATUS_SUCCESS;