Jelajahi Sumber

Add VLANs on Subnet and Physical Interfaces

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2943 a333f486-631f-4898-b8df-5754b55c2be0
etaloc 11 tahun lalu
induk
melakukan
d0bb798c66

+ 316 - 0
datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml

@@ -6458,6 +6458,14 @@
           <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
+        <field id="vlans_list" xsi:type="AttributeLinkedSetIndirect">
+          <linked_class>lnkSubnetToVLAN</linked_class>
+          <ext_key_to_me>subnet_id</ext_key_to_me>
+          <count_min>0</count_min>
+          <count_max>0</count_max>
+          <ext_key_to_remote>vlan_id</ext_key_to_remote>
+          <duplicates/>
+        </field>
       </fields>
       <methods>
         <method id="DisplayBareRelations">
@@ -6534,6 +6542,9 @@
             <item id="description">
               <rank>40</rank>
             </item>
+            <item id="vlans_list">
+              <rank>50</rank>
+            </item>
           </items>
         </details>
         <search>
@@ -6576,6 +6587,204 @@
         </list>
       </presentation>
     </class>
+    <class id="VLAN" _delta="define">
+      <parent>cmdbAbstractObject</parent>
+      <properties>
+        <category>bizmodel,searchable,configmgmt</category>
+        <abstract>false</abstract>
+        <key_type>autoincrement</key_type>
+        <db_table>vlan</db_table>
+        <db_key_field>id</db_key_field>
+        <db_final_class_field/>
+        <naming>
+          <format>%1$s %2$s</format>
+          <attributes>
+            <attribute id="vlan_tag"/>
+          </attributes>
+        </naming>
+        <display_template/>
+        <icon>images/vlan.png</icon>
+        <reconciliation>
+          <attributes>
+            <attribute id="vlan_tag"/>
+            <attribute id="org_id"/>
+            <attribute id="org_name"/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field id="vlan_tag" xsi:type="AttributeString">
+          <sql>vlan_tag</sql>
+          <default_value/>
+          <is_null_allowed>false</is_null_allowed>
+        </field>
+        <field id="description" xsi:type="AttributeText">
+          <sql>description</sql>
+          <default_value/>
+          <is_null_allowed>true</is_null_allowed>
+        </field>
+        <field id="org_id" xsi:type="AttributeExternalKey">
+          <sql>org_id</sql>
+          <target_class>Organization</target_class>
+          <is_null_allowed>false</is_null_allowed>
+          <on_target_delete>DEL_MANUAL</on_target_delete>
+        </field>
+        <field id="org_name" xsi:type="AttributeExternalField">
+          <extkey_attcode>org_id</extkey_attcode>
+          <target_attcode>name</target_attcode>
+        </field>
+        <field id="subnets_list" xsi:type="AttributeLinkedSetIndirect">
+          <linked_class>lnkSubnetToVLAN</linked_class>
+          <ext_key_to_me>vlan_id</ext_key_to_me>
+          <count_min>0</count_min>
+          <count_max>0</count_max>
+          <ext_key_to_remote>subnet_id</ext_key_to_remote>
+          <duplicates/>
+        </field>
+        <field id="physicalinterfaces_list" xsi:type="AttributeLinkedSetIndirect">
+          <linked_class>lnkPhysicalInterfaceToVLAN</linked_class>
+          <ext_key_to_me>vlan_id</ext_key_to_me>
+          <count_min>0</count_min>
+          <count_max>0</count_max>
+          <ext_key_to_remote>physicalinterface_id</ext_key_to_remote>
+          <duplicates/>
+        </field>
+      </fields>
+      <methods>
+      </methods>
+      <presentation>
+        <details>
+          <items>
+            <item id="vlan_tag">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="description">
+              <rank>30</rank>
+            </item>
+            <item id="subnets_list">
+              <rank>40</rank>
+            </item>
+            <item id="physicalinterfaces_list">
+              <rank>50</rank>
+            </item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item id="vlan_tag">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="description">
+              <rank>30</rank>
+            </item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item id="org_id">
+              <rank>10</rank>
+            </item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+    <class id="lnkSubnetToVLAN" _delta="define">
+      <parent>cmdbAbstractObject</parent>
+      <properties>
+        <is_link>1</is_link>
+        <category>bizmodel</category>
+        <abstract>false</abstract>
+        <key_type>autoincrement</key_type>
+        <db_table>lnksubnettovlan</db_table>
+        <db_key_field>id</db_key_field>
+        <db_final_class_field/>
+        <naming>
+          <format>%1$s %2$s</format>
+          <attributes>
+            <attribute id="subnet_id"/>
+            <attribute id="vlan_id"/>
+          </attributes>
+        </naming>
+        <display_template/>
+        <icon/>
+        <reconciliation>
+          <attributes>
+            <attribute id="subnet_id"/>
+            <attribute id="vlan_id"/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field id="subnet_id" xsi:type="AttributeExternalKey">
+          <sql>subnet_id</sql>
+          <target_class>Subnet</target_class>
+          <is_null_allowed>false</is_null_allowed>
+          <on_target_delete>DEL_AUTO</on_target_delete>
+        </field>
+        <field id="subnet_ip" xsi:type="AttributeExternalField">
+          <extkey_attcode>subnet_id</extkey_attcode>
+          <target_attcode>ip</target_attcode>
+        </field>
+        <field id="subnet_name" xsi:type="AttributeExternalField">
+          <extkey_attcode>subnet_id</extkey_attcode>
+          <target_attcode>subnet_name</target_attcode>
+        </field>
+        <field id="vlan_id" xsi:type="AttributeExternalKey">
+          <sql>vlan_id</sql>
+          <target_class>VLAN</target_class>
+          <is_null_allowed>false</is_null_allowed>
+          <on_target_delete>DEL_AUTO</on_target_delete>
+        </field>
+        <field id="vlan_tag" xsi:type="AttributeExternalField">
+          <extkey_attcode>vlan_id</extkey_attcode>
+          <target_attcode>vlan_tag</target_attcode>
+        </field>
+      </fields>
+      <methods/>
+      <presentation>
+        <details>
+          <items>
+            <item id="subnet_id">
+              <rank>10</rank>
+            </item>
+            <item id="vlan_id">
+              <rank>20</rank>
+            </item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item id="subnet_id">
+              <rank>10</rank>
+            </item>
+            <item id="vlan_id">
+              <rank>20</rank>
+            </item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item id="subnet_id">
+              <rank>10</rank>
+            </item>
+            <item id="subnet_name">
+              <rank>20</rank>
+            </item>
+            <item id="vlan_id">
+              <rank>30</rank>
+            </item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+
+
     <class id="NetworkInterface" _delta="define">
       <parent>cmdbAbstractObject</parent>
       <properties>
