<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
  <classes>
    <class id="Rack" _delta="define">
      <parent>PhysicalDevice</parent>
      <properties>
        <category>bizmodel,searchable</category>
        <abstract>false</abstract>
        <key_type>autoincrement</key_type>
        <db_table>rack</db_table>
        <db_key_field>id</db_key_field>
        <db_final_class_field/>
        <naming>
          <attributes>
            <attribute id="name"/>
          </attributes>
        </naming>
        <display_template/>
        <icon>images/rack.png</icon>
        <reconciliation>
          <attributes>
            <attribute id="name"/>
            <attribute id="org_id"/>
            <attribute id="organization_name"/>
            <attribute id="location_id"/>
            <attribute id="location_name"/>
          </attributes>
        </reconciliation>
      </properties>
      <fields>
        <field id="nb_u" xsi:type="AttributeInteger">
          <sql>nb_u</sql>
          <default_value/>
          <is_null_allowed>true</is_null_allowed>
        </field>
        <field id="device_list" xsi:type="AttributeLinkedSet">
          <linked_class>DatacenterDevice</linked_class>
          <ext_key_to_me>rack_id</ext_key_to_me>
          <edit_mode>add_only</edit_mode>
          <count_min>0</count_min>
          <count_max>0</count_max>
        </field>
        <field id="enclosure_list" xsi:type="AttributeLinkedSet">
          <linked_class>Enclosure</linked_class>
          <ext_key_to_me>rack_id</ext_key_to_me>
          <edit_mode>add_only</edit_mode>
          <count_min>0</count_min>
          <count_max>0</count_max>
        </field>
      </fields>
      <methods/>
      <presentation>
        <details>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="brand_id">
              <rank>60</rank>
            </item>
            <item id="model_id">
              <rank>70</rank>
            </item>
            <item id="nb_u">
              <rank>80</rank>
            </item>
            <item id="serialnumber">
              <rank>90</rank>
            </item>
            <item id="asset_number">
              <rank>100</rank>
            </item>
            <item id="move2production">
              <rank>110</rank>
            </item>
            <item id="purchase_date">
              <rank>120</rank>
            </item>
            <item id="end_of_warranty">
              <rank>130</rank>
            </item>
            <item id="description">
              <rank>140</rank>
            </item>
            <item id="contacts_list">
              <rank>150</rank>
            </item>
            <item id="documents_list">
              <rank>160</rank>
            </item>
            <item id="enclosure_list">
              <rank>180</rank>
            </item>
            <item id="device_list">
              <rank>190</rank>
            </item>
            <item id="providercontracts_list">
              <rank>200</rank>
            </item>
            <item id="services_list">
              <rank>210</rank>
            </item>
          </items>
        </details>
        <search>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="brand_id">
              <rank>60</rank>
            </item>
            <item id="model_id">
              <rank>70</rank>
            </item>
            <item id="nb_u">
              <rank>80</rank>
            </item>
            <item id="serialnumber">
              <rank>90</rank>
            </item>
            <item id="asset_number">
              <rank>100</rank>
            </item>
            <item id="move2production">
              <rank>110</rank>
            </item>
            <item id="purchase_date">
              <rank>120</rank>
            </item>
            <item id="end_of_warranty">
              <rank>130</rank>
            </item>
          </items>
        </search>
        <list>
          <items>
            <item id="org_id">
              <rank>10</rank>
            </item>
            <item id="status">
              <rank>20</rank>
            </item>
            <item id="business_criticity">
              <rank>30</rank>
            </item>
            <item id="location_id">
              <rank>40</rank>
            </item>
            <item id="brand_id">
              <rank>50</rank>
            </item>
            <item id="model_id">
              <rank>60</rank>
            </item>
            <item id="nb_u">
              <rank>70</rank>
            </item>
          </items>
        </list>
      </presentation>
    </class>
    <class id="Enclosure" _delta="define">
      <parent>PhysicalDevice</parent>
      <properties>
        <category>bizmodel,searchable</category>
        <abstract>false</abstract>
        <key_type>autoincrement</key_type>
        <db_table>enclosure</db_table>
        <db_key_field>id</db_key_field>
        <db_final_class_field/>
        <naming>
          <attributes>
            <attribute id="name"/>
          </attributes>
        </naming>
        <display_template/>
        <icon>images/enclosure.png</icon>
        <reconciliation>
          <attributes>
            <attribute id="name"/>
            <attribute id="org_id"/>
            <attribute id="organization_name"/>
          </attributes>
        </reconciliation>
      </properties>
      <fields>
        <field id="rack_id" xsi:type="AttributeExternalKey">
          <sql>rack_id</sql>
          <target_class>Rack</target_class>
          <is_null_allowed>false</is_null_allowed>
          <on_target_delete>DEL_MANUAL</on_target_delete>
        </field>
        <field id="rack_name" xsi:type="AttributeExternalField">
          <extkey_attcode>rack_id</extkey_attcode>
          <target_attcode>name</target_attcode>
        </field>
        <field id="nb_u" xsi:type="AttributeInteger">
          <sql>nb_u</sql>
          <default_value/>
          <is_null_allowed>true</is_null_allowed>
        </field>
        <field id="device_list" xsi:type="AttributeLinkedSet">
          <linked_class>DatacenterDevice</linked_class>
          <ext_key_to_me>enclosure_id</ext_key_to_me>
          <edit_mode>add_only</edit_mode>
          <count_min>0</count_min>
          <count_max>0</count_max>
        </field>
      </fields>
      <methods>
        <method id="GetRelationQueries">
          <comment>/**
	 * Placeholder for backward compatibility (iTop &lt;= 2.1.0)
	 * in case an extension attempts to redefine this function...	 
	 */</comment>
          <static>true</static>
          <access>public</access>
          <type>Overload-DBObject</type>
          <code><![CDATA[	public static function GetRelationQueries($sRelCode){return parent::GetRelationQueries($sRelCode);} ]]></code>
        </method>
      </methods>
      <presentation>
        <details>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="rack_id">
              <rank>60</rank>
            </item>
            <item id="brand_id">
              <rank>70</rank>
            </item>
            <item id="model_id">
              <rank>80</rank>
            </item>
            <item id="nb_u">
              <rank>90</rank>
            </item>
            <item id="serialnumber">
              <rank>100</rank>
            </item>
            <item id="asset_number">
              <rank>110</rank>
            </item>
            <item id="move2production">
              <rank>120</rank>
            </item>
            <item id="purchase_date">
              <rank>130</rank>
            </item>
            <item id="end_of_warranty">
              <rank>140</rank>
            </item>
            <item id="description">
              <rank>150</rank>
            </item>
            <item id="contacts_list">
              <rank>160</rank>
            </item>
            <item id="documents_list">
              <rank>170</rank>
            </item>
            <item id="device_list">
              <rank>190</rank>
            </item>
            <item id="providercontracts_list">
              <rank>200</rank>
            </item>
            <item id="services_list">
              <rank>210</rank>
            </item>
          </items>
        </details>
        <search>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="brand_id">
              <rank>60</rank>
            </item>
            <item id="model_id">
              <rank>70</rank>
            </item>
            <item id="serialnumber">
              <rank>80</rank>
            </item>
            <item id="asset_number">
              <rank>90</rank>
            </item>
            <item id="move2production">
              <rank>100</rank>
            </item>
            <item id="purchase_date">
              <rank>110</rank>
            </item>
            <item id="end_of_warranty">
              <rank>120</rank>
            </item>
          </items>
        </search>
        <list>
          <items>
            <item id="org_id">
              <rank>10</rank>
            </item>
            <item id="status">
              <rank>20</rank>
            </item>
            <item id="business_criticity">
              <rank>30</rank>
            </item>
            <item id="location_id">
              <rank>40</rank>
            </item>
            <item id="brand_id">
              <rank>50</rank>
            </item>
            <item id="model_id">
              <rank>60</rank>
            </item>
            <item id="serialnumber">
              <rank>70</rank>
            </item>
          </items>
        </list>
      </presentation>
      <relations>
        <relation id="impacts">
          <neighbours>
            <neighbour id="datacenterdevice">
              <attribute>device_list</attribute>
            </neighbour>
          </neighbours>
        </relation>
      </relations>
    </class>
    <class id="PowerConnection" _delta="define">
      <parent>PhysicalDevice</parent>
      <properties>
        <category>bizmodel,searchable</category>
        <abstract>true</abstract>
        <key_type>autoincrement</key_type>
        <db_table>powerconnection</db_table>
        <db_key_field>id</db_key_field>
        <db_final_class_field/>
        <naming>
          <attributes>
            <attribute id="name"/>
          </attributes>
        </naming>
        <display_template/>
        <icon>images/power-connection.png</icon>
        <reconciliation>
          <attributes>
            <attribute id="name"/>
            <attribute id="org_id"/>
            <attribute id="organization_name"/>
            <attribute id="finalclass"/>
          </attributes>
        </reconciliation>
      </properties>
      <fields/>
      <methods>
        <method id="GetRelationQueries">
          <comment>/**
	 * Placeholder for backward compatibility (iTop &lt;= 2.1.0)
	 * in case an extension attempts to redefine this function...	 
	 */</comment>
          <static>true</static>
          <access>public</access>
          <type>Overload-DBObject</type>
          <code><![CDATA[	public static function GetRelationQueries($sRelCode){return parent::GetRelationQueries($sRelCode);} ]]></code>
        </method>
      </methods>
      <presentation>
        <details>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="brand_id">
              <rank>60</rank>
            </item>
            <item id="model_id">
              <rank>70</rank>
            </item>
            <item id="serialnumber">
              <rank>80</rank>
            </item>
            <item id="asset_number">
              <rank>90</rank>
            </item>
            <item id="move2production">
              <rank>100</rank>
            </item>
            <item id="purchase_date">
              <rank>110</rank>
            </item>
            <item id="end_of_warranty">
              <rank>120</rank>
            </item>
            <item id="description">
              <rank>130</rank>
            </item>
            <item id="contacts_list">
              <rank>140</rank>
            </item>
            <item id="documents_list">
              <rank>150</rank>
            </item>
            <item id="providercontracts_list">
              <rank>160</rank>
            </item>
            <item id="services_list">
              <rank>170</rank>
            </item>
          </items>
        </details>
        <search>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="brand_id">
              <rank>60</rank>
            </item>
            <item id="model_id">
              <rank>70</rank>
            </item>
            <item id="serialnumber">
              <rank>80</rank>
            </item>
            <item id="asset_number">
              <rank>90</rank>
            </item>
            <item id="move2production">
              <rank>100</rank>
            </item>
            <item id="purchase_date">
              <rank>110</rank>
            </item>
            <item id="end_of_warranty">
              <rank>120</rank>
            </item>
          </items>
        </search>
        <list>
          <items>
            <item id="finalclass">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="brand_id">
              <rank>60</rank>
            </item>
            <item id="model_id">
              <rank>70</rank>
            </item>
            <item id="serialnumber">
              <rank>80</rank>
            </item>
          </items>
        </list>
      </presentation>
      <relations>
        <relation id="impacts">
          <neighbours>
            <neighbour id="datacenterdevice">
              <query_down>SELECT DatacenterDevice WHERE powerA_id = :this-&gt;id OR powerB_id = :this-&gt;id</query_down>
              <query_up>SELECT PowerConnection WHERE id = :this-&gt;powerA_id OR id = :this-&gt;powerB_id</query_up>
            </neighbour>
            <neighbour id="pdu">
              <query_down>SELECT PDU WHERE powerstart_id = :this-&gt;id</query_down>
              <query_up>SELECT PowerConnection WHERE id = :this-&gt;powerstart_id</query_up>
            </neighbour>
          </neighbours>
        </relation>
      </relations>
    </class>
    <class id="PowerSource" _delta="define">
      <parent>PowerConnection</parent>
      <properties>
        <category>bizmodel,searchable</category>
        <abstract>false</abstract>
        <key_type>autoincrement</key_type>
        <db_table>powersource</db_table>
        <db_key_field>id</db_key_field>
        <db_final_class_field/>
        <naming>
          <attributes>
            <attribute id="name"/>
          </attributes>
        </naming>
        <display_template/>
        <icon>images/power-connection.png</icon>
        <reconciliation>
          <attributes>
            <attribute id="name"/>
            <attribute id="org_id"/>
            <attribute id="organization_name"/>
          </attributes>
        </reconciliation>
      </properties>
      <fields>
        <field id="pdus_list" xsi:type="AttributeLinkedSet">
          <linked_class>PDU</linked_class>
          <ext_key_to_me>powerstart_id</ext_key_to_me>
          <edit_mode>add_only</edit_mode>
          <count_min>0</count_min>
          <count_max>0</count_max>
        </field>
      </fields>
      <methods/>
      <presentation>
        <details>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="brand_id">
              <rank>60</rank>
            </item>
            <item id="model_id">
              <rank>70</rank>
            </item>
            <item id="serialnumber">
              <rank>80</rank>
            </item>
            <item id="asset_number">
              <rank>90</rank>
            </item>
            <item id="move2production">
              <rank>100</rank>
            </item>
            <item id="purchase_date">
              <rank>110</rank>
            </item>
            <item id="end_of_warranty">
              <rank>120</rank>
            </item>
            <item id="description">
              <rank>130</rank>
            </item>
            <item id="pdus_list">
              <rank>140</rank>
            </item>
            <item id="contacts_list">
              <rank>150</rank>
            </item>
            <item id="documents_list">
              <rank>160</rank>
            </item>
            <item id="providercontracts_list">
              <rank>180</rank>
            </item>
            <item id="services_list">
              <rank>190</rank>
            </item>
          </items>
        </details>
        <search>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="brand_id">
              <rank>60</rank>
            </item>
            <item id="model_id">
              <rank>70</rank>
            </item>
            <item id="serialnumber">
              <rank>80</rank>
            </item>
            <item id="asset_number">
              <rank>90</rank>
            </item>
            <item id="move2production">
              <rank>100</rank>
            </item>
            <item id="purchase_date">
              <rank>110</rank>
            </item>
            <item id="end_of_warranty">
              <rank>120</rank>
            </item>
          </items>
        </search>
        <list>
          <items>
            <item id="org_id">
              <rank>10</rank>
            </item>
            <item id="status">
              <rank>20</rank>
            </item>
            <item id="business_criticity">
              <rank>30</rank>
            </item>
            <item id="location_id">
              <rank>40</rank>
            </item>
            <item id="brand_id">
              <rank>50</rank>
            </item>
            <item id="model_id">
              <rank>60</rank>
            </item>
            <item id="serialnumber">
              <rank>70</rank>
            </item>
          </items>
        </list>
      </presentation>
    </class>
    <class id="PDU" _delta="define">
      <parent>PowerConnection</parent>
      <properties>
        <category>bizmodel,searchable</category>
        <abstract>false</abstract>
        <key_type>autoincrement</key_type>
        <db_table>pdu</db_table>
        <db_key_field>id</db_key_field>
        <db_final_class_field/>
        <naming>
          <attributes>
            <attribute id="name"/>
          </attributes>
        </naming>
        <display_template/>
        <icon>images/pdu.png</icon>
        <reconciliation>
          <attributes>
            <attribute id="name"/>
            <attribute id="org_id"/>
            <attribute id="organization_name"/>
          </attributes>
        </reconciliation>
      </properties>
      <fields>
        <field id="rack_id" xsi:type="AttributeExternalKey">
          <filter><![CDATA[SELECT Rack WHERE location_id= :this->location_id]]></filter>
          <dependencies>
            <attribute id="location_id"/>
          </dependencies>
          <sql>rack_id</sql>
          <target_class>Rack</target_class>
          <is_null_allowed>false</is_null_allowed>
          <on_target_delete>DEL_MANUAL</on_target_delete>
          <allow_target_creation>false</allow_target_creation>
        </field>
        <field id="rack_name" xsi:type="AttributeExternalField">
          <extkey_attcode>rack_id</extkey_attcode>
          <target_attcode>name</target_attcode>
        </field>
        <field id="powerstart_id" xsi:type="AttributeExternalKey">
          <filter><![CDATA[SELECT PowerConnection WHERE id != :this->id AND location_id = :this->location_id]]></filter>
          <dependencies>
            <attribute id="location_id"/>
          </dependencies>
          <sql>powerstart_id</sql>
          <target_class>PowerConnection</target_class>
          <is_null_allowed>true</is_null_allowed>
          <on_target_delete>DEL_MANUAL</on_target_delete>
          <allow_target_creation>false</allow_target_creation>
          <allow_target_creation>false</allow_target_creation>
        </field>
        <field id="powerstart_name" xsi:type="AttributeExternalField">
          <extkey_attcode>powerstart_id</extkey_attcode>
          <target_attcode>name</target_attcode>
        </field>
      </fields>
      <presentation>
        <details>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="rack_id">
              <rank>60</rank>
            </item>
            <item id="powerstart_id">
              <rank>70</rank>
            </item>
            <item id="brand_id">
              <rank>80</rank>
            </item>
            <item id="model_id">
              <rank>90</rank>
            </item>
            <item id="serialnumber">
              <rank>100</rank>
            </item>
            <item id="asset_number">
              <rank>110</rank>
            </item>
            <item id="move2production">
              <rank>120</rank>
            </item>
            <item id="purchase_date">
              <rank>130</rank>
            </item>
            <item id="end_of_warranty">
              <rank>140</rank>
            </item>
            <item id="description">
              <rank>150</rank>
            </item>
            <item id="contacts_list">
              <rank>160</rank>
            </item>
            <item id="documents_list">
              <rank>170</rank>
            </item>
            <item id="providercontracts_list">
              <rank>190</rank>
            </item>
            <item id="services_list">
              <rank>200</rank>
            </item>
          </items>
        </details>
        <search>
          <items>
            <item id="name">
              <rank>10</rank>
            </item>
            <item id="org_id">
              <rank>20</rank>
            </item>
            <item id="status">
              <rank>30</rank>
            </item>
            <item id="business_criticity">
              <rank>40</rank>
            </item>
            <item id="location_id">
              <rank>50</rank>
            </item>
            <item id="powerstart_id">
              <rank>60</rank>
            </item>
            <item id="brand_id">
              <rank>70</rank>
            </item>
            <item id="model_id">
              <rank>80</rank>
            </item>
            <item id="serialnumber">
              <rank>90</rank>
            </item>
            <item id="asset_number">
              <rank>100</rank>
            </item>
            <item id="move2production">
              <rank>110</rank>
            </item>
            <item id="purchase_date">
              <rank>120</rank>
            </item>
            <item id="end_of_warranty">
              <rank>130</rank>
            </item>
          </items>
        </search>
        <list>
          <items>
            <item id="org_id">
              <rank>10</rank>
            </item>
            <item id="status">
              <rank>20</rank>
            </item>
            <item id="business_criticity">
              <rank>30</rank>
            </item>
            <item id="location_id">
              <rank>40</rank>
            </item>
            <item id="brand_id">
              <rank>50</rank>
            </item>
            <item id="model_id">
              <rank>60</rank>
            </item>
            <item id="serialnumber">
              <rank>70</rank>
            </item>
          </items>
        </list>
      </presentation>
      <methods>
        <method id="GetRelationQueries">
          <comment>/**
	 * Placeholder for backward compatibility (iTop &lt;= 2.1.0)
	 * in case an extension attempts to redefine this function...	 
	 */</comment>
          <static>true</static>
          <access>public</access>
          <type>Overload-DBObject</type>
          <code><![CDATA[	public static function GetRelationQueries($sRelCode){return parent::GetRelationQueries($sRelCode);} ]]></code>
        </method>
      </methods>
    </class>
  </classes>
  <menus>
    <menu id="ConfigManagementOverview" xsi:type="DashboardMenuNode" _delta="must_exist">
      <definition>
        <cells>
          <cell id="0" _delta="must_exist">
            <dashlets>
              <dashlet id="21" xsi:type="DashletBadge" _delta="define">
                <rank>1</rank>
                <class>Rack</class>
              </dashlet>
              <dashlet id="22" xsi:type="DashletBadge" _delta="define">
                <rank>2</rank>
                <class>Enclosure</class>
              </dashlet>
              <dashlet id="23" xsi:type="DashletBadge" _delta="define">
                <rank>9</rank>
                <class>PowerConnection</class>
              </dashlet>
            </dashlets>
          </cell>
        </cells>
      </definition>
    </menu>
  </menus>
</itop_design>
