Generate Production Order Script (tendril-production
)¶
This script generates a production order from a provided
order.yaml
file.
Hint
By default, this script does not register any of its actions. Call the script with the execute flag in order to commit the results to the database.
Hint
The default order folder this script uses / looks in is in the
production workspace of the tendril instance, typically
$HOME/.tendril/scratch/production
.
Warning
The script relies on the following files to manage serial numbers when it is run multiple times :
ORDERFOLDER/snomap.yaml
ORDERFOLDER/wsno
When the first simulated run is executed, the snomap.yaml
file is
created with dummy serial numbers. In order to then generate and
register a real production order, you should delete the snomap.yaml
file.
The wsno
file is created when an old production order is retrived
using tendril-getdox
. This file makes sure if the production order
is regenerated, it uses the same production order serial number.
- When operating on retrieved, old production orders, make sure to not remove the
wsno
file.- When operating on a new production order, make sure to remove any stale
wsno
files that may be in the workspace from a past run.
Hint
It’ll probably be easier to simply wipe the entire production order
folder clean when starting work on a new production order. You can
retain the order.yaml
file to use as a template for the new order,
and get rid of everything else.
See also
Script Usage
Generate production orders and associated documentation.
usage: tendril-production [-h] [--version] [--order-folder [PATH]]
[--order-file [PATH]] [--execute] [--force]
[--verbose]
- Options:
--version show program’s version number and exit --order-folder, -d Path to the order folder. Search location for order files and write location for output files. Defaults to INSTANCE_FOLDER/scratch/production. --order-file Relative path to the order file (yaml) from the order-folder. Defaults to order.yaml --execute, -e Register on the database, publish any/all files. The setting here will override anything in the order file. --force, -f Force execution. Currently applies to Deltas, bypassing DeltaValidationErrors. --verbose, -v Increase output verbosity.
-
tendril.scripts.production.
_get_parser
()[source]¶ Constructs the CLI argument parser for the tendril-production script.