@@ -6631,6 +6840,7 @@
         </list>
       </presentation>
     </class>
+
     <class id="IPInterface" _delta="define">
       <parent>NetworkInterface</parent>
       <properties>
@@ -6798,6 +7008,14 @@
           <extkey_attcode>connectableci_id</extkey_attcode>
           <target_attcode>name</target_attcode>
         </field>
+        <field id="vlans_list" xsi:type="AttributeLinkedSetIndirect">
+          <linked_class>lnkPhysicalInterfaceToVLAN</linked_class>
+          <ext_key_to_me>physicalinterface_id</ext_key_to_me>
+          <count_min>0</count_min>
+          <count_max>0</count_max>
+          <ext_key_to_remote>vlan_id</ext_key_to_remote>
+          <duplicates/>
+        </field>
       </fields>
       <methods/>
       <presentation>
@@ -6827,6 +7045,9 @@
             <item id="speed">
               <rank>80</rank>
             </item>
+            <item id="vlans_list">
+              <rank>90</rank>
+            </item>
           </items>
         </details>
         <search>
@@ -6869,6 +7090,97 @@
         </list>
       </presentation>
     </class>
+    <class id="lnkPhysicalInterfaceToVLAN" _delta="define">
+      <parent>cmdbAbstractObject</parent>
+      <properties>
+        <is_link>1</is_link>
+        <category>bizmodel</category>
+        <abstract>false</abstract>
+        <key_type>autoincrement</key_type>
+        <db_table>lnkphysicalinterfacetovlan</db_table>
+        <db_key_field>id</db_key_field>
+        <db_final_class_field/>
+        <naming>
+          <format>%1$s %2$s</format>
+          <attributes>
+            <attribute id="physicalinterface_id"/>
+            <attribute id="vlan_id"/>
+          </attributes>
+        </naming>
+        <display_template/>
+        <icon/>
+        <reconciliation>
+          <attributes>
+            <attribute id="physicalinterface_id"/>
+            <attribute id="vlan_id"/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field id="physicalinterface_id" xsi:type="AttributeExternalKey">
+          <sql>physicalinterface_id</sql>
+          <target_class>PhysicalInterface</target_class>
+          <is_null_allowed>false</is_null_allowed>
+          <on_target_delete>DEL_AUTO</on_target_delete>
+        </field>
+        <field id="physicalinterface_name" xsi:type="AttributeExternalField">
+          <extkey_attcode>physicalinterface_id</extkey_attcode>
+          <target_attcode>name</target_attcode>
+        </field>
+        <field id="physicalinterface_device_id" xsi:type="AttributeExternalField">
+          <extkey_attcode>physicalinterface_id</extkey_attcode>
+          <target_attcode>connectableci_id</target_attcode>
+        </field>
+        <field id="physicalinterface_device_name" xsi:type="AttributeExternalField">
+          <extkey_attcode>physicalinterface_id</extkey_attcode>
+          <target_attcode>connectableci_name</target_attcode>
+        </field>
+        <field id="vlan_id" xsi:type="AttributeExternalKey">
+          <sql>vlan_id</sql>
+          <target_class>VLAN</target_class>
+          <is_null_allowed>false</is_null_allowed>
+          <on_target_delete>DEL_AUTO</on_target_delete>
+        </field>
+        <field id="vlan_tag" xsi:type="AttributeExternalField">
+          <extkey_attcode>vlan_id</extkey_attcode>
+          <target_attcode>vlan_tag</target_attcode>
+        </field>
+      </fields>
+      <methods/>
+      <presentation>
+        <details>
+          <items>
+            <item id="physicalinterface_id">
+              <rank>10</rank>
+            </item>
+            <item id="vlan_id">
+              <rank>20</rank>
+            </item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item id="physicalinterface_id">
+              <rank>10</rank>
+            </item>
+            <item id="vlan_id">
+              <rank>20</rank>
+            </item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item id="physicalinterface_id">
+              <rank>10</rank>
+            </item>
+            <item id="vlan_id">
+              <rank>20</rank>
+            </item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+
     <class id="lnkConnectableCIToNetworkDevice" _delta="define">
       <parent>cmdbAbstractObject</parent>
       <properties>
