-
Notifications
You must be signed in to change notification settings - Fork 552
Open
Description
When sai_rpc_server.cpp is generated sai_thrift_create_switch_tunnel function is affected by the following rule:
SAI/meta/templates/sai_rpc_server_functions.tt
Lines 118 to 120 in 2c74f46
| [%- IF function_name.match(create_switch_function) %] | |
| [%- PROCESS check_switch_id %] | |
| [%- END %] |
This leads to returning the switch object instead of creating a switch tunnel:
sai_thrift_object_id_t sai_thrift_create_switch_tunnel(const std::vector<sai_thrift_attribute_t> & attr_list) {
sai_status_t status = SAI_STATUS_SUCCESS;
sai_object_id_t switch_tunnel_oid_out = SAI_NULL_OBJECT_ID;
// need to check if the switch exist
if (switch_id != SAI_NULL_OBJECT_ID) {
return switch_id;
}
//check if the switch created in syncd
if (gSwitchId != SAI_NULL_OBJECT_ID) {
switch_id = gSwitchId;
return switch_id;
}
...
Perhaps we should check for the exact function name and not to match on a substring.
Metadata
Metadata
Assignees
Labels
No labels