Menu

Issue adding Monitor class to iTop 3.0

2022-03-03
2022-04-29
  • Nikola Milanov

    Nikola Milanov - 2022-03-03

    Hi,
    I'm trying to add class Monitor (ref. https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Aadd-class-sample), but get an error at the step with toolkit:

    An error occured while processing the PHP files of the data model:

    Error loading module "add-monitor": /itop_design/classes/class[Monitor] at line 6: parent class 'PhysicalDevice' could not be found - Loaded modules: dictionaries,core,application,add-monitor

    Check the PHP files describing the data model before running the toolkit again !

    Here is the some lines from my datamodel xml file

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
      <constants>
      </constants>
      <classes>
        <class id="Monitor" _delta="define">
          <parent>PhysicalDevice</parent>
          <properties>
    

    Thanks
    Nikola

     

    Last edit: Nikola Milanov 2022-03-03
  • Pierre Goiffon

    Pierre Goiffon - 2022-03-04

    Hello,

    Check the dependencies section of your module.*.php file
    In the tutorial this is specified in Create your customization module

     
  • Nikola Milanov

    Nikola Milanov - 2022-03-04

    Hi Pierre,
    Thank you for the reply.
    When I add the dependencies and start toolkit again I get this on Data Model Consistency:

    Class Organization
    Attribute 'status' (object state) has an allowed value (active) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (inactive) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has a state () which is not an allowed value (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Class Location
    Attribute 'status' (object state) has an allowed value (active) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (inactive) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has a state () which is not an allowed value (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Class Contact
    Attribute 'status' (object state) has an allowed value (active) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (inactive) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has a state () which is not an allowed value (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Class Document
    Attribute 'status' (object state) has an allowed value (draft) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (obsolete) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (published) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has a state () which is not an allowed value (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Class PhysicalDevice
    Attribute 'status' (object state) has an allowed value (implementation) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (obsolete) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (production) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (stock) which is not a known state (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    Attribute 'status' (object state) has a state () which is not an allowed value (You may define its allowed_values property as [new ValueSetEnum('')], or reconsider the list of states)
    ........
    

    Didn't paste the whole text.

    I did something wrong again.

    I can provide more information if needed

     

    Last edit: Nikola Milanov 2022-03-08
  • Pierre Goiffon

    Pierre Goiffon - 2022-03-08

    Please share your whole module code ? As a zip here, or on GitHub or similar ?

     
  • Nikola Milanov

    Nikola Milanov - 2022-03-08

    Here is the archive

    Thanks

     
  • Nikola Milanov

    Nikola Milanov - 2022-03-14

    Hi Pierre,
    Should I try with Toolkit 2?
    Do you think I can continue with these errors?

     

    Last edit: Nikola Milanov 2022-03-14
  • Pierre Goiffon

    Pierre Goiffon - 2022-04-29

    Hello,

    I've just added your extension on some dev instance (support/2.7 branch and support/3.0), no error were thrown neither by the fist setup nor by a toolkit compilation.
    Your problem must be caused by another customization ?
    Try to apply them one by one on a new iTop instance ?

    Also, beware to launch the setup first to install the new module : you won't be able to do that using the toolkit solely.

     

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.