@@ -7795,6 +8107,10 @@
           <rank>2</rank>
           <class>Subnet</class>
         </dashlet>
+        <dashlet id="21" xsi:type="DashletBadge">
+          <rank>2.1</rank>
+          <class>VLAN</class>
+        </dashlet>
         <dashlet id="18" xsi:type="DashletBadge">
           <rank>4</rank>
           <class>BusinessProcess</class>

+ 66 - 0
datamodels/2.x/itop-config-mgmt/en.dict.itop-config-mgmt.php

@@ -1473,6 +1473,48 @@ Dict::Add('EN US', 'English', 'English', array(
 	'Class:Subnet/Attribute:ip+' => '',
 	'Class:Subnet/Attribute:ip_mask' => 'IP Mask',
 	'Class:Subnet/Attribute:ip_mask+' => '',
+	'Class:Subnet/Attribute:vlans_list' => 'VLANs',
+	'Class:Subnet/Attribute:vlans_list+' => '',
+));
+
+//
+// Class: VLAN
+//
+
+Dict::Add('EN US', 'English', 'English', array(
+	'Class:VLAN' => 'VLAN',
+	'Class:VLAN+' => '',
+	'Class:VLAN/Attribute:vlan_tag' => 'VLAN Tag',
+	'Class:VLAN/Attribute:vlan_tag+' => '',
+	'Class:VLAN/Attribute:description' => 'Description',
+	'Class:VLAN/Attribute:description+' => '',
+	'Class:VLAN/Attribute:org_id' => 'Organization',
+	'Class:VLAN/Attribute:org_id+' => '',
+	'Class:VLAN/Attribute:org_name' => 'Organization name',
+	'Class:VLAN/Attribute:org_name+' => 'Common name',
+	'Class:VLAN/Attribute:subnets_list' => 'Subnets',
+	'Class:VLAN/Attribute:subnets_list+' => '',
+	'Class:VLAN/Attribute:physicalinterfaces_list' => 'Physical network interfaces',
+	'Class:VLAN/Attribute:physicalinterfaces_list+' => '',
+));
+
+//
+// Class: lnkSubnetToVLAN
+//
+
+Dict::Add('EN US', 'English', 'English', array(
+	'Class:lnkSubnetToVLAN' => 'Link Subnet / VLAN',
+	'Class:lnkSubnetToVLAN+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_id' => 'Subnet',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_id+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_ip' => 'Subnet IP',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_ip+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_name' => 'Subnet name',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_name+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:vlan_id' => 'VLAN',
+	'Class:lnkSubnetToVLAN/Attribute:vlan_id+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:vlan_tag' => 'VLAN Tag',
+	'Class:lnkSubnetToVLAN/Attribute:vlan_tag+' => '',
 ));
 
 //
@@ -1522,9 +1564,33 @@ Dict::Add('EN US', 'English', 'English', array(
 	'Class:PhysicalInterface/Attribute:connectableci_id+' => '',
 	'Class:PhysicalInterface/Attribute:connectableci_name' => 'Device name',
 	'Class:PhysicalInterface/Attribute:connectableci_name+' => '',
+	'Class:PhysicalInterface/Attribute:vlans_list' => 'VLANs',
+	'Class:PhysicalInterface/Attribute:vlans_list+' => '',
 ));
 
 //
