Mini Shell

Direktori : /opt/saltstack/salt/lib/python3.10/site-packages/salt/templates/virt/
Upload File :
Current File : //opt/saltstack/salt/lib/python3.10/site-packages/salt/templates/virt/libvirt_chardevs.jinja

{% macro chardev(dev) -%}
  {% if dev.type == "unix" -%}
  <source mode="bind" path="{{ dev.path }}"/>
  {% elif dev.type in ["udp", "tcp"] -%}
  <source mode="bind" host="{{ dev.get('host', '0.0.0.0') }}" service="{{ dev.port }}"
    {% if dev.get('tls') is not none %}tls="{{'yes' if dev.tls else 'no'}}"{% endif %}/>
  {% elif dev.type in ["pipe", "dev", "pty", "file"] and dev.path -%}
  <source path="{{ dev.path }}"/>
  {%- endif %}
  {% if dev.type == "tcp" -%}
  <protocol type="{{ dev.protocol }}"/>
  {%- endif %}
  {% if "target_port" in dev or "target_type" in dev -%}
  <target port="{{ dev.get('target_port', 0) }}" {% if dev.target_type %}type="{{ dev.target_type }}"{% endif %}/>
  {%- endif %}
{%- endmacro %}

Zerion Mini Shell 1.0