#!/bin/sh
#
# SNMP Simulator Command Responder invocation script
# Automatically generated from REST API DB data - do not edit!
#
{% if context['labs'] %}
exec snmpsim-command-responder \
  {% for lab in context['labs'] %}
    {% for agent in lab['agents'] %}
      {% for engine in agent['engines'] %}
    --v3-engine-id "{{ engine['engine_id'] }}" \
        {% for user in engine['users'] %}
      --v3-user "{{ user['user'] }}" \
          {% if user['auth_key'] is not none %}
      --v3-auth-key "{{ user['auth_key'] }}" \
      --v3-auth-proto "{{ user['auth_proto'] }}" \
            {% if user['priv_key'] is not none %}
      --v3-priv-key "{{ user['priv_key'] }}" \
      --v3-priv-proto "{{ user['priv_proto'] }}" \
            {% endif %}
          {% endif %}
        {% endfor %}
        {% for endpoint in engine['endpoints'] %}
      --agent-{{ endpoint['protocol'] }}-endpoint "{{ endpoint['address'] }}" \
        {% endfor %}
      --data-dir "{{ agent['data_dir'] }}" \
      {% endfor %}
    {% endfor %}
  {% endfor %}
{% endif %}
