Operation

This document describes how to operate the Registry Tools software. The following topics can be found in this document:

Note: The command-line examples in this section may have been broken into multiple lines for readability. The commands should be reassembled into a single line prior to execution.

Tool Execution

This software package consists of a set of Python scripts for interacting with a Registry Service instance. This software does have a dependency on the pds.registry package which must be deployed to the local Python environment prior to operation of this software.

extrinsic-slot-replace.py

This script replaces a slot value where the source-string is replaced by the replace-string for a list of extrinsics filtered optionally by Object Type and LID wildcard.

% python extrinsic-slot-replace.py <registry-url> <slot-name> <source-string> <replace-string> [<object-type> [<lid-prefix>]]
        

The following table describes the command-line options available:

Command-Line OptionDescription
registry-urlThe URL of the Registry Service instance (e.g., http://localhost:8080/registry). This option is required.
slot-nameThe name of the slot to have its value replaced.
source-stringThe string in the named slot value to be replaced.
replace-stringThe replacement string.
object-typeThe object type of the extrinsics to be queried (e.g., Product_Collection, Product_Observational, etc.). This option is optional.
lid-prefixA portion of the logical identifier (e.g., urn:nasa:pds:example) to further filter the results. This option is optional.

list-extrinsics.py

This script queries a registry service instance for a list of extrinsics filtered optionally by Object Type and LID wildcard. The extrinsics are listed in CSV format to standard out with fields: lid, version_id, name and status.

% python list-extrinsics.py <registry-url> [<object-type> [<lid-prefix>]]
        

The following table describes the command-line options available:

Command-Line OptionDescription
registry-urlThe URL of the Registry Service instance (e.g., http://localhost:8080/registry). This option is required.
object-typeThe object type of the extrinsics to be queried (e.g., Product_Collection, Product_Observational, etc.). This option is optional.
lid-prefixA portion of the logical identifier (e.g., urn:nasa:pds:example) to further filter the results. This option is optional.

report-extrinsics.py

This script queries a registry service instance and generates a report of the extrinsics registered with that instance.

% python report-extrinsics.py <registry-url>
        

The following table describes the command-line options available:

Command-Line OptionDescription
registry-urlThe URL of the Registry Service instance (e.g., http://localhost:8080/registry). This option is required.

test-extrinsics.py

This script tests the various aspects of creating, putting, retrieving and deleting extrinsics.

% python test-extrinsics.py <registry-url>
        

The following table describes the command-line options available:

Command-Line OptionDescription
registry-urlThe URL of the Registry Service instance (e.g., http://localhost:8080/registry). This option is required.