]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
return the dict of port when no sec-group involved
authorYalei Wang <yalei.wang@intel.com>
Wed, 3 Dec 2014 05:29:30 +0000 (13:29 +0800)
committeryalei wang <yalei.wang@intel.com>
Fri, 5 Dec 2014 06:16:34 +0000 (06:16 +0000)
commit997e70751c74004983b1e4079b084431ed0c7d27
treed8189d0276cb32a435a366f8087d121ed61809c5
parent1b0c20e3269d605ed3748dfae442a546a84c2336
return the dict of port when no sec-group involved

Commit abc16ebf made the get_sg_ids_grouped_by_port function not return
entries for ports without security groups. This causes the agent to not remove
previously created security groups for that port since the port is not
returned in the security_group_info_for_devices data.

This change fixes that by always including a list of security groups for each
port, even if that list is empty.

Change-Id: I9616708462a8b6f3d46ebd76db5cf8cb2826f4ad
Closes-Bug: #1398312
neutron/plugins/ml2/db.py
neutron/tests/unit/ml2/test_security_group.py