Merge "VPN DPD timeout changes"

This commit is contained in:
Zuul 2018-02-25 07:54:27 +00:00 committed by Gerrit Code Review
commit c25f33e163
2 changed files with 5 additions and 5 deletions

View File

@ -117,7 +117,7 @@ class TestIPSecDpdProfile(test_resources.BaseTestResource):
data=jsonutils.dumps({
'display_name': name,
'description': description,
'timeout': timeout,
'dpd_probe_interval': timeout,
'enabled': enabled
}, sort_keys=True),
headers=self.default_headers())
@ -128,7 +128,7 @@ class TestIPSecDpdProfile(test_resources.BaseTestResource):
uuid = test_constants.FAKE_DPD_ID
mocked_resource = self.get_mocked_resource(response=fake_dpd)
mocked_resource.update(uuid, timeout=new_timeout)
fake_dpd['timeout'] = new_timeout
fake_dpd['dpd_probe_interval'] = new_timeout
test_client.assert_json_call(
'put', mocked_resource,
'https://1.2.3.4/api/v1/%s/%s' % (mocked_resource.uri_segment,

View File

@ -79,7 +79,7 @@ class DpdProfileActionTypes(object):
class DpdProfileTimeoutLimits(object):
"""Supported DPD timeout range"""
DPD_TIMEOUT_MIN = 3
DPD_TIMEOUT_MAX = 3600
DPD_TIMEOUT_MAX = 360
class IkeSALifetimeLimits(object):
@ -206,7 +206,7 @@ class IPSecDpdProfile(utils.NsxLibApiBase):
if description:
body['description'] = description
if timeout:
body['timeout'] = timeout
body['dpd_probe_interval'] = timeout
# Boolean parameters
if enabled is not None:
body['enabled'] = enabled
@ -219,7 +219,7 @@ class IPSecDpdProfile(utils.NsxLibApiBase):
body = self.get(profile_id)
if timeout:
body['timeout'] = timeout
body['dpd_probe_interval'] = timeout
if enabled is not None:
body['enabled'] = enabled
if tags is not None: