VPN DPD timeout changes

The NSX implementation changed the DPD timeout limits and field name

Change-Id: Ic4ad0484685e4aeb7054bcfa52551beea8fe0cd9
This commit is contained in:
Adit Sarfaty 2018-02-15 11:38:42 +02:00
parent 3d4cb671fb
commit b1aeec6d76
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: