Skip to content

Commit

Permalink
Static route expiry if not specified as persistent (#98)
Browse files Browse the repository at this point in the history
* Static route expiry contract if not specified as persistent
  • Loading branch information
prsunny authored Dec 9, 2021
1 parent 5cc4358 commit 4832dfd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sonic_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ paths:
'/config/vrf/{vrf_id}/routes':
patch:
summary: Update/modify IP routes for a VRF
description: This API call receives a list of route entries to be added/modified/deleted from the virtual routing table defined by 'vrf_id'. API shall operate on default vrf if the 'vrf_id' is specified as 'default'. It is not required by the user to create 'default' vrf. For non-default vrf, if an object with vrf_id doesn't exist this will return an error code '404'. The 'cmd' attribute will determine whether this is an add or delete request. For 'add' operations the API will try to insert every route entry individually. If a route entry already exists in the virtual routing table, the attributes of the rouing entry will be updated. If a route entry doesn't exist in the routing table yet, it will be inserted there. If something went wrong the route entry will be returned as member of "failed" list with "error_code" attr set to some HTTP error code and "error_msg" attr set to some custom error string. Similarly for 'delete' operations the API will try to delete every route entry individually, if the delete fails it will be returned as a member of the "failed" list with attrs "error_code" and "error_msg" set
description: This API call receives a list of route entries to be added/modified/deleted from the virtual routing table defined by 'vrf_id'. API shall operate on default vrf if the 'vrf_id' is specified as 'default'. It is not required by the user to create 'default' vrf. For non-default vrf, if an object with vrf_id doesn't exist this will return an error code '404'. The 'cmd' attribute will determine whether this is an add or delete request. For 'add' operations the API will try to insert every route entry individually. If a route entry already exists in the virtual routing table, the attributes of the rouing entry will be updated. If a route entry doesn't exist in the routing table yet, it will be inserted there. If something went wrong the route entry will be returned as member of "failed" list with "error_code" attr set to some HTTP error code and "error_msg" attr set to some custom error string. Similarly for 'delete' operations the API will try to delete every route entry individually, if the delete fails it will be returned as a member of the "failed" list with attrs "error_code" and "error_msg" set. User can specify if the route must be persitent and saved to config. This is a per-route optional attribute with default set as 'false'. For non-persistent routes, the client is expected to refresh at periodic intervals. If not refreshed, the default expiry is 180 sec and the route gets marked for deletion and later removed in the next cycle. In effect, the non-refreshed route can get removed anytime between 180 - 360 sec. User is not expected to configure a route first as persistent and then as non-persistent or vice versa. In such cases, persistent takes precedence.
parameters:
- name: vrf_id
in: path
Expand Down Expand Up @@ -2474,6 +2474,10 @@ definitions:
type: integer
format: int32
description: vxlan id to be used for the tunnel. Optional arg. If it isn't provided the default vxlan id defined for the vnet/vrf will be used as the destination vnid.
persistent:
type: boolean
description: flag to specify if the route must be persistent and write to config DB for save/restore. Default is false, i.e non-persistent. If flag is set during create, it is expected to be specified during delete operation.
default: false
error_code:
type: integer
format: int32
Expand Down

0 comments on commit 4832dfd

Please sign in to comment.