Jump to: navigation, search

The Control Utility

Brsctl.py is a tool used primarly to view, create, and modify current BDS configuration. Also it has additional funtionality such as passwords encryption using existing keys. It operates with configuration parameters such as tenants, regions, extract/transform/load watermarks and so on.

This utility will be used by users to import configuration templates updated with the customer-specific configuration details into the BDS.

Billing Data Server (BDS) Control Tool

usage: brsctl <command> [options]

Commands:

        help        print help screen(s)

        template    generate template(s) files for provisioning

        config      add/remove/list configuration options

        tenant      change/list tenant properties

        reseller    change/list reseller properties

        region      enable/disable processing for a region

        location    enable/disable processing for a location

        metric      enable/disable processing of a metric

        dataset     list/delete provisioned datasets

        backup      save configuration to a JSON file

        restore     restore configuration from a JSON file

        encrypt     encrypt a string

        reload_files     reload transform files for given date or today

          Use brsctl help <command> to get detailed help for specific command

 

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)

 

Config 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)

        -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)

        Where date parameter is needed, the format is YYYY-MM-DD, e.g. 'brsctl tenant -ed 2015-09-24 -t sample_tenant'

 

Reseller options:

        -l              print out list of resellers 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 reseller

        -off            disable reseller (without deleting reseller from configuration)

        -d              delete reseller from configuration

        -f <filename>   export specific reseller's configuration as template (requires -r option)

        -ra             apply operation to all resellers

        -r <reseller>   apply operation only to one reseller

        --force-yes     force Y response to confirmation prompts (for -ra and -d options)

 

        Where date parameter is needed, the format is YYYY-MM-DD, e.g. 'brsctl reseller -ed 2015-09-24 -t sample_reseller'

 

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

        -ma             apply operation to all metrics

        -m <metric>     apply operation only to one metric

        -ta             apply operation to all tenants

        -t <tenant>     apply operation only to one tenant

        -ra             apply operation to all resellers

        -r <reseller>     apply operation only to one reseller

        --force-yes     force Y response to confirmation prompts (for -ta and -ma options)

        Where date parameter is needed, the format is YYYY-MM-DD, e.g. 'brsctl metric -td 2015-09-24 -ma -t sample_tenant'

 

Dataset options:

        -l              list available datasets

        -d              delete dataset

        --force-yes     force Y response to confirmation prompts (for -ta and -ma options)

Backup options:

        -f <filename>   specify name of the file to backup to

 

Restore options:

        -f <filename>   specify name of the file to restore from

        --force-yes     force Y response to confirmation prompt

        Note that restore operation will overwrite any current configuration!

 

Reload files option:

        -ta             apply operation to all tenants

        -t <tenant>     apply operation only to one tenant

        -ra             apply operation to all resellers

        -r <reseller>   apply operation only to one resellers

        -td [date]      show (or set) last successful target date. Default for today.

 

       Where date parameter is needed, the format is YYYY-MM-DD, e.g. 'brsctl reload_files -td 2015-09-24'

        WARNING: RELOADING FILES THAT WERE ALREADY LOADED MAY CAUSE DUPLICATES ON IT SIDE.

        SHOULD ALWAYS BE COORDINATED WITH AN IT DEPARTMENT!

 

Encrypt:

        Encrypt command will prompt for password and print out corresponding ciphertext

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 28 March 2018, at 13:00.