# Polkadot Zombienet Environment Configuration
# Generated by provisioning system

ZOMBIENET_VERSION={{ polkadot_zombienet.version }}
ZOMBIENET_RUN_USER={{ polkadot_zombienet.run_user.name }}
ZOMBIENET_RUN_GROUP={{ polkadot_zombienet.run_user.group }}
ZOMBIENET_RUN_USER_HOME={{ polkadot_zombienet.run_user.home }}
ZOMBIENET_WORK_PATH={{ polkadot_zombienet.work_path }}
ZOMBIENET_CONFIG_PATH={{ polkadot_zombienet.config_path }}
ZOMBIENET_BIN_PATH={{ polkadot_zombienet.bin_path }}
ZOMBIENET_BINARY={{ polkadot_zombienet.zombienet_binary }}

# Zombienet Paths
ZOMBIENET_NETWORKS_PATH={{ polkadot_zombienet.networks_path }}
ZOMBIENET_BINARIES_PATH={{ polkadot_zombienet.binaries_path }}
ZOMBIENET_LOGS_PATH={{ polkadot_zombienet.logs_path }}

# Settings Configuration
ZOMBIENET_TIMEOUT={{ polkadot_zombienet.settings.timeout }}
{% if polkadot_zombienet.settings.node_spawn_timeout is defined %}
ZOMBIENET_NODE_SPAWN_TIMEOUT={{ polkadot_zombienet.settings.node_spawn_timeout }}
{% endif %}
ZOMBIENET_PROVIDER={{ polkadot_zombienet.settings.provider }}
ZOMBIENET_ENABLE_TRACING={{ polkadot_zombienet.settings.enable_tracing | default(false) | lower }}
ZOMBIENET_BACKCHANNEL={{ polkadot_zombienet.settings.backchannel | default(true) | lower }}

# Relay Chain Configuration
ZOMBIENET_RELAYCHAIN_CHAIN={{ polkadot_zombienet.relaychain.chain }}
{% if polkadot_zombienet.relaychain.default_image is defined %}
ZOMBIENET_RELAYCHAIN_IMAGE={{ polkadot_zombienet.relaychain.default_image }}
{% endif %}
{% if polkadot_zombienet.relaychain.default_command is defined %}
ZOMBIENET_RELAYCHAIN_COMMAND={{ polkadot_zombienet.relaychain.default_command }}
{% endif %}

# Provider Specific Configuration
{% if polkadot_zombienet.settings.provider == "kubernetes" and polkadot_zombienet.kubernetes_config is defined %}
ZOMBIENET_K8S_NAMESPACE={{ polkadot_zombienet.kubernetes_config.namespace | default("zombienet") }}
ZOMBIENET_K8S_MONITORING={{ polkadot_zombienet.kubernetes_config.monitoring | default(true) | lower }}
{% if polkadot_zombienet.kubernetes_config.prometheus_prefix is defined %}
ZOMBIENET_K8S_PROMETHEUS_PREFIX={{ polkadot_zombienet.kubernetes_config.prometheus_prefix }}
{% endif %}
{% endif %}

{% if polkadot_zombienet.settings.provider == "podman" and polkadot_zombienet.podman_config is defined %}
ZOMBIENET_PODMAN_MONITORING={{ polkadot_zombienet.podman_config.monitoring | default(true) | lower }}
{% if polkadot_zombienet.podman_config.monitoring_port is defined %}
ZOMBIENET_PODMAN_MONITORING_PORT={{ polkadot_zombienet.podman_config.monitoring_port }}
{% endif %}
{% endif %}

{% if polkadot_zombienet.settings.provider == "native" and polkadot_zombienet.native_config is defined %}
ZOMBIENET_NATIVE_MONITORING={{ polkadot_zombienet.native_config.monitoring | default(false) | lower }}
{% endif %}

# Logging Configuration
ZOMBIENET_LOG_LEVEL={{ polkadot_zombienet.log_level }}

# Network Configuration
ZOMBIENET_RELAYCHAIN_NODES="{{ polkadot_zombienet.relaychain.nodes | length }}"
ZOMBIENET_PARACHAINS_COUNT="{{ polkadot_zombienet.parachains | length }}"