]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Correct VPNaaS limit checks in extension
authorPaul Michali <pcm@cisco.com>
Fri, 23 Aug 2013 20:16:01 +0000 (16:16 -0400)
committerPaul Michali <pcm@cisco.com>
Fri, 30 Aug 2013 00:35:08 +0000 (20:35 -0400)
commit0c4ba5e0b8da2e87d72314198ee3feca52c0031f
treed53da22f2ed8b53f7f4da8440e18426bee7d2d9a
parent0f3750ceb7ce305018c3a9db1d2ff890a84f5a3e
Correct VPNaaS limit checks in extension

For the following VPNaaS attributes, ensure that these validation
tests are performed in the extension:

    keepalive >= 60 (seconds)
    mtu >= 0 (octets)
    DPD interval > 0 (seconds)
    DPD timeout > 0 (seconds)

Currently, the units for keepalive can only be seconds. If this
changes in the future (e.g. to allow kilobytes units), then the
test for the value will need to be changed.

To correctly test the MTU limits for an IPSec connection, the
protocol must be taken into consideration, which is defined by
the vpnservice object. Because of this dependency, we cannot
validate this in the extension, and will instead, just make
sure the value is positive.

Likewise, the attribute validators cannot ensure that the
DPD timeout is greater than the interval (again, because the
validators can only check the individual attributes one at
a time).

The range validator was modified to allow single ended ranges
for some of these attributes. The range also ensures the value
is an integer.

Companion changes are being made in the CLI code for these limit
changes.

Update: Fixed typo causing tox failure.

bug 1216117

Change-Id: I85d6175d81fbe7d27231aed48fb4691351e0db4c
neutron/api/v2/attributes.py
neutron/extensions/vpnaas.py
neutron/tests/unit/test_attributes.py