Jump to: navigation, search

Configuration: the Control utility

Use the Billing Data Server (BDS) Control utility (Brsctl.py) to view, create, and modify the current Billing Data Server (BDS) configuration, and to encrypt passwords using existing keys. You can use this utility to import configuration templates, updated with the customer-specific configuration details, into BDS. The utility works with configuration parameters such as tenants, regions, and extract/transform/load watermarks, and runs inside the BDS Docker container. Beginning with release 9.0.004.01, the utility returns an exit code code (0 - success, or 1 - failure) upon completion.

Important
All brsctl.py commands mentioned in this procedure must be executed in configuration mode. For more information, see the Procedure to set configuration mode.

BDS Control utility usage

Usage: python3 brsctl.py <command> [options]
.

The BDS control utility command options are organized into the following groups:

Commands

help Print help screen(s).
template Generate template(s) files for provisioning.
config Add, remove, or list configuration options.
decrypt Decrypt a single or batch of extract or transform files. Available in release 9.0.001.05 and later, this command accepts arguments: brsctl.py decrypt -t <tenant_name> -fe <path to encrypted file or directory> -fd <path to decrypted file or directory>,

where:

  • <tenant_name> is the name of the tenant.
  • <path to encrypted file or directory> is the full path and file name of the file to be decrypted or the directory name if a batch of files are to be decrypted. Retrieves the date from the name of the extract or transform file.
  • <path to decrypted file or directory> is the full path into which to save the decrypted file or a batch of decrypted files. If this path is not configured, the decrypt command automatically creates a directory within the encrypted files directory and stores all the decrypted files there.
tenant Change/list tenant properties.
multi_tenancy Change/list multi_tenancy properties.
region Enable or disable processing for a region.
location Enable or disable processing for a location.
metric Enable or disable processing of a metric.
dataset List or delete provisioned datasets.
units Add, remove, or list business units for specified tenant.
backup Save the configuration to a JSON file.
version Prints the BDS version.
restore Restore a configuration from a JSON file.
encrypt Encrypt a string. Used to encrypt passwords, this command prompts you to enter a password, and prints the corresponding ciphertext.
setup Starts the BDS configuration wizard, which helps you to easily configure BDS.
migrate Migrates configuration information when you upgrade to future releases from release 9.0.003.01 or later. Optionally accepts the key --force-yes, which suppresses the migration confirmation prompt.

To view detailed help for a specific command, use brsctl.py help <command>, where <command> is the name of the command for which to display information.

Template options

-l show list of available templates
-t <template> generate template
-f <filename> save template to file (by default template is printed to stdout)

Configuration options

-l print out current configuration (passwords will be printed in encrypted form)
-i <filename> import filled out template into configuration. If object with the same name already exists, import will fail, unless --force is specified
--init delete existing configuration and re-initialize
--cleanup delete existing configuration, including root node (or configuration file), without re-initializing
--force force import of template, even if object with same name already exists
--force-yes force Y response to confirmation prompts (for --init and --cleanup options)

Tenant options

-l print out list of tenants and their status (enabled/disabled)
-ed [date] show (or set) last successful extract date.
-td [date] show (or set) last successful transform date for all metrics
-ld [date] show (or set) last successful load date for all metrics
-on enable tenant
-off disable tenant (without deleting tenant from configuration)
-d delete tenant from configuration
-f <filename> export specific tenant's configuration as template (requires -t option)
-se [data source] show (or set) the last successful source extract date from all or specific sources such as GIM, GVP RS, and so on. Supported data sources are: 'GIM', 'GVP', 'GIR', and 'CME'.
-sed [date] sets the last successful extract date from all or specific sources such as GIM, GVP RS, and so on (requires -se options).
-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
--force-yes force Y response to confirmation prompts (for -ta and -d options)
Important
Where a date parameter is required, enter it in the format YYYY-MM-DD. For example, brsctl.py tenant -ed 2015-09-24 -t sample_tenant

Multi-tenancy options

-l print out list of multi_tenants and their status (enabled/disabled)
-td [date] show (or set) last successful transform date
-ld [date] show (or set) last successful load date
-on enable multi_tenancy
-off disable multi_tenancy (without deleting multi_tenancy configuration from the configuration file)
-d delete multi_tenancy configuration from the configuration file
-f <filename> export specific multi_tenancy configuration as template (requires -mt option)
-mta apply operation to all multi_tenancy configuration
-mt <multi_tenancy> apply operation to only one multi_tenancy configuration
--force-yes force Y response to confirmation prompts (for -mta and -d options)
Important
Where a date parameter is required, enter it in the format YYYY-MM-DD. For example, brsctl multi_tenancy -ed 2015-09-24 -t sample_multi_tenancy
Important
Beginning with release 100.0.006.000x, the Multi-tenancy options replace the Reseller options.

Region options

-l list available regions
-on <region> enable region
-off <region> disable region
-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
--force-yes force Y response to confirmation prompts (for -ta option)

Location options

-l list available locations
-on <location> enable location
-off <location> disable location
-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
--force-yes force Y response to confirmation prompts (for -ta option)

Metric options

-l list available metrics
-on enable metric
-off disable metric
-d delete metric
-ma apply operation to all metrics
-m <metric> apply operation only to one metric
-p <parameter_name> -pv <parameter_value> add additional parameter (for example, mediatype) and its value(s) for the seats_third_party metric. If there are multiple values for a parameter, you can list them in a comma-separated format. For example,
./brsctl.py metric -m seats_third_party -t TenantName -p mediatype -pv media_type_value
-p <parameter_name> -pd delete the parameter added for the seats_third_party metric. For example,
./brsctl.py metric -m seats_third_party -t TenantName -p mediatype -pd
-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
-mta apply operation to all multi_tenants
-mt <multi_tenancy> apply operation only to one multi_tenant
--force-yes force Y response to confirmation prompts (for -ta and -ma options)
Important
Where a date parameter is required, enter it in the format YYYY-MM-DD. For example, brsctl.py metric -td 2015-09-24 -ma -t sample_tenant

Dataset options

-l list available datasets

Units options

-t <tenant> mandatory parameter, specify tenant to apply operation to
-l list business units, configured for tenant
-u <unit_name> apply operation only to one business unit
-ua apply operation to all business units (available only -off operation)
-a add business unit to list of existing units
-d remove specified business unit from list of available

Backup options

-f <filename> specify name of the file to backup to
-w <filename> backup only watermarks of the tenants

 

Version options

-v prints the actual BDS version

  Restore options

-f <filename> specify name of the file to restore from
--force-yes force Y response to confirmation prompt
Important
The Restore option overwrites any current configuration.
This page was last edited on October 17, 2022, at 13:19.
Comments or questions about this documentation? Contact us for support!