Verify security group parameters

Introduced various sanity checks before adding security group rule
into the database. The checks have been implemented both in EC2 and
openstack extension code.
Implemented the suggestions made in first patch by Brian
Fixed the unit tests in security groups
Fixed pep8 issues in security group unit tests

Fixes bug 869979.

Change-Id: I2ac28666e90e7bdeacb7b1c2676c0719cfb9e441
This commit is contained in:
Ahmad Hassan
2011-09-30 15:10:33 +01:00
parent 59dfaf9e02
commit 1a12349c05
6 changed files with 181 additions and 17 deletions

View File

@@ -229,7 +229,7 @@ class InvalidVolumeType(Invalid):
class InvalidPortRange(Invalid):
message = _("Invalid port range %(from_port)s:%(to_port)s.")
message = _("Invalid port range %(from_port)s:%(to_port)s. %(msg)s")
class InvalidIpProtocol(Invalid):