Fix sg_rule didn't set protocol field

If the lb security group contains 1 rule without protocol, worker may
raise error in _update_security_group_rules when listener creation.

Change-Id: Idc826d251296435119ae963c832de29160062967
This commit is contained in:
ZhaoBo 2017-08-08 21:05:23 +08:00 committed by Adam Harwell
parent 0423f86b4a
commit 7f5749d534
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ class AllowedAddressPairsDriver(neutron_base.BaseNeutronDriver):
# with the egress rules. VRRP uses protocol
# 51 and 112
if rule.get('direction') != 'egress' and
rule.get('protocol').lower() == 'tcp']
rule.get('protocol', '').lower() == 'tcp']
add_ports = set(updated_ports) - set(old_ports)
del_ports = set(old_ports) - set(updated_ports)
for rule in rules.get('security_group_rules', []):