# Migrating configuration files

With agmon, all information for all boards was specified in a single AG configuration file. With NMS OAM utilities, a system configuration file contains a list of managed components in the system (boards or software modules, such as an EMC). For each managed component, a list is specified of parameters and values to configure that component. Most of the parameters for boards are usually listed in separate keyword files referenced in the system configuration file.

The syntax of these files is very different from the syntax of an AG configuration file. Parameters are still specified as keyword name and value pairs (for example, AutoStart = YES). However, struct keywords (containing multiple values) and array keywords (containing multiple indexed values) are now supported. These keywords are often specified using a special shorthand notation.

Keyword names are as consistent as possible across board families.

For more information about system configuration files, refer to Creating a system configuration file. For more information about keyword files, see Using board keyword files. For more information about NMS OAM equivalents for specific AG configuration file keywords, refer to the board documentation.

## ag2oam

The ag2oam utility included with NMS OAM translates AG configuration files into system configuration files and keyword files that oamsys can process. To use ag2oam:

Step | Action
1 | Go through the AG configuration file and determine the product type for each board number. For example, Board 0 = AG 2000 T1; Board 1 = AG 2000 T1; Board 2 = AG 4000C T1.
2 | Enter: ag2oam [options] where options are:
Option | Description
--- | ---
-c | Duplicates in the output files any comments it finds in the original file. If this option is not specified, comment lines are omitted.
-f filename | Specifies the name (and path, if necessary) of AG configuration file to translate. Default is ag.cfg. If no path is specified, ag2oam searches first in the current directory and then in the paths specified with the AGLOAD environment variable.
-p[m[..n]=] product | Specifies the AG product type for board(s) m...n. This option can appear on the command line as many times as necessary. If you do not specify board numbers, the specified product types are used for all boards. Refer to Displaying board product types for more information.
-? | Displays the Help screen and terminates.
-h | Displays the Help screen and terminates.
For example, with the configuration listed in step 1, enter: ag2oam -f myfile.cfg -p0..1=AG_2000_T1 -p2=AG_4000C_T1 If the operation is successful, ag2oam returns without a message. ag2oam outputs the following files, in the same path as the source file: A system configuration file, listing all boards from the AG configuration file. This file is named oldname_oamsys.cfg, where oldname is the name of the AG configuration file, minus the extension. For example: myfile_oamsys.cfg One or more keyword files, one for each board listed in the AG configuration file. This file is named oldname_Board_n.cfg, where oldname is the name of the AG configuration file, minus the extension, and n is the number of the board as it appeared in the AG configuration file. For example: myfile_Board_0.cfg

The keyword file for each board is appropriately referenced in the system configuration file, in the section describing the board.

Note: ag2oam assumes that the input AG configuration file is valid. If errors exist in the input file, in most cases they will be propagated in the output files.