Fix Bindings renderring for admin

With new neutronclient objects are immutable to changes, thus writing
down properties like binding__* does not work like expected.

In the meanwhile regular binding_* are available for ports and
populated properly by the client.

This patch switching to usage of such properties for the template only
to make the patch backportable. Further rehauwling and renaming
of properties is expected to be done in follow-up patches.

Closes-Bug: #2095150
Change-Id: I57cba985d427507a4177e9b919cfae0a8188395a
This commit is contained in:
Dmitriy Rabotyagov 2025-03-19 22:43:48 +01:00
parent fa1e28805c
commit da38df12ff

View File

@ -104,19 +104,19 @@
<hr class="header_rule">
<dl class="dl-horizontal">
<dt>{% trans "VNIC Type" %}</dt>
<dd>{{ port.binding__vnic_type }}</dd>
{% if port.binding__host_id %}
<dd>{{ port.binding_vnic_type }}</dd>
{% if port.binding_host_id %}
<dt>{% trans "Host" %}</dt>
<dd>{{ port.binding__host_id|default:_("None") }}</dd>
<dd>{{ port.binding_host_id|default:_("None") }}</dd>
<dt>{% trans "Profile" %}</dt>
<dd>{{ port.binding__profile|default:_("None") }}</dd>
<dd>{{ port.binding_profile|default:_("None") }}</dd>
<dt>{% trans "VIF Type" %}</dt>
<dd>{{ port.binding__vif_type|replace_underscores }}</dd>
<dd>{{ port.binding_vif_type|replace_underscores }}</dd>
<dt>{% trans "VIF Details" %}</dt>
{% if port.binding__vif_details.items %}
{% if port.binding_vif_details.items %}
<dd>
<ul>
{% for key,value in port.binding__vif_details.items %}
{% for key,value in port.binding_vif_details.items %}
<li><b>{{ key }}</b> {{ value }}</li>
{% endfor %}
</ul>