{% load i18n sizeformat %}
{% trans "Name" %}
{{ port.name|default:_("None") }}
{% trans "ID" %}
{{ port.id|default:_("None") }}
{% trans "Network Name" %}
{{ port.network_name|default:_("None") }}
{% trans "Network ID" %}
{{ port.network_id|default:_("None") }}
{% if port.tenant_id %}
{% trans "Project ID" %}
{{ port.tenant_id}}
{% endif %}
{% trans "MAC Address" %}
{{ port.mac_address|default:_("None") }}
{% trans "Status" %}
{{ port.status_label|default:_("None") }}
{% trans "Admin State" %}
{{ port.admin_state_label|default:_("None") }}
{% if port.port_security_enabled != None %}
{% trans "Port Security Enabled" %}
{{ port.port_security_enabled }}
{% endif %}
{% trans "DNS Name" %}
{{ port.dns_name|default:_("None") }}
{% if port.mac_state %}
{% trans "MAC Learning State" %}
{{ port.mac_state }}
{% endif %} {% if port.qos_policy_id %}
{% trans "QOS Policy ID" %}
{{ port.qos_policy_id }}
{% endif %}

{% trans "DNS Assignment" %}


{% for host in port.dns_assignment %}
{% trans "Hostname" %}
{{ host.hostname }}
{% trans "IP Address" %}
{{ host.ip_address }}
{% trans "FQDN" %}
{{ host.fqdn }}
{% empty %}
{% trans "None" %}
{% endfor %}

{% trans "Fixed IPs" %}


{% for ip in port.fixed_ips %}
{% trans "IP Address" %}
{{ ip.ip_address }}
{% trans "Subnet ID" %}
{{ ip.subnet_id }}
{% empty %}
{% trans "None" %}
{% endfor %}

{% trans "Attached Device" %}


{% if port.device_id|length > 1 or port.device_owner %}
{% trans "Device Owner" %}
{{ port.device_owner|default:_("None") }}
{% trans "Device ID" %}
{{ port.device_id|default:_("None") }}
{% else %}
{% trans "No attached device" %}
{% endif %}

{% trans "Security Groups" %}


{% for group in port.security_groups %}
{{ group.name }}
    {% for rule in group.rules %}
  • {{ rule }}
  • {% endfor %}
{% empty %}
{% trans "No security group is associated" %}
{% endfor %}

{% trans "Binding" %}


{% trans "VNIC Type" %}
{{ port.binding__vnic_type }}
{% if port.binding__host_id %}
{% trans "Host" %}
{{ port.binding__host_id|default:_("None") }}
{% trans "Profile" %}
{{ port.binding__profile|default:_("None") }}
{% trans "VIF Type" %}
{{ port.binding__vif_type|replace_underscores }}
{% trans "VIF Details" %}
{% if port.binding__vif_details.items %}
    {% for key,value in port.binding__vif_details.items %}
  • {{ key }} {{ value }}
  • {% endfor %}
{% else %}
{% trans "None" %}
{% endif %} {% endif %}