change static rt expiry timer max value (#14397)

Why I did it
Change static route expiry timer max timeout value from 1800 to 172800.
To keep same value range as defined in sonic-restapi/sonic_api.yaml

How I did it
How to verify it
apply change to bgpcfd, restart bgp container see if the value take action.
This commit is contained in:
jcaiMR 2023-03-26 20:21:37 +08:00 committed by GitHub
parent 6ef32d1fdf
commit b3c73f84ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,8 @@ class StaticRouteTimer(object):
DEFAULT_TIMER = 180
DEFAULT_SLEEP = 60
MAX_TIMER = 1800
# keep same range as value defined in sonic-restapi/sonic_api.yaml
MAX_TIMER = 172800
def set_timer(self):
""" Check for custom route expiry time in STATIC_ROUTE_EXPIRY_TIME """
@ -56,3 +57,4 @@ class StaticRouteTimer(object):
time.sleep(self.DEFAULT_SLEEP)
if time.time() - self.start >= self.DEFAULT_TIMER:
self.alarm()