Failed to process class 'Model', from '/var/www/html/itop/datamodels/2.x/itop-config-mgmt': Field: 'type', (type: AttributeEnum), missing (or empty) mandatory tag 'code' under the tag 'value'
Hello! I am attempting to change the class "Model" to have an extra type value through a custom extension. However, I am getting the following error when going through the setup wizard to install my extension. I have been able to come up with a simple example that yields the same error. The following are the steps to recreate it:
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)
Class ApplicationSolution
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 BusinessProcess
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 SoftwareInstance
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 Group
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 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 Contract
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 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 Service
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 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 ServiceSubcategory
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 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 VirtualDevice
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)
Class RemoteApplicationConnection
Unknown attribute code 'application' in the list of reconciliation keys (Expecting a value in name, remoteapplicationtype_id, environment, url, actions_list, finalclass, friendlyname, remoteapplicationtype_id_friendlyname)
Class RemoteiTopConnection
Unknown attribute code 'application' in the list of reconciliation keys (Expecting a value in name, remoteapplicationtype_id, environment, url, actions_list, auth_user, auth_pwd, version, finalclass, friendlyname, remoteapplicationtype_id_friendlyname)
Finally, when I attempt to go through the installation wizard, the following error arrizes: Failed to process class 'Model', from '/var/www/html/itop/datamodels/2.x/itop-config-mgmt': Field: 'type', (type: AttributeEnum), missing (or empty) mandatory tag 'code' under the tag 'value'
I hope I have been clear with how to reproduce my error. If I did leave something out, please let me know. 👍
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Model class is defined in the itop-config-mgmt module (datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml), so that should be this one you would add as a dependency to your module.
You did set an XML version 1.6, but as you're on iTop 3.0 you should set a 3.0 XML version. Note this version adds a change in the AttributeEnum type (the one used for the Model.type field). IN your XML you are using the new 3.0 version structure, so this causes the error you're seeing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello! I am attempting to change the class "Model" to have an extra type value through a custom extension. However, I am getting the following error when going through the setup wizard to install my extension. I have been able to come up with a simple example that yields the same error. The following are the steps to recreate it:
uname output: Linux *** 4.15.0-196-generic #207-Ubuntu SMP Thu Oct 27 21:24:58 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
iTop version 3.0.2-1-9957 built on 2022-09-12 14:08:58
MySQL: 5.7.40-0ubuntu0.18.04.1
PHP: 7.4.32
I tried using the up to date ToolKit to see what is wrong with my data model, but I am getting a similar output to https://sourceforge.net/p/itop/discussion/customizing-itop/thread/8203a6f142/ . The following is the actual output when I actually check for consistency with ToolKit:
Finally, when I attempt to go through the installation wizard, the following error arrizes:
Failed to process class 'Model', from '/var/www/html/itop/datamodels/2.x/itop-config-mgmt': Field: 'type', (type: AttributeEnum), missing (or empty) mandatory tag 'code' under the tag 'value'
I hope I have been clear with how to reproduce my error. If I did leave something out, please let me know. 👍
Hello,
The Model class is defined in the itop-config-mgmt module (datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml), so that should be this one you would add as a dependency to your module.
You did set an XML version 1.6, but as you're on iTop 3.0 you should set a 3.0 XML version. Note this version adds a change in the AttributeEnum type (the one used for the Model.type field). IN your XML you are using the new 3.0 version structure, so this causes the error you're seeing.