58e0b8bafb
KeyError exception is seen because of following reasons * DhcpRpcCallback._port_action() is called by two functions - DhcpRpcCallback.create_dchp_port() - DhcpRpcCallback.update_dhcp_port() * When create_dhcp_port() function calls _port_action(), the function argument 'port' will have the body as {'port': {'network_id': foo_network_id, 'fixed_ips': [..] ...} * When update_dhcp_port() function calls _port_action(), the function argument 'port' will have the body as {'id': port_id, 'port': {{'port': {'network_id': foo_network_id, 'fixed_ips': [..] ...}} * If an exception occurs when _port_action() calls plugin.create_port(), network id is accessed as net_id = port['port']['network_id'] * If an exception occurs when _port_action() calls plugin.update_port(), network id is accessed as net_id = port['port']['network_id'] which is causing the KeyError. network_id should have been accessed as net_id = port['port']['port']['network_id'] This patch fixes the issue by making the _port_action() take the same port body. update_dhcp_port() insteading of passing the port_id and port information in a single argument, it now adds port_id in the port body itself. Change-Id: I70b92fa20b421b05ca2053a9a57f62db726f7625 Closes-bug: #1378508 |
||
---|---|---|
bin | ||
doc | ||
etc | ||
neutron | ||
rally-scenarios | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.pylintrc | ||
.testr.conf | ||
babel.cfg | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
MANIFEST.in | ||
openstack-common.conf | ||
README.rst | ||
requirements.txt | ||
run_tests.sh | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
TESTING.rst | ||
tox.ini |
# -- Welcome!
You have come across a cloud computing network fabric controller. It has identified itself as "Neutron." It aims to tame your (cloud) networking!
# -- External Resources:
The homepage for Neutron is: http://launchpad.net/neutron. Use this site for asking for help, and filing bugs. Code is available on git.openstack.org at <http://git.openstack.org/cgit/openstack/neutron>.
The latest and most in-depth documentation on how to use Neutron is available at: <http://docs.openstack.org>. This includes:
Neutron Administrator Guide http://docs.openstack.org/trunk/openstack-network/admin/content/
Neutron API Reference: http://docs.openstack.org/api/openstack-network/2.0/content/
The start of some developer documentation is available at: http://wiki.openstack.org/NeutronDevelopment
For help using or hacking on Neutron, you can send mail to <mailto:openstack-dev@lists.openstack.org>.