@@ -193,8 +193,8 @@ bool VxlanTunnelOrch::addOperation(const Request& request)
193
193
auto src_ip = request.getAttrIP (" src_ip" );
194
194
if (!src_ip.isV4 ())
195
195
{
196
- SWSS_LOG_ERROR (" Wrong attribute: 'src_ip'. Currently only IPv4 address is supported" );
197
- return false ;
196
+ SWSS_LOG_ERROR (" Wrong format of the attribute: 'src_ip'. Currently only IPv4 address is supported" );
197
+ return true ;
198
198
}
199
199
200
200
IpAddress dst_ip;
@@ -208,8 +208,8 @@ bool VxlanTunnelOrch::addOperation(const Request& request)
208
208
dst_ip = request.getAttrIP (" dst_ip" );
209
209
if (!dst_ip.isV4 ())
210
210
{
211
- SWSS_LOG_ERROR (" Wrong attribute: 'dst_ip'. Currently only IPv4 address is supported" );
212
- return false ;
211
+ SWSS_LOG_ERROR (" Wrong format of the attribute: 'dst_ip'. Currently only IPv4 address is supported" );
212
+ return true ;
213
213
}
214
214
}
215
215
@@ -218,7 +218,7 @@ bool VxlanTunnelOrch::addOperation(const Request& request)
218
218
if (isTunnelExists (tunnel_name))
219
219
{
220
220
SWSS_LOG_ERROR (" Vxlan tunnel '%s' is already exists" , tunnel_name.c_str ());
221
- return false ;
221
+ return true ;
222
222
}
223
223
224
224
tunnel_ids_t ids;
@@ -237,6 +237,8 @@ bool VxlanTunnelOrch::addOperation(const Request& request)
237
237
238
238
vxlan_tunnel_table_[tunnel_name] = ids;
239
239
240
+ SWSS_LOG_NOTICE (" Vxlan tunnel '%s' was created" , tunnel_name.c_str ());
241
+
240
242
return true ;
241
243
}
242
244
@@ -265,7 +267,7 @@ bool VxlanTunnelMapOrch::addOperation(const Request& request)
265
267
if (vni_id >= 1 <<24 )
266
268
{
267
269
SWSS_LOG_ERROR (" Vxlan tunnel map vni id is too big: %d" , vni_id);
268
- return false ;
270
+ return true ;
269
271
}
270
272
271
273
auto tunnel_name = request.getKeyString (0 );
@@ -280,10 +282,11 @@ bool VxlanTunnelMapOrch::addOperation(const Request& request)
280
282
if (isTunnelMapExists (full_tunnel_map_entry_name))
281
283
{
282
284
SWSS_LOG_ERROR (" Vxlan tunnel map '%s' is already exist" , full_tunnel_map_entry_name.c_str ());
283
- return false ;
285
+ return true ;
284
286
}
285
287
286
288
const auto tunnel_map_id = tunnel_orch->getTunnelMapId (tunnel_name);
289
+ const auto tunnel_map_entry_name = request.getKeyString (1 );
287
290
288
291
try
289
292
{
@@ -292,12 +295,13 @@ bool VxlanTunnelMapOrch::addOperation(const Request& request)
292
295
}
293
296
catch (const std::runtime_error& error)
294
297
{
295
- auto tunnel_map_entry_name = request.getKeyString (1 );
296
298
SWSS_LOG_ERROR (" Error adding tunnel map entry. Tunnel: %s. Entry: %s. Error: %s" ,
297
299
tunnel_name.c_str (), tunnel_map_entry_name.c_str (), error.what ());
298
300
return false ;
299
301
}
300
302
303
+ SWSS_LOG_NOTICE (" Vxlan tunnel map entry '%s' for tunnel '%s' was created" , tunnel_map_entry_name.c_str (), tunnel_name.c_str ());
304
+
301
305
return true ;
302
306
}
303
307
0 commit comments