<!--
     Server-specific (wickedd binary) configuration file.

     This file sources common configuration options from common.xml.

     Above and beyond this, it defines various extensions, and the
     handling of resolver and other information received from 
     addrconf supplicants like dhcp.

     Note:
       If you want to make changes to this file, consider putting
       your changes into /etc/wicked/server-local.xml instead.
       Otherwise, you may lose your changes when applying future
       maintenance updates.
  -->
<config>
  <include name="common.xml"/>

  <netif-naming-services>
    <!-- This is just an example; the library itself isn't implemented yet -->
    <!--
    <builtin name="biosdevname" library="libwicked-biosname.so" symbol="biosdevname_ns"/>
     -->
  </netif-naming-services>

  <dbus-service interface="org.opensuse.Network.Ethernet">
   <!-- default environment for all calls to this extension script -->
   <putenv name="WICKED_OBJECT_PATH" value="$object-path"/>
   <putenv name="WICKED_INTERFACE_NAME" value="$property:name"/>
   <putenv name="WICKED_INTERFACE_INDEX" value="$property:index"/>
  </dbus-service>

  <dbus-service interface="org.opensuse.Network.Bond">
   <action name="addSlave" command="/etc/wicked/extensions/bonding addSlave" />
   <action name="removeSlave" command="/etc/wicked/extensions/bonding removeSlave" />

   <!-- default environment for all calls to this extension script -->
   <putenv name="WICKED_OBJECT_PATH" value="$object-path"/>
   <putenv name="WICKED_INTERFACE_NAME" value="$property:name"/>
   <putenv name="WICKED_INTERFACE_INDEX" value="$property:index"/>
  </dbus-service>

  <dbus-service interface="org.opensuse.Network.Wireless">
   <!-- default environment for all calls to this extension script -->
   <putenv name="WICKED_OBJECT_PATH" value="$object-path"/>
   <putenv name="WICKED_INTERFACE_NAME" value="$property:name"/>
   <putenv name="WICKED_INTERFACE_INDEX" value="$property:index"/>
  </dbus-service>

  <dbus-service interface="org.opensuse.Network.Firewall">
   <action name="firewallUp" command="/etc/wicked/extensions/firewall up"/>
   <action name="firewallDown" command="/etc/wicked/extensions/firewall down"/>

   <!-- default environment for all calls to this extension script -->
   <putenv name="WICKED_OBJECT_PATH" value="$object-path"/>
   <putenv name="WICKED_INTERFACE_NAME" value="$property:name"/>
   <putenv name="WICKED_INTERFACE_INDEX" value="$property:index"/>
  </dbus-service>

  <dbus-service interface="org.opensuse.Network.Scripts">
   <action name="firewallUp" command="/etc/wicked/extensions/dispatch pre-up"/>
   <action name="networkUp" command="/etc/wicked/extensions/dispatch post-up"/>
   <action name="networkDown" command="/etc/wicked/extensions/dispatch pre-down"/>
   <action name="firewallDown" command="/etc/wicked/extensions/dispatch post-down"/>

   <!-- default environment for all calls to this extension script -->
   <putenv name="WICKED_OBJECT_PATH" value="$object-path"/>
   <putenv name="WICKED_INTERFACE_NAME" value="$property:name"/>
   <putenv name="WICKED_INTERFACE_INDEX" value="$property:index"/>
  </dbus-service>

  <!-- Define the scripts for updating various system settings with
       data obtained from addrconf services, such as dhcp -->
  <system-updater name="hostname">
    <action name="backup" command="/etc/wicked/extensions/hostname backup"/>
    <action name="restore" command="/etc/wicked/extensions/hostname restore"/>
    <action name="install" command="/etc/wicked/extensions/hostname install"/>
    <action name="remove" command="/etc/wicked/extensions/hostname remove"/>
  </system-updater>

  <system-updater name="generic" format="info">
    <action name="install" command="/etc/wicked/extensions/netconfig install"/>
    <action name="remove" command="/etc/wicked/extensions/netconfig remove"/>
    <action name="batch" command="/etc/wicked/extensions/netconfig batch"/>
  </system-updater>

  <teamd>
    <!-- enable/disable teamd support, see wicked-config(5) -->
    <enabled>true</enabled>
  </teamd>

  <!-- server-local.xml permits to overwrite server options -->
  <include name="server-local.xml" optional="true" />
</config>
