]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
VPNaaS: separate out validation logic for ref impl
authorPaul Michali <pcm@cisco.com>
Mon, 23 Jun 2014 20:42:41 +0000 (16:42 -0400)
committerPaul Michali <pcm@cisco.com>
Wed, 16 Jul 2014 19:05:01 +0000 (15:05 -0400)
commit4c0ee4dc06a641abc941bcbb9b5467410c888a76
treed6a29d3cccb747643d050b7c7b4f046f96a3934a
parentfb6e0653acfba9654c9119427ada0ad6c7211813
VPNaaS: separate out validation logic for ref impl

Modify the persistence logic for VPNaaS to separate out the
validation for the reference implmentation. This allows
providers to override/extend the validation, as needed.
Additional commits will address the separation for other
providers and for other L3 services.

In addition, the logic that sets default values for optional
attributes is also moved into separate methods to allow
providers to override the defaults used.

Only attributes that have multiple validations are considered
at this time, but this can be extended, as needed.

Currently, one UT fails due to an oslo.messaging bug that
has been fixed, but not yet released for Neutron use.
As a workaround, the affected test case has been commented
out. This test verifies that the right (only, in this case)
device driver is used for validation. Once the issue with
releasing oslo.messaging 1.4.0.0a2 or newer is resolved,
this can be uncommented.

In the future, TaskFlow may be used for the L3 services workflow,
and these changes will provide validation modularization for that
effort.

Change-Id: Id420983ccbceece5f4a00546941618318b9562c7
Partially-implements: blueprint l3-svcs-vendor-validation
neutron/db/vpn/vpn_db.py
neutron/db/vpn/vpn_validator.py [new file with mode: 0644]
neutron/services/vpn/plugin.py
neutron/services/vpn/service_drivers/__init__.py
neutron/tests/unit/db/vpn/test_db_vpnaas.py
neutron/tests/unit/services/vpn/service_drivers/test_ipsec.py
neutron/tests/unit/services/vpn/test_vpnaas_driver_plugin.py