{% extends "base.html" %} {% load i18n %} {% load static %} {% load bootstrap_icons %} {% block title %}{% trans "Network" %} - {{ pool }}{% endblock %} {% block page_heading %}{{ compute.name }} - {% trans "Network" %}: {{ pool }}{% endblock page_heading %} {% block page_heading_extra %} {# the network's own actions: starting or stopping it, the others in a menu #}
{% csrf_token %} {% if state %} {% else %} {% endif %}
{% endblock page_heading_extra %} {% block content %} {% include "computes/host_nav.html" with section="networks" detail=True %}
{% trans "Network" %}
{% if external %}
{% bs_icon 'info-circle' %} {% trans "The VMs on this network take their addresses from the outside network: libvirt gives none." %}
{% else %}
{% for ip in ip_networks %}
{% if ip.family == "ipv6" %}IPv6{% else %}IPv4{% endif %} {% if ip.range %} {# a running network keeps its range: libvirt changes it while it is stopped #} {% endif %}
  • {% trans "Subnet" %}{{ ip.subnet|default:"–" }}
  • {% trans "Host's address" %}{{ ip.address }}
  • {% trans "DHCP" %} {% if ip.range %}{{ ip.range.0 }} – {{ ip.range.1 }} {% elif ip.dhcp %}{% trans "Fixed addresses only" %} {% else %}{% trans "Off" %}{% endif %}
{% empty %}
{% trans "The network has no address of the host: its VMs reach each other only." %}
{% endfor %} {% if ip_networks and "ipv6" not in families %}
IPv6
{% trans "The network has no IPv6 address; the XML definition below can give it one." %}
{% endif %}
{% trans "Fixed addresses" %} {% if fixed_addresses %} {% endif %} {% if dhcp_networks %} {% endif %}
{% if fixed_addresses %}
{% for host in fixed_addresses %} {% endfor %}
{% trans "Address" %} {% trans "MAC / DUID" %} {% trans "Name" %} {% trans "Actions" %}
{{ host.ip }} {{ host.mac|default:host.id|default:"–" }} {{ host.name|default:"–" }}
{% elif dhcp_networks %}
{% trans "No fixed addresses: every VM gets one from the DHCP range." %}
{% else %}
{% trans "The network serves no DHCP, so it has no fixed addresses." %}
{% endif %}
{% if dhcp_networks %}
{% trans "DHCP leases" %} {% if leases %}{{ leases|length }}{% endif %}
{% if leases_error %}
{% blocktrans with error=leases_error %}The leases could not be read: {{ error }}{% endblocktrans %}
{% elif leases %}
{% for lease in leases %} {% endfor %}
{% trans "Address" %} {% trans "MAC / DUID" %} {% trans "Host name" %} {% trans "VM" %} {% trans "Ends" %} {% trans "Actions" %}
{{ lease.ip }} {% if lease.fixed %}{% trans "Fixed" %}{% endif %} {{ lease.key|default:"–" }} {{ lease.hostname|default:"–" }} {% if lease.vm.id %} {{ lease.vm.name }} {% else %} {{ lease.vm.name|default:"–" }} {% endif %} {% if lease.expires %}
{% blocktrans with time=lease.expires|timeuntil %}in {{ time }}{% endblocktrans %}
{{ lease.expires|date:"Y-m-d H:i" }}
{% else %} {% trans "Never" %} {% endif %}
{# a lease kept as a fixed address: the dialog of a new one, filled in #} {% if not lease.fixed and lease.key and lease.ip_index is not None %} {% endif %}
{% elif state %}
{% trans "No current DHCP leases." %}
{% else %}
{% trans "The network is not running, so it gives no leases." %}
{% endif %}
{% endif %} {% endif %}
{% trans "VMs on this network" %}
{% if vms %} {% else %}
{% trans "No VM is defined on this network." %}
{% endif %}
{% if qos_supported %}
{% trans "Bandwidth limits" %} {% if qos.items|length < 2 %} {% endif %}
{% if qos %}
{% for direction, limit in qos.items %} {% if direction == "inbound" %}{% trans "inbound" as direction_name %}{% else %}{% trans "outbound" as direction_name %}{% endif %} {% endfor %}
{% trans "Direction" %} {% trans "Average" %} {% trans "Peak" %} {% trans "Burst" %} {% trans "Actions" %}
{% if direction == "inbound" %}{% trans "Inbound" %}{% else %}{% trans "Outbound" %}{% endif %} {% if limit.average %}{{ limit.average }} KiB/s{% else %}–{% endif %} {% if limit.peak %}{{ limit.peak }} KiB/s{% else %}–{% endif %} {% if limit.burst %}{{ limit.burst }} KiB{% else %}–{% endif %}
{% csrf_token %}
{% else %}
{% trans "No limits: the network's VMs share the host's bandwidth freely." %}
{% endif %} {% if state %} {% endif %}
{% endif %}

{% csrf_token %}

{% trans "The saved definition: a running network takes a change when it is stopped and started again." %}

{# one dialog for every fixed address: Add opens it empty, a row's Edit with its entry, which stays on its subnet #} {% if dhcp_networks %} {% endif %} {% if qos_supported %} {% endif %} {% endblock %} {% block script %} {% if fixed_addresses %}{% endif %} {% endblock %}