]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add utility function for checking trusted port
authorKevin Benton <blak111@gmail.com>
Thu, 3 Sep 2015 17:01:40 +0000 (10:01 -0700)
committerKevin Benton <kevinbenton@buttewifi.com>
Mon, 14 Sep 2015 10:41:54 +0000 (10:41 +0000)
commit638d16c8a019cfdafa2b6bb12c95775544bb58df
treedd9f103065d14f3277efc097a7eb2068de24d171
parent710ab239e404a3ef138b7dd796d028ad375060e8
Add utility function for checking trusted port

Ports that have a device_owner that starts with 'network:'
are trusted in several places throughout the codebase. Each
of these did a startswith check on each field and it's not
immediately obvious why it's done.

This patch adds a utility function called 'is_port_trusted'
that performs the same check and makes it obvious what is
being done.

Change-Id: I542c753776d5cfb2fd736b25ea6e111867c89c89
neutron/api/rpc/handlers/securitygroups_rpc.py
neutron/common/utils.py
neutron/db/portsecurity_db.py
neutron/db/securitygroups_db.py
neutron/plugins/ml2/drivers/linuxbridge/agent/arp_protect.py
neutron/plugins/ml2/extensions/port_security.py