Creating and editing AOC files

Create and edit AOC files to classify unclassified devices or to change the class hierarchy of your topology.

If the discovery process identified an unclassified device, you can classify the device by creating a new AOC file that is specific to the device class to which this device belongs.

You can edit AOCs in either of two ways: update the ncp_class databases, or modify the AOC file definitions:
  • If you want to edit the current AOC definitions by updating the ncp_class database directly, then use the Management Database Access or the OQL Service Provider.
  • If you want to modify the AOC file definitions, then complete the following steps.
  1. Go to the NCHOME/precision/aoc directory.
  2. Back up any files that you want to edit.
  3. Create a text file or edit an existing AOC file by using a text editor.
    Restriction: Only alphanumeric characters and the underscore (_) character may be used for AOC filenames. Any other characters, for example the hyphen (-) are forbidden.
  4. Refer to the AOC syntax and structure in the Active Object Class files reference information to construct or edit your AOC file. Consider adapting an existing AOC file for a similar device type.
  5. To apply the AOC to a particular type of device, you must edit the instantiate rule in the AOC file. Use one of the following methods to restrict the AOC to your chosen device type:
    • If the device type can be uniquely identified by using the EntityOID, then use EntityOID in the instantiate rule. Most of the default AOC files use this method.
    • If the device type can be uniquely identified by using any of the following fields from the workingEntities.finalEntity database table, then use its alias in the instantiate rule.
      Table 1. workingEntities.finalEntity database table mappings
      workingEntities.finalEntity Alias
      m_Name EntityName
      m_ObjectId EntityOID
      m_HaveAccess IsActive
      m_Description Description
      m_EntityType EntityType

      For example, the Tellabs63xx.aoc file uses the alias Description to reference the m_Description field: instantiate_rule = "Description = 'Tellabs 6340_OLD'.

    • If the device type can be uniquely identified using a different field from the workingEntities.finalEntity database table, then specify the field name. For example, the VirtualHost.aoc file uses the ExtraInfo->m_IsVirtualMachine field in the workingEntities.finalEntity database table: instantiate_rule = "ExtraInfo->m_IsVirtualMachine = 1".
  6. If you created a new AOC file, add an insert to the class.classIds database table in the ClassSchema.cfg configuration file.
  7. Edit the startup options for the ncp_class process and set the -read_aocs_from option to ensure that the new or changed AOC files are read.
  8. Restart the ncp_class process after you change the AOC files. After ncp_class is restarted and running, restart the ncp_disco process.
  9. Ensure that a domain-specific version of any new AOC files is present in the NCHOME/precision/aoc directory.
  10. Back up and remove the class cache files in the NCHOME/var/precision directory.

    For example, remove the following cache files:

    Class.Cache.class.activeClasses.NCOMS
    Class.Cache.class.staticClasses.NCOMS
  11. Run a full discovery and check that the results match the changes you made.