get_pricing.py

Use the get_pricing.py script to compile a pricing plan into a version that can be loaded into the engine.

The compiled version can be a standalone pricing XML file or a ZIP file that has:

  • The pricing XML file.
  • All catalog items used to compile the XML file.
  • Pricing file header information.
  • The mtx_config.xml file used during compilation.

The compiled file is saved to the local directory where the get_pricing.py script is run.

Syntax

/opt/mtx/bin/get_pricing.py [-h] filename URL username password domain [date]

Options

-h, --help
Displays help information at the command line.
filename
The name of the compiled pricing file. This name must include the appropriate file extension, .xml or .zip.
URL
The HTTP web address for the pricing compiler on the My MATRIXX host server.
You can compile three types of pricing configuration files: a standalone XML file, a development ZIP file, and a production ZIP file. The ZIP files contain more files containing error, versioning, and history information.
The standalone XML file and the development ZIP file are based off of the workspace of the user compiling the ZIP file and can contain local modifications known only to that workspace. Unless the user has performed an SVN update, the compiled pricing file might not contain the latest updates from other users' workspaces. The production is based off of the files in the pricing domain and uses the latest revisions of the pricing files checked into SVN. It does not contain any changed files in the user's local workspace if they have not been checked in. The compiler URLs are:
  • Standalone XML: http://ip_address:8082/matrixx/data/admin/compile
  • Development ZIP: http://ip_address:8082/matrixx/data/admin/compilejar
  • Production ZIP: http://ip_address:8082/matrixx/data/admin/productionjar
where IP address is the IP address of the My MATRIXX host server.
Note: In deployments where an Nginx Ingress router with configured forwarding based on a matching URL prefix is deployed and uses port 8080 exposed to outside an engine cluster, port 8080 with /matrixx/ as the first part of the URL is routed to port 8082 on a node within the cluster.
username
The My MATRIXX login name of the user whose workspace is used to compile the pricing plan.
password
The My MATRIXX password for the username specified.
domain
The name of the pricing domain in the user's workspace that has the pricing configuration file to compile.
date
An optional parameter that enables you to specify the number of old pricing revisions to compile into the configuration file. This parameter overrides the configuration setting in My MATRIXX for compiling revisions. The value is an ISO date in the format yyyy-mm-ddThh:mm:ss that specifies what date from which to produce a pricing file. All revisions that became inactive before this date are filtered out. A pricing revision is active until its next revision starts.

Examples

Compile a standalone XML pricing file:
/opt/mtx/bin/get_pricing.py mtx_pricing_Sample_guest.xml http://localhost:8082/matrixx/data/admin/compile guest guest Sample
Compile a development version of the pricing ZIP file:
/opt/mtx/bin/get_pricing.py mtx_pricing_Sample_guest.zip http://localhost:8082/matrixx/data/admin/compilejar guest guest Sample
Compile a production version of the pricing ZIP file:
/opt/mtx/bin/get_pricing.py mtx_pricing_Sample_admin.zip http://localhost:8082/matrixx/data/admin/productionjar admin admin Sample