Traceback when neutron does not support port binding extension in admin screen

Bug #1498352 reported by Wim De Clercq
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Akihiro Motoki

Bug Description

Similar to https://bugs.launchpad.net/horizon/+bug/1477100

In the admin's edit port view, binding:host_id is expected as part of the port object. This gives a traceback when plugins don't use the port binding extension.
...
....
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/networks/ports/views.py", line 99, in get_initial
initial['binding__host_id'] = port['binding__host_id']
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/base.py", line 156, in __getitem__
raise KeyError(e)
KeyError: AttributeError("'Port' object has no attribute 'binding__host_id'",)

Tags: neutron
Saravanan KR (skramaja)
Changed in horizon:
assignee: nobody → Saravanan KR (skramaja)
Saravanan KR (skramaja)
Changed in horizon:
assignee: Saravanan KR (skramaja) → nobody
David Lyle (david-lyle)
tags: added: neutron
removed: admin binding port
Changed in horizon:
importance: Undecided → Low
guoshan (guoshan)
Changed in horizon:
assignee: nobody → guoshan (guoshan)
Akihiro Motoki (amotoki)
Changed in horizon:
assignee: guoshan (guoshan) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/505842

Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
status: New → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → queens-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/505842
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5d40431206352b1b0a0b989f4174a04dff11c992
Submitter: Zuul
Branch: master

commit 5d40431206352b1b0a0b989f4174a04dff11c992
Author: Akihiro Motoki <email address hidden>
Date: Wed Sep 20 22:40:57 2017 +0000

    Handle binding__host_id conditionally

    binding__host_id (binding:host_id in the Neutron API) only exists
    when portbinding neutron extension is available. This extension is
    available in almost all cases as Nova depends on the extension,
    but it is better to check the availability in horizon side as
    we do so in other places in horizon.

    Change-Id: Id7fa8ebcdde09547fd64892a787834bc4c543acf
    Closes-Bug: #1498352

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b3

This issue was fixed in the openstack/horizon 13.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.