This section describes how a user can utilize the underlying Application Program Interface (API) of the
product-tools
package to develop their own tool. This section also covers how to interpret the exit status values returned by the tool if the user calls the
VTool
class from a script.
The Validation Tool returns an exit status based on the PDS validation results or if an application failure has occurred. This section details what exit status values to expect when the tool is validating a single data product label and when it is validating multiple data product labels in a single run.
Valida
tion Of A Single Data Product
The following table shows what exit values can be returned when the tool validates just one data product label in a single run:
Exit Status Value
|
Meaning
|
0
|
The data product label has passed the PDS validation step.
|
1
|
The data product label has failed or skipped the PDS validation step.
|
-1
|
A tool application error has occurred (invalid command-line option, file cannot be read, etc.)
|
Validation Of Multiple Data Products
The following table shows what exit values can be returned when the tool validates multiple data product labels in a single run:
Exit Status Value
|
Meaning
|
0
|
One of the following has occurred:
-
All data product labels have passed the PDS validation step.
-
Data product labels have passed and skipped the PDS validation step.
|
1
|
One of the following has occurred:
-
One or more of the data product labels has failed the PDS validation step.
-
All data product labels have skipped the validation step.
|
-1
|
A tool application error has occurred (invalid command-line option, file cannot be read, etc.)
|