]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Don't require passing in port_security=False if security_groups present
authorAaron Rosen <aaronorosen@gmail.com>
Wed, 8 Jan 2014 21:10:54 +0000 (13:10 -0800)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:26 +0000 (15:20 +0800)
commit80305d100535db55007cd81792b1489afde6d544
tree3fc8fe7cf196fd0204b31c2f828c721ebf8090f2
parent1f85e58f4a4e9d8200037b55f3296bb01e260192
Don't require passing in port_security=False if security_groups present

If creating a port on a network that is marked as port_security_enabled=False
and one passes in a security_group in the port_create request previously an
error was raised saying they needed to also pass in
port_security_enabled=False. This patch removes that requirement and instead
sets port_security_enabled=True internally if a port has an ip_address and a
security_group is passed in. This is more convient and does not break
backwards compatibility.

Closes-bug: #1267249
Change-Id: Ifb5a5511f016a5d8c5b5075c9fdc27279cdd9bb5
neutron/db/portsecurity_db.py
neutron/tests/unit/test_extension_portsecurity.py