<!--
     Infiniband Service definition
  -->
<service name="infiniband" interface="org.opensuse.Network.Infiniband" object-class="netif-infiniband">

  <define name="configuration" class="dict" description="Infiniband interface configuration">

    <mode      type="builtin-infiniband-mode"
               description="Infiniband IPoIB connection mode"/>
    <multicast type="builtin-infiniband-umcast"
               description="Infiniband IPoIB user multicasts policy"/>

  </define>

  <define name="properties" class="dict" extends="infiniband:configuration">

    <!-- read-only on ib-parent -->
    <pkey type="uint16" description="Infiniband partition key"/>

  </define>

  <method name="changeDevice">
    <arguments>
      <config type="infiniband:configuration">
        <meta:mapping document-node="/infiniband" />
      </config>
    </arguments>
  </method>
</service>

<service name="infiniband-child" interface="org.opensuse.Network.InfinibandChild" object-class="netif-infiniband-child">

  <define name="configuration"  class="dict" extends="infiniband:configuration"
          description="Infiniband child interface configuration">

    <device type="string" description="Infiniband parent / lower device reference">
      <meta:netif-reference shared="true"/>
      <meta:require check="netif-config-state" op="newDevice" min-state="device-setup" />
      <meta:require check="netif-config-state" op="linkUp" min-state="device-up" />
      <meta:require check="netif-system-state" op="linkDown" max-state="firewall-up" />
      <meta:require check="netif-system-state" op="deleteDevice" max-state="device-down" />
    </device>

    <pkey type="uint16" description="Infiniband partition key"/>

  </define>

  <define name="properties" type="infiniband-child:configuration">
    <!-- Add more info properties here -->
  </define>

  <method name="changeDevice">
    <arguments>
      <config type="infiniband-child:configuration">
        <meta:mapping document-node="/infiniband:child" />
      </config>
    </arguments>
  </method>

  <method name="deleteDevice" />
</service>

<service name="infiniband-child-factory" interface="org.opensuse.Network.InfinibandChild.Factory" object-class="netif-list">

  <method name="newDevice">
    <arguments>
      <name type="string"/>
      <config type="infiniband-child:configuration">
        <meta:mapping document-node="/infiniband:child"/>
      </config>
    </arguments>
    <return>
      <!-- this is really an object handle -->
      <string/>
    </return>
  </method>
</service>
