{% comment %} ACI Context panel injected into the dcim.Interface detail view. Same layout as the device panel: ``attr-table`` summary card up top, then per-concern subordinate cards (bindings, subnets, contracts, L3Out, BGP peers). {% endcomment %} {% load helpers %} {% load i18n %}

{% trans "Cisco ACI Context" %}

{% trans "ACI Node" %} {% if interface_fabric_membership %} {{ interface_fabric_membership.aci_node|linkify }} {% else %}{{ ""|placeholder }}{% endif %}
{% trans "Fabric Role" %} {% if interface_fabric_membership %} {{ interface_fabric_membership.get_interface_role_display }} {% else %}{{ ""|placeholder }}{% endif %}
{% trans "Static Port Bindings" %} {{ static_port_bindings|length }}
{% trans "L3Out Interfaces" %} {{ l3out_interfaces|length }}
{% trans "BGP Peers" %} {{ bgp_peers|length }}
{% if static_port_bindings %}

{% trans "Static Port Bindings" %} {{ static_port_bindings|length }}

{% for b in static_port_bindings %} {% endfor %}
{% trans "EPG" %} {% trans "Encap VLAN" %} {% trans "Mode" %} {% trans "Immediacy" %}
{{ b.aci_endpoint_group|linkify }} {{ b.encap_vlan }} {{ b.get_mode_display }} {{ b.get_deployment_immediacy_display }}
{% endif %} {% if subnets %}

{% trans "Reachable Subnets" %} {{ subnets|length }}

{% for s in subnets %} {% endfor %}
{% trans "Subnet" %}
{{ s|linkify }}
{% endif %} {% if provided_contracts or consumed_contracts %}

{% trans "Contracts" %}

{% trans "Provided" %} {% for r in provided_contracts %} {{ r.aci_contract|linkify }}{% if not forloop.last %}, {% endif %} {% empty %}{{ ""|placeholder }}{% endfor %}
{% trans "Consumed" %} {% for r in consumed_contracts %} {{ r.aci_contract|linkify }}{% if not forloop.last %}, {% endif %} {% empty %}{{ ""|placeholder }}{% endfor %}
{% endif %} {% if l3out_interfaces %}

{% trans "L3Out Interfaces" %} {{ l3out_interfaces|length }}

{% for i in l3out_interfaces %} {% endfor %}
{% trans "Interface" %} {% trans "Logical Interface Profile" %} {% trans "IP Address" %}
{{ i|linkify }} {{ i.aci_logical_interface_profile|linkify }} {{ i.ip_address|placeholder }}
{% endif %} {% if bgp_peers %}

{% trans "BGP Peers" %} {{ bgp_peers|length }}

{% for p in bgp_peers %} {% endfor %}
{% trans "Peer Address" %} {% trans "Remote AS" %} {% trans "Local AS" %}
{{ p|linkify }} {{ p.remote_asn }} {{ p.local_asn|placeholder }}
{% endif %}