+// Class: lnkPhysicalInterfaceToVLAN
+//
+
+Dict::Add('EN US', 'English', 'English', array(
+	'Class:lnkPhysicalInterfaceToVLAN' => 'Link PhysicalInterface / VLAN',
+	'Class:lnkPhysicalInterfaceToVLAN+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_id' => 'Physical Interface',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_id+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_name' => 'Physical Interface Name',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_name+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_device_id' => 'Device',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_device_id+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_device_name' => 'Device name',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_device_name+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:vlan_id' => 'VLAN',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:vlan_id+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:vlan_tag' => 'VLAN Tag',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:vlan_tag+' => '',
+));
+
+
+//
 // Class: LogicalInterface
 //
 

+ 64 - 0
datamodels/2.x/itop-config-mgmt/fr.dict.itop-config-mgmt.php

@@ -1414,9 +1414,50 @@ Dict::Add('FR FR', 'French', 'Français', array(
 	'Class:Subnet/Attribute:ip+' => '',
 	'Class:Subnet/Attribute:ip_mask' => 'Masque IP',
 	'Class:Subnet/Attribute:ip_mask+' => '',
+	'Class:Subnet/Attribute:vlans_list' => 'VLANs',
+	'Class:Subnet/Attribute:vlans_list+' => '',
 ));
 
 //
+// Class: VLAN
+//
+
+Dict::Add('FR FR', 'French', 'Français', array(
+	'Class:VLAN' => 'VLAN',
+	'Class:VLAN+' => '',
+	'Class:VLAN/Attribute:vlan_tag' => 'VLAN Tag',
+	'Class:VLAN/Attribute:vlan_tag+' => '',
+	'Class:VLAN/Attribute:description' => 'Description',
+	'Class:VLAN/Attribute:description+' => '',
+	'Class:VLAN/Attribute:org_id' => 'Organisation',
+	'Class:VLAN/Attribute:org_id+' => '',
+	'Class:VLAN/Attribute:org_name' => 'Nom organisation',
+	'Class:VLAN/Attribute:org_name+' => 'Common name',
+	'Class:VLAN/Attribute:subnets_list' => 'Subnets',
+	'Class:VLAN/Attribute:subnets_list+' => '',
+	'Class:VLAN/Attribute:physicalinterfaces_list' => 'Interfaces réseaux physiques',
+	'Class:VLAN/Attribute:physicalinterfaces_list+' => '',
+));
+
+//
+// Class: lnkSubnetToVLAN
+//
+
+Dict::Add('FR FR', 'French', 'Français', array(
+	'Class:lnkSubnetToVLAN' => 'Lien Subnet / VLAN',
+	'Class:lnkSubnetToVLAN+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_id' => 'Subnet',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_id+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_ip' => 'Subnet IP',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_ip+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_name' => 'Nom Subnet',
+	'Class:lnkSubnetToVLAN/Attribute:subnet_name+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:vlan_id' => 'VLAN',
+	'Class:lnkSubnetToVLAN/Attribute:vlan_id+' => '',
+	'Class:lnkSubnetToVLAN/Attribute:vlan_tag' => 'VLAN Tag',
+	'Class:lnkSubnetToVLAN/Attribute:vlan_tag+' => '',
+));
+//
 // Class: NetworkInterface
 //
 
@@ -1461,6 +1502,29 @@ Dict::Add('FR FR', 'French', 'Français', array(
 	'Class:PhysicalInterface/Attribute:connectableci_id+' => '',
 	'Class:PhysicalInterface/Attribute:connectableci_name' => 'Nom matériel',
 	'Class:PhysicalInterface/Attribute:connectableci_name+' => '',
+	'Class:PhysicalInterface/Attribute:vlans_list' => 'VLANs',
+	'Class:PhysicalInterface/Attribute:vlans_list+' => '',
+));
+
+//
+// Class: lnkPhysicalInterfaceToVLAN
+//
+
+Dict::Add('FR FR', 'French', 'Français', array(
+	'Class:lnkPhysicalInterfaceToVLAN' => 'Lien Interface réseau / VLAN',
+	'Class:lnkPhysicalInterfaceToVLAN+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_id' => 'Interface réseau',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_id+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_name' => 'Nom interface réseau',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_name+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_device_id' => 'Equipement',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_device_id+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_device_name' => 'Nom équipement',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:physicalinterface_device_name+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:vlan_id' => 'VLAN',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:vlan_id+' => '',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:vlan_tag' => 'VLAN Tag',
+	'Class:lnkPhysicalInterfaceToVLAN/Attribute:vlan_tag+' => '',
 ));
 
 //