]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
populate port security default into network
authorKahou Lei <kahou82@gmail.com>
Wed, 3 Jun 2015 23:39:11 +0000 (16:39 -0700)
committergong yong sheng <gong.yongsheng@99cloud.net>
Mon, 29 Jun 2015 01:31:43 +0000 (09:31 +0800)
commitf4e1289d8d381b775f7a6e5f98c507a99fd42b54
treec27dbf26f5278096d02cf4c58639d7550d7d9ecd
parentc24c3f4c9031aec7c7ad07b5937a9ce74a6e9fe1
populate port security default into network

Previously, the default value would be populated into attr by API
controller, but some codes in plugin or service plugins call plugin
to create network directly, such as l3, which will have no default
value populated.
This patch fixes it by populating default port_security value into
network data.

In addition, for network without port-security set, we also give the
default value to populate the return network dict object, which will
let the extension construct the response dictionary gracefully for
those existing network.

Co-Authored-By: gong yong sheng <gong.yongsheng@99cloud.net>
Change-Id: I73abc98d83372f6259f17680806e6541458e2077
Closes-bug: #1461519
Closes-Bug: #1461647
Closes-Bug: #1468588
neutron/plugins/ml2/extensions/port_security.py
neutron/tests/unit/extensions/test_portsecurity.py
neutron/tests/unit/plugins/ml2/test_ext_portsecurity.py