<?xml version="1.0" encoding="utf-8"?>
<creole>

    <files>

        <service servicelist='opennebula-gate'>opennebula-gate</service>
        <file filelist='onegate' name='/etc/one/onegate-server.conf' rm='True'/>
        <file filelist='onegate' name='/etc/systemd/system/opennebula-gate.service.d/one-dep.conf' source='onegate-systemd-dep.conf' mkdir='True' rm='True'/>
        <file filelist='onegate' name='/etc/nginx/upstream.d/onegate.conf' source='onegate-nginx-upstream.conf' rm='True'/>

    </files>

    <variables>

        <family name='services'>

            <variable name='activer_onegate' type='oui/non' description="Activer le service OpenNebula Gate" mode='expert'>
                <value>non</value>
            </variable>

        </family>

        <family name='Virtualisation'>

            <variable name='onegate_ip' type='ip' description="Adresse IP d'écoute du service OpenNebula Gate" mode='expert'>
                <value>127.0.0.1</value>
            </variable>

            <variable name='onegate_port' type='number' description="Numéro de port d'écoute du service OpenNebula Gate" mode='expert'>
                <value>5030</value>
            </variable>

        </family>

        <separators>
            <separator name='onegate_ip'>Configuration du service OpenNebula Gate</separator>
        </separators>

    </variables>

    <constraints>

        <condition name='disabled_if_in' source='activer_onegate'>
            <param>non</param>
            <target type='servicelist'>opennebula-gate</target>
            <target type='filelist'>onegate</target>
            <target type='variable'>onegate_ip</target>
            <target type='variable'>onegate_port</target>
        </condition>

    </constraints>

    <help>
        <variable name='activer_onegate'>OpenNebula Gate permet aux machines virtuelles de communiquer avec OpenNebula. Utile en combinaison avec OneFlow.</variable>
    </help>

</creole>
