diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-06-06 13:25:04 -0400 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2012-06-06 13:25:04 -0400 |
| commit | ff06c7c885dc94ed7c828e8cdbb8b5d850a7e654 (patch) | |
| tree | bb45357aba96cc7bcb8bdb4f9f50116cf5f4de1d /nova/api | |
| parent | 1a007651c40b8f959fab9e3d5c431f65b4728950 (diff) | |
| download | nova-ff06c7c885dc94ed7c828e8cdbb8b5d850a7e654.tar.gz nova-ff06c7c885dc94ed7c828e8cdbb8b5d850a7e654.tar.xz nova-ff06c7c885dc94ed7c828e8cdbb8b5d850a7e654.zip | |
Fix up protocol case handling for security groups.
Fix bug 985184.
When creating security group rules, any case for the protocol was
accepted as input, such as TCP, Tcp, tcp, etc., and was stored in the
database as specified. However, unless specified as all lowercase, the
code to apply the rules would break and result in some rules not being
applied.
Change-Id: I6c723d371579eb37a94bd484d39beeb773668ed4
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/cloud.py | 2 | ||||
| -rw-r--r-- | nova/api/openstack/compute/contrib/security_groups.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 43686aa12..723c7fca7 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -598,7 +598,7 @@ class CloudController(object): to_port=to_port, msg="For ICMP, the" " type:code must be valid") - values['protocol'] = ip_protocol + values['protocol'] = ip_protocol.lower() values['from_port'] = from_port values['to_port'] = to_port else: diff --git a/nova/api/openstack/compute/contrib/security_groups.py b/nova/api/openstack/compute/contrib/security_groups.py index 7e3f93752..4a69d392e 100644 --- a/nova/api/openstack/compute/contrib/security_groups.py +++ b/nova/api/openstack/compute/contrib/security_groups.py @@ -524,7 +524,7 @@ class SecurityGroupRulesController(SecurityGroupControllerBase): to_port=to_port, msg="For ICMP, the" " type:code must be valid") - values['protocol'] = ip_protocol + values['protocol'] = ip_protocol.lower() values['from_port'] = from_port values['to_port'] = to_port else: |
