marios c147d88261 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
..
2013-08-16 10:10:30 +08:00
2013-07-06 15:02:43 -04:00
2014-02-10 04:58:38 +09:00
2014-02-25 14:28:35 +00:00
2013-07-06 15:02:43 -04:00