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

<creole>
    <files>
        <!-- le service nginx est déclaré dans 28_eoleflask.xml -->
        <service_access service='nginx'>
            <port service_accesslist="wpad">80</port>
        </service_access>
        <file filelist="wpad" name='/etc/nginx/sites-enabled/wpad' source='nginx.wpad' rm="True"/>
        <file filelist='wpad' name="/var/www/wpad.eth0" mode='644' mkdir='True' rm="True"/>
        <file filelist='wpad' name="/var/www/wpad.eth1" mode='644' mkdir='True' rm="True"/>
        <file filelist='wpad' name="/var/www/wpad.eth2" mode='644' mkdir='True' rm="True"/>
        <file filelist='wpad' name="/var/www/wpad.eth3" mode='644' mkdir='True' rm="True"/>
        <file filelist='wpad' name="/var/www/wpad.eth4" mode='644' mkdir='True' rm="True"/>
    </files>

    <variables>
        <family name='services'>
            <variable name='activer_wpad' type="oui/non" description="Activer le support de WPAD">
                <value>oui</value>
            </variable>
        </family>
        <family name='wpad' icon='code-fork'>
            <variable name="wpad_domains" type="domain_strict" description="Nom de domaine du service WPAD" mandatory="True" multi="True"/>
        </family>

        <family name='Interface-0'>
            <variable name="wpad_proxyport_eth0" type="port" description="Port du proxy diffusé par WPAD" mode="expert" mandatory="True">
                <value>3128</value>
            </variable>
            <variable name="wpad_proxyport_vlan_eth0" type="port" description="Port du proxy diffusé par WPAD pour ce VLAN" mode="expert" mandatory="True"/>
            <variable name="wpad_proxyport_alias_eth0" type="port" description="Port du proxy diffusé par WPAD pour cet alias" mode="expert" mandatory="True"/>
        </family>
        <family name='Interface-1'>
            <variable name="wpad_proxyport_eth1" type="port" description="Port du proxy diffusé par WPAD" mode="expert" mandatory="True">
                <value>3128</value>
            </variable>
            <variable name="wpad_proxyport_vlan_eth1" type="port" description="Port du proxy diffusé par WPAD pour ce VLAN" mode="expert" mandatory="True"/>
            <variable name="wpad_proxyport_alias_eth1" type="port" description="Port du proxy diffusé par WPAD pour cet alias" mode="expert" mandatory="True"/>
        </family>
        <family name='Interface-2'>
            <variable name="wpad_proxyport_eth2" type="port" description="Port du proxy diffusé par WPAD" mode="expert" mandatory="True">
                <value>3128</value>
            </variable>
            <variable name="wpad_proxyport_vlan_eth2" type="port" description="Port du proxy diffusé par WPAD pour ce VLAN" mode="expert" mandatory="True"/>
            <variable name="wpad_proxyport_alias_eth2" type="port" description="Port du proxy diffusé par WPAD pour cet alias" mode="expert" mandatory="True"/>
        </family>
        <family name='Interface-3'>
            <variable name="wpad_proxyport_eth3" type="port" description="Port du proxy diffusé par WPAD" mode="expert" mandatory="True">
                <value>3128</value>
            </variable>
            <variable name="wpad_proxyport_vlan_eth3" type="port" description="Port du proxy diffusé par WPAD pour ce VLAN" mode="expert" mandatory="True"/>
            <variable name="wpad_proxyport_alias_eth3" type="port" description="Port du proxy diffusé par WPAD pour cet alias" mode="expert" mandatory="True"/>
        </family>
        <family name='Interface-4'>
            <variable name="wpad_proxyport_eth4" type="port" description="Port du proxy diffusé par WPAD" mode="expert" mandatory="True">
                <value>3128</value>
            </variable>
            <variable name="wpad_proxyport_vlan_eth4" type="port" description="Port du proxy diffusé par WPAD pour ce VLAN" mode="expert" mandatory="True"/>
            <variable name="wpad_proxyport_alias_eth4" type="port" description="Port du proxy diffusé par WPAD pour cet alias" mode="expert" mandatory="True"/>
        </family>

        <family name='exceptions proxy'>
            <!-- exceptions localHostOrDomainIs -->
            <variable name='nom_host_wpad_exclude' type='string' description="Ne pas passer par le proxy pour l'hôte ou le domaine" multi="True"/>
            <variable name='nom_host_interface_wpad_exclude' type='string' description="Interface(s) concernée(s)"/>
        </family>

        <separators>
            <separator name='nom_host_wpad_exclude'>Exceptions d'hôte ou de domaine spécifiques à WPAD</separator>
            <separator name='wpad_proxyport_eth0'>Configuration de la détection automatique du proxy</separator>
            <separator name='wpad_proxyport_eth1'>Configuration de la détection automatique du proxy</separator>
            <separator name='wpad_proxyport_eth2'>Configuration de la détection automatique du proxy</separator>
            <separator name='wpad_proxyport_eth3'>Configuration de la détection automatique du proxy</separator>
            <separator name='wpad_proxyport_eth4'>Configuration de la détection automatique du proxy</separator>
        </separators>
    </variables>

    <constraints>
        <check name='valid_enum' target='nom_host_interface_wpad_exclude'>
            <param>['Toutes','1','2','3','4']</param>
        </check>
        <condition name='disabled_if_not_in' source='nombre_interfaces' >
            <param>2</param>
            <param>3</param>
            <param>4</param>
            <param>5</param>
            <target type='variable'>nom_host_interface_wpad_exclude</target>
        </condition>
        <condition name='disabled_if_not_in' source='activer_wpad'>
            <param>oui</param>
            <target type='filelist'>wpad</target>
            <target type='service_accesslist'>wpad</target>
            <target type='family'>wpad</target>
            <target type='variable'>wpad_proxyport_eth0</target>
            <target type='variable'>wpad_proxyport_vlan_eth0</target>
            <target type='variable'>wpad_proxyport_alias_eth0</target>
            <target type='variable'>wpad_proxyport_eth1</target>
            <target type='variable'>wpad_proxyport_vlan_eth1</target>
            <target type='variable'>wpad_proxyport_alias_eth1</target>
            <target type='variable'>wpad_proxyport_eth2</target>
            <target type='variable'>wpad_proxyport_vlan_eth2</target>
            <target type='variable'>wpad_proxyport_alias_eth2</target>
            <target type='variable'>wpad_proxyport_eth3</target>
            <target type='variable'>wpad_proxyport_vlan_eth3</target>
            <target type='variable'>wpad_proxyport_alias_eth3</target>
            <target type='variable'>wpad_proxyport_eth4</target>
            <target type='variable'>wpad_proxyport_vlan_eth4</target>
            <target type='variable'>wpad_proxyport_alias_eth4</target>
            <target type='variable'>nom_host_wpad_exclude</target>
            <target type='variable'>nom_host_interface_wpad_exclude</target>
        </condition>
        <condition name='disabled_if_not_in' source='nombre_interfaces' >
            <param>1</param>
            <target type='variable'>wpad_proxyport_eth0</target>
            <target type='variable'>wpad_proxyport_vlan_eth0</target>
            <target type='variable'>wpad_proxyport_alias_eth0</target>
        </condition>
        <group master='nom_host_wpad_exclude'>
            <slave>nom_host_interface_wpad_exclude</slave>
        </group>
        <group master='vlan_id_eth0'>
            <slave>wpad_proxyport_vlan_eth0</slave>
        </group>
        <group master='alias_ip_eth0'>
            <slave>wpad_proxyport_alias_eth0</slave>
        </group>
        <group master='vlan_id_eth1'>
            <slave>wpad_proxyport_vlan_eth1</slave>
        </group>
        <group master='alias_ip_eth1'>
            <slave>wpad_proxyport_alias_eth1</slave>
        </group>
        <group master='vlan_id_eth2'>
            <slave>wpad_proxyport_vlan_eth2</slave>
        </group>
        <group master='alias_ip_eth2'>
            <slave>wpad_proxyport_alias_eth2</slave>
        </group>
        <group master='vlan_id_eth3'>
            <slave>wpad_proxyport_vlan_eth3</slave>
        </group>
        <group master='alias_ip_eth3'>
            <slave>wpad_proxyport_alias_eth3</slave>
        </group>
        <group master='vlan_id_eth4'>
            <slave>wpad_proxyport_vlan_eth4</slave>
        </group>
        <group master='alias_ip_eth4'>
            <slave>wpad_proxyport_alias_eth4</slave>
        </group>
        <fill name='calc_val' target='wpad_domains'>
            <param type='eole' name='valeur'>nom_domaine_local</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_vlan_eth0'>
            <param type='eole' name='valeur'>wpad_proxyport_eth0</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_alias_eth0'>
            <param type='eole' name='valeur'>wpad_proxyport_eth0</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_vlan_eth1'>
            <param type='eole' name='valeur'>wpad_proxyport_eth1</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_alias_eth1'>
            <param type='eole' name='valeur'>wpad_proxyport_eth1</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_vlan_eth2'>
            <param type='eole' name='valeur'>wpad_proxyport_eth2</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_alias_eth2'>
            <param type='eole' name='valeur'>wpad_proxyport_eth2</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_vlan_eth3'>
            <param type='eole' name='valeur'>wpad_proxyport_eth3</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_alias_eth3'>
            <param type='eole' name='valeur'>wpad_proxyport_eth3</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_vlan_eth4'>
            <param type='eole' name='valeur'>wpad_proxyport_eth4</param>
        </fill>
        <fill name='calc_val' target='wpad_proxyport_alias_eth4'>
            <param type='eole' name='valeur'>wpad_proxyport_eth4</param>
        </fill>
    </constraints>

    <help>
        <family name='wpad'>Paramètrage de la découverte automatique du proxy</family>
        <variable name='activer_wpad'>WPAD est un protocole qui permet la découverte automatique du proxy par les navigateurs</variable>
        <variable name='nom_host_wpad_exclude'>Les exclusions associées sont générées avec la fonction localHostOrDomainIs()</variable>
    </help>
</creole>
<!-- vim: ts=4 sw=4 expandtab
-->
