~ubuntu-branches/ubuntu/wily/neutron/wily

« back to all changes in this revision

Viewing changes to neutron/plugins/ml2/extensions/port_security.py

  • Committer: Package Import Robot
  • Author(s): Corey Bryant
  • Date: 2015-09-25 17:14:07 UTC
  • mfrom: (1.1.27)
  • Revision ID: package-import@ubuntu.com-20150925171407-bcttci48k7q9togi
Tags: 2:7.0.0~rc1-0ubuntu1
* d/watch: Update to cope with upstream rc versioning.
* New upstream release candidate for OpenStack Liberty.
* d/rules: Drop removal of .eggs directory in override_dh_auto_clean.
* d/control: Bump minimum pbr version to 1.8.
* d/control: Align (build-)depends with upstream.
* d/neutron-common.install: Add neutron-dev-server and neutron-rpc-server.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#    under the License.
15
15
 
16
16
from neutron.api.v2 import attributes as attrs
 
17
from neutron.common import utils
17
18
from neutron.db import common_db_mixin
18
19
from neutron.db import portsecurity_db_common as ps_db_common
19
20
from neutron.extensions import portsecurity as psec
80
81
        otherwise the value associated with the network is returned.
81
82
        """
82
83
        # we don't apply security groups for dhcp, router
83
 
        if (port.get('device_owner') and
84
 
                port['device_owner'].startswith('network:')):
 
84
        if port.get('device_owner') and utils.is_port_trusted(port):
85
85
            return False
86
86
 
87
87
        if attrs.is_attr_set(port.get(psec.PORTSECURITY)):