Manage Prefix Mapping Set

Overview

The manage_prefix_mapping_set.pl program supports adding and removal of Prefix Mapping Set data in a deployed N2ACD environment. While the N2ACD Admin GUI supports the bulk addition and removal of Prefix Mapping Set data there are limitations imposed by the HTTPD (Apache) service. This program supports the manipulation of datasets up to and in excess of 100,000 records.

This command line tool supports:

Running manage_prefix_mapping_set.pl --help will show the program usage.

Usage: manage_prefix_mapping_set.pl [OPTION]... [FILE]...

Manage Prefix Mapping Set data.

FILE is required and expected to be a CSV formatted file of Prefix and Mapped Value pairs.

    Configuration
    --jarvis-config = The Jarvis config file for N2ACD-ADMIN.              Default = /etc/jarvis/n2acd-admin.xml
                      Used to setup database connectivity and plugin extension.
    --set-id        = The database ID of the prefix mapping set to perform operations on.

    Manipulation Functions
    --merge              = Perform creation / update processing based on the CSV input file.
    --delete             = Perform delete processing based on the CSV input file.

Common Options

The manage_prefix_mapping_set.pl program expects a FILE to be provided, formatted as a CSV of Prefix and Mapped values.

The following common options may be specified when executing:

Option Type Default Description
--jarvis-config String /etc/jarvis/n2acd-admin.xml The path to the N2ACD Admin configuration file. This is used for database access and re-use of plugins and hooks.
--set-id Integer - [Required] The Prefix Mapping Set ID to perform changes on.
--merge Switch - [One of --merge or delete Required] If provided items in the CSV will be either created or updated from the provided Set ID.
--delete Switch - [One of --merge or delete Required] If provided items in the CSV will be removed from the provided Set ID.

Processing Actions

The manage_prefix_mapping_set.pl program processes CSV files in the following order:

During processing the following files may be generated:

CSV Definition File Format

Before any changes are made the CSV will be validated with results logged out to a text file and the user prompted before continuing.

The basic file format is as follows:

0111111111,0100000000
0222222222,0200000000

Each line in the CSV is a pair of Prefix and Mapped Value.

When operating in --delete mode the Mapped Value property is optional.