diff options
author | Wojciech Dec <wdec@cisco.com> | 2016-08-17 13:14:23 +0200 |
---|---|---|
committer | Wojciech Dec <wdec@cisco.com> | 2016-08-17 13:14:23 +0200 |
commit | 4979a23b8b2c0094ced98cf05eebb692d6609937 (patch) | |
tree | c49ceeb5b127fdb0e10c0f5ac0516be96cbd31a9 /networking-odl/networking_odl/journal/dependency_validations.py | |
parent | c3b2c2a9a22bac5cf17813c589444d3abebaa23b (diff) |
Correcting networking-odl to mitaka/stable + app topology patch
Change-Id: Iddcd8dda2d49fcdd8e0f37a1d052a6fa8a24b035
Signed-off-by: Wojciech Dec <wdec@cisco.com>
Diffstat (limited to 'networking-odl/networking_odl/journal/dependency_validations.py')
-rw-r--r-- | networking-odl/networking_odl/journal/dependency_validations.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/networking-odl/networking_odl/journal/dependency_validations.py b/networking-odl/networking_odl/journal/dependency_validations.py index a6f5f96..07c657c 100644 --- a/networking-odl/networking_odl/journal/dependency_validations.py +++ b/networking-odl/networking_odl/journal/dependency_validations.py @@ -235,7 +235,7 @@ def validate_security_group_rule_operation(session, row): """ return True -_VALIDATION_MAP = { +VALIDATION_MAP = { odl_const.ODL_NETWORK: validate_network_operation, odl_const.ODL_SUBNET: validate_subnet_operation, odl_const.ODL_PORT: validate_port_operation, @@ -245,23 +245,3 @@ _VALIDATION_MAP = { odl_const.ODL_SG: validate_security_group_operation, odl_const.ODL_SG_RULE: validate_security_group_rule_operation, } - - -def validate(session, row): - """Validate resource dependency in journaled operations. - - :param session: db session - :param row: entry in journal entry to be validated - """ - return _VALIDATION_MAP[row.object_type](session, row) - - -def register_validator(object_type, validator): - """Register validator function for given resource. - - :param object_type: neutron resource type - :param validator: function to be registered which validates resource - dependencies - """ - assert object_type not in _VALIDATION_MAP - _VALIDATION_MAP[object_type] = validator |