Menu

Device Type - Undefined

2020-11-03
2020-11-10
  • Jayson Manaol

    Jayson Manaol - 2020-11-03

    Hi All,

    I have an issue on brand, device type. I had created a new class under infrastructure (using this tutorial https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Aadd-class-sample#add_monitor_class_in_modeltype) in CMDB which is Firewall. But when I tried adding a device type/model and assigned it under firewall, it wont show up when I choose the Sophos brand. Upon checking the device type is listed undefined even though i've choosed the Firewall class. Anyone can help me with this issue?

    Thank you

    --

    I've managed to saved the device type to firewall but the issue still persist, when I click the Brand "Sophos" no model shows up in drop down list.

     

    Last edit: Jayson Manaol 2020-11-04
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2020-11-03

    It reminds me of a bug I once reported to Combodo in their example. Can you share the XML here? (or perhaps the extension on GitHub)?

     
    • Jayson Manaol

      Jayson Manaol - 2020-11-04

      Hi Jeffrey,

      Here's the XML

      <?xml version="1.0" encoding="UTF-8"?>
      <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
        <constants>
        </constants>
        <classes>
          <class id="PCFIFW" _delta="define">
            <parent>DatacenterDevice</parent>
            <properties>
              <category>bizmodel,searchable</category>
              <abstract>false</abstract>
              <key_type>autoincrement</key_type>
              <db_table>pcfifw</db_table>
              <db_key_field>id</db_key_field>
              <db_final_class_field/>
              <naming>
                <format>%1$s</format>
                <attributes>
                  <attribute id="name"/>
                </attributes>
              </naming>
              <display_template/>
              <icon>images/pcfifw.png</icon>
              <reconciliation>
                <attributes>
                  <attribute id="name"/>
                  <attribute id="org_id"/>
                  <attribute id="organization_name"/>
                </attributes>
              </reconciliation>
            </properties>
            <fields>
              <field id="FirmwareVersion" xsi:type="AttributeString">
                <sql>FirmwareVersion</sql>
                <default_value/>
                <is_null_allowed>true</is_null_allowed>
              </field>
              <field id="MacAddress" xsi:type="AttributeString">
                <sql>MacAddress</sql>
                <default_value/>
                <is_null_allowed>true</is_null_allowed>
              </field>
            </fields>
            <methods/>
            <presentation>
              <details>
                <items>
                  <item id="contacts_list">
                    <rank>10</rank>
                  </item>
                  <item id="documents_list">
                    <rank>20</rank>
                  </item>
                  <item id="applicationsolution_list">
                    <rank>35</rank>
                  </item>
                  <item id="physicalinterface_list">
                    <rank>40</rank>
                  </item>
                  <item id="providercontracts_list">
                    <rank>50</rank>
                  </item>
                  <item id="services_list">
                    <rank>60</rank>
                  </item>
                  <item id="col:col1">
                    <rank>70</rank>
                    <items>
                      <item id="fieldset:Server:baseinfo">
                        <rank>10</rank>
                        <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="enclosure_id">
                            <rank>70</rank>
                          </item>
                        </items>
                      </item>
                      <item id="fieldset:Server:moreinfo">
                        <rank>20</rank>
                        <items>
                          <item id="brand_id">
                            <rank>10</rank>
                          </item>
                          <item id="model_id">
                            <rank>20</rank>
                          </item>
                          <item id="FirmwareVersion">
                              <rank>30</rank>
                          </item>
                          <item id="MacAddress">
                            <rank>35</rank>
                          </item>
                          <item id="managementip">
                            <rank>40</rank>
                          </item>
                          <item id="serialnumber">
                            <rank>50</rank>
                          </item>
                        </items>
                      </item>
                    </items>
                  </item>
                  <item id="col:col2">
                    <rank>90</rank>
                    <items>
                      <item id="fieldset:Server:Date">
                        <rank>10</rank>
                        <items>
                          <item id="move2production">
                            <rank>10</rank>
                          </item>
                          <item id="purchase_date">
                            <rank>20</rank>
                          </item>
                          <item id="end_of_warranty">
                            <rank>30</rank>
                          </item>
                        </items>
                      </item>
                      <item id="fieldset:Server:power">
                        <rank>20</rank>
                        <items>
                          <item id="powerA_id">
                            <rank>10</rank>
                          </item>
                          <item id="powerB_id">
                            <rank>20</rank>
                          </item>
                          <item id="redundancy">
                            <rank>30</rank>
                          </item>
                        </items>
                      </item>
                      <item id="fieldset:Server:otherinfo">
                        <rank>30</rank>
                        <items>
                          <item id="description">
                            <rank>10</rank>
                          </item>
                        </items>
                      </item>
                    </items>
                  </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="managementip">
                    <rank>55</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="powerA_id">
                    <rank>100</rank>
                  </item>
                  <item id="powerB_id">
                    <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>
                </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="Model" _delta="must_exist">
            <fields>
              <field id="type" xsi:type="AttributeEnum">
                <values>
                  <value id="PCFIFW" _delta="define">Firewall</value>
                </values>
              </field>
            </fields>
          </class>
        </classes>
        <menus>
        <menu id="ConfigManagementOverview" xsi:type="DashboardMenuNode" _delta="must_exist">
          <definition>
            <cells>
              <cell id="0" _delta="must_exist">
                <dashlets>
                  <dashlet id="101" xsi:type="DashletBadge" _delta="define">
                    <rank>12</rank>
                    <class>PCFIFW</class>
                  </dashlet>
                </dashlets>
              </cell>
            </cells>
          </definition>
        </menu>
        </menus>
      </itop_design>
      

      Thanks

       

      Last edit: Jayson Manaol 2020-11-04
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2020-11-04
    <value id="PCFIFW" _delta="define">Firewall</value>
    

    In current specs, this should be

    <value id="PCFIFW" _delta="define">PCFIFW</value>
    

    Another thing I can think of, is that you'd need to add a dependency in your modules to the iTop module (included in the community edition) in which "model" is defined.

     
    👍
    1
    • Jayson Manaol

      Jayson Manaol - 2020-11-05

      Hi Jeffrey,

      Thanks that fixed the problem! So for me to change the value from PCFIFW to Firewall i just need to add an entry to the extension dictionary right?

       
      • Pierre Goiffon

        Pierre Goiffon - 2020-11-10

        <value id="user-content-PCFIFW" _delta="define">Firewall</value>

        In current specs, this should be

        <value id="user-content-PCFIFW" _delta="define">PCFIFW</value>

        This is because of the filter constraint defined on the PhysicalDevice.model_id field.

        So for me to change the value from PCFIFW to Firewall i just need to add an entry to the extension dictionary right?

        This should work !
        The dict key should be named like Class:<class_name>/Attribute:<attribute_code>/Value:<value>
        There are plenty of examples in the default datamodel, like in datamodels/2.x/itop-config-mgmt/en.dict.itop-config-mgmt.php
        For example Class:PhysicalDevice/Attribute:status/Value:implementation</value></attribute_code></class_name>

         
        • Jayson Manaol

          Jayson Manaol - 2020-11-10

          Thanks Pierre, this solves my problem.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.