7 Working with Automatic Discrepancy Resolution

This chapter explains how to design a discrepancy detection action that allows Oracle Communications Network Integrity to automatically resolve specific types of discrepancies.

About Automatic Discrepancy Resolution

Automatic discrepancy resolution enables Network Integrity to automatically resolve specific discrepancies without the user having to interact with the UI. Discrepancies are resolved as part of the discrepancy detection scan.

Network Integrity identifies automatically resolved discrepancies. In the scan results, automatically resolved discrepancies have the value autoResolve in the Submitted By and Resolved By columns.

The NetworkIntegritySDK cartridge project contains an abstract action that makes up the framework for automatic discrepancy resolution.

Using the Design Studio for Integrity feature, extend cartridges that detect discrepancies with the abstract automatic discrepancy resolution action. Oracle Communications Design Studio creates the framework implementation for you to complete.

You can complete the implementation by creating either a custom processor or with a properties file.

After you deploy your cartridges with the new implementation into the run-time application, users of Network Integrity can configure scans that automatically resolve all the discrepancies matching the implementation you created.

About the Automatic Discrepancy Resolution Solution

This section describes the components that make up the automatic discrepancy resolution framework. Also, this section identifies reference implementations that you can use as examples to help create your own solution.

Action and Processors

The NetworkIntegritySDK cartridge project contains an abstract discrepancy detection action called Auto Resolve Discrepancies. This abstract action contains the framework for automatic discrepancy resolution.

The Auto Resolve Discrepancies action has the following processors:

  • Check Auto Resolution Selected: this processor verifies whether a scan is configured with the Auto Resolve Discrepancies option enabled. If enabled, this processor sets a flag to run the next processors.

  • Identify Auto Resolving Discrepancies: this processor identifies the discrepancies that match the customized implementation.

  • Prepare Resolving Discrepancies: this processor puts all the identified discrepancies in the DISCREPANCY_SUBMITTED state.

The automatic discrepancy resolution implementation can be completed with either a custom processor or with a properties file. If you complete the implementation with a custom processor, you must create a new discrepancy detection processor in the action that extends the Auto Resolve Discrepancies action.

Figure 7-1 illustrates the processor workflow of the automatic discrepancy resolution solution. The DD Processor for Java Implementation processor is not required for an implementation that uses a properties file.

Figure 7-1 Auto Resolve Discrepancies Processor Workflow

Description of Figure 7-1 follows
Description of "Figure 7-1 Auto Resolve Discrepancies Processor Workflow"

Scan Parameter Groups and the Network Integrity UI

NetworkIntegritySDK contains a scan parameter group called AutoResolutionParameter. This scan parameter group adds the Auto Resolve Discrepancies check box to the Network Integrity UI Scan Configuration screen.

Reference Implementations

The Network Integrity MSS Integration cartridge demonstrates a complete reference implementation of automatic discrepancy resolution using a custom processor and a properties file.

The Network Integrity Optical UIM Integration cartridge demonstrates a complete reference implementation of automatic discrepancy resolution using a custom processor.

The Network Integrity Optical TMF814 CORBA cartridge includes the AutoResolutionParameter scan parameter group.

Implementing Automatic Discrepancy Resolution

This section assumes that you already have valid, deployable cartridges that perform discovery, import, and discrepancy detection, to which you are adding automatic discrepancy resolution.

If your existing cartridge solution is made up of unsealed cartridges, see "Implementing Automatic Discrepancy Resolution in an Unsealed Cartridge Solution".

If your existing cartridge solution contains one or more sealed cartridges, see "Implementing Automatic Discrepancy Resolution in a Sealed Cartridge Solution".

Implementing Automatic Discrepancy Resolution in an Unsealed Cartridge Solution

See the Design Studio for Network Integrity Help for information about any of the steps in this section.

To implement automatic discrepancy resolution when working with unsealed cartridges:

  1. In your cartridge with a fully implemented discrepancy detection action:

    • Add the abstract Auto Resolve Discrepancies action from NetworkIntegritySDK as a processor to a discrepancy detection action.

    • Move the processors belonging to Auto Resolve Discrepancies to the end of the Action Processors list.

  2. In your cartridge with a fully implemented import or discovery action, add the AutoResolutionParameter scan parameter group.

    Add the scan parameter group to the action that is the result source for discrepancy detection action.

  3. Complete and customize the implementation for automatic discrepancy resolution. See "Completing the Automatic Discrepancy Resolution Implementation" for more information.

  4. Save and close all files.

  5. Build, deploy, and test your cartridge.

Implementing Automatic Discrepancy Resolution in a Sealed Cartridge Solution

See the Design Studio for Network Integrity Help for information about any of the steps in this section.

To implement automatic discrepancy resolution when working with a sealed cartridge:

  1. Create a new cartridge.

  2. Add the following dependencies to the new cartridge:

    • All sealed and unsealed cartridges being extended by the new cartridge

      Note:

      The new cartridge needs to extend a discovery action and a discrepancy detection action. These actions may belong to one or more cartridges. At least one of these cartridges is sealed.
    • ora_ni_uim_device

    • NetworkIntegritySDK

    • Address Handler

  3. Create a new discovery action in the new cartridge.

  4. For the new discovery action:

    • Specify IPAddressHandler as the address handler.

    • Specify Device as the result category.

    • Add discoveryAction as a processor.

      Where discoveryAction is a discovery action from another cartridge.

    • Add the AutoResolutionParameter scan parameter group.

    • Add or create any additional scan parameter groups required to configure the new discovery action.

  5. Create a new discrepancy detection action in the new cartridge.

  6. For the new discrepancy detection action:

    • Add ddAction as a processor.

      Where ddAction is a discrepancy detection action from another cartridge that uses the result source from discoveryAction.

    • Add the abstract Auto Resolve Discrepancies action as a processor.

    • Move the processors belonging to Auto Resolve Discrepancies to the end of the Action Processors list.

    • Specify the new discovery action as the result source.

  7. For the discrepancy resolution action whose result source is ddAction, add the new discrepancy detection action as a result source.

  8. Complete and customize the automatic discrepancy resolution implementation for the new cartridge. See "Completing the Automatic Discrepancy Resolution Implementation" for more information.

  9. Save and close all files.

  10. Build, deploy, and test your cartridge.

Completing the Automatic Discrepancy Resolution Implementation

You can complete the automatic discrepancy resolution implementation in the following ways:

Completing Automatic Discrepancy Resolution Using a Properties File

Create a file called autoResolve.properties in the /src directory in the cartridge with the automatic discrepancy resolution action. Use this properties file to configure the discrepancies that can be automatically resolved.

The autoResolve.properties file is a list of property/value pairs. The accepted properties are:

  • extraEntities, for resolving extra entity discrepancies.

  • missingEntities, for resolving missing entity discrepancies.

  • mismatches, for resolving attribute value mismatch discrepancies.

  • extraAssociation, for resolving extra association discrepancies.

  • missingAssociation, for resolving missing association discrepancies.

See "About Discrepancy Types" for more information about discrepancies.

The properties file uses the following syntax:

property=res_label1:entity_type1[spec_name1:attrib_list1|spec_name2:attrib_list2]{}...

where:

  • property is one of the accepted properties. Each property can appear once in the properties file. Each property can specify multiple resolution labels, entity types, specification names, and attribute lists.

  • res_label is the resolution label you want Network Integrity to use to resolve the discrepancy. You can specify multiple resolution labels to resolve discrepancies to different inventory systems.

  • entity_type is a type of entity (for example, an Equipment or a Physical Device entity).

  • spec_name is the specification for the entity type. You can omit spec_name if the same resolution label applies to all specifications for the entity type.

  • attrib_list is a comma-separated list of attributes on the entity or specification to be resolved.

Example 7-1 demonstrates an automatic discrepancy resolution implementation completed using a properties:

Example 7-1 Sample autoResolve.properties File

extraEntities=Correct in MSS:Equipment[tmf814EquipmentGeneric]{}Correct in UIM:PhysicalDevice[cisco3640|cisco7206VXR]
missingEntities=Correct in MSS:Equipment{}Correct in UIM:PhysicalDevice[cisco3640]
mismatches=Correct in MSS:Equipment[:serialNumber]{}Correct in UIM:PhysicalDevice[cisco3640:softwareVer,serialNumber|cisco7206VXR:hardwareRev]
extraAssociations=Correct in UIM:LogicalDevice

Example 7-1 demonstrates a properties file that does all of the following:

  • The line starting with extraEntities resolves in MSS all extra entity discrepancies on equipment entities with the tmf814EquipmentGeneric specification, and resolves in UIM all extra entity discrepancies on physical device entities with the cisco3640 or cisco7206VXR specifications.

  • The line starting with missingEntities resolves in MSS all missing entity discrepancies on equipment, and resolves in UIM all missing entity discrepancies on physical device entities with the cisco3640 specification.

  • The line starting with mismatches resolves in MSS all serial number attribute value mismatch discrepancies on equipment entities, and resolves in UIM all software version and serial number attribute value mismatch discrepancies on physical device entities with the cisco3640 specification, and all hardware revision attribute value mismatch discrepancies on physical device entities with the cisco7206VXR specification.

  • The line starting with extraAssociation resolves in UIM all extra association discrepancies on logical device entities.

See the reference implementation properties file in the MSS Integration cartridge to use as a starting point. The reference properties file includes comments, examples, syntax, and tips to help you complete your implementation.

Completing Automatic Discrepancy Resolution with a Custom Processor

See the Design Studio for Network Integrity Help for information about any of the steps in this section.

To implement automatic discrepancy resolution with a custom processor:

  1. In the action that contains the Auto Resolve Discrepancies action, create a new discrepancy detection processor.

  2. Move the new processor after the Check Auto Resolution Selected processor.

  3. Add autoResolutionManager as an input parameter for the new discrepancy detection processor.

  4. Create and complete the implementation class for the new discrepancy detection processor.

    See the reference implementation class from the Optical UIM Integration cartridge to use as a starting point. The reference implementation class includes comments, examples, syntax, and tips to help you complete your own implementation.