neutron/neutron/common
marios 65aa92b034 Validate CIDR given as ip-prefix in security-group-rule-create
There was no validation for the provided ip prefix. This just adds
a simple parse using netaddr and explodes with appropriate message.
Also makes sure ip prefix _is_ cidr (192.168.1.1-->192.168.1.1/32).

Validation occurs at the attribute level (API model) as well as at
the db level, where the ethertype is validated against the ip_prefix
address type.

Unit test cases added - bad prefix, unmasked prefix and incorrect
ethertype. Also adds attribute test cases for the added
convert_ip_prefix_to_cidr method

Change-Id: I71fb8c887963a122a5bd8cfdda800026c1cd3954
Closes-Bug: 1255338
2014-04-16 18:15:29 +02:00
..
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
config.py Add nova_api_insecure flag to neutron 2014-04-13 10:10:35 -05:00
constants.py Permit ICMPv6 RAs only from known routers 2014-04-02 16:24:17 +08:00
exceptions.py Validate CIDR given as ip-prefix in security-group-rule-create 2014-04-16 18:15:29 +02:00
ipv6_utils.py Calculate stateless IPv6 address 2014-03-17 15:48:46 -04:00
log.py Make neutron.common.log.log print module path 2013-09-07 02:10:57 +09:00
rpc.py Avoid loading policy when processing rpc requests 2013-11-28 13:02:02 +04:00
test_lib.py Remove plugin_name_v2 and extension_manager in test_config 2014-01-06 20:02:00 +09:00
topics.py LBaaS: move agent based driver files into a separate dir 2014-02-10 12:24:27 +04:00
utils.py Merge "Remove legacy quantum config path" 2014-03-15 01:24:01 +00:00