CLI client for the Cyclops cost and revenue estimation and forecasting engine.
pip install -r requirements.txt
Fill-in the conf.ini file with the
appropriate endpoints and DB credentials.
- Use
rulefor rule management. Use it to add or--deleterules. You will need to specify which instance of the coin--engineto use. Use a rule name to delete a rule and a path to a file containing a rule to add a rule (--targetin both cases). Follow the rule guidelines to create rules and group them into pricing models. - Use
forecastto generate usage records, UDRs, CDRs and bills based on the forecasting models. Read the next section for more details on generating forecasts. - Use
cleanupto delete all forecast records generated by the--targetmodel you specify. You can optionally delete--allrules associated with the model.
In order for a rule to be useful for forecasting it must comply with the following restrictions:
- It must include the name of its parent model in its name. Eg if you are creating a model called 'test1' ensure it is contained in the name of the rule.
- It must have a higher salience than the production rules. This is to ensure it gets checked first. This will not affect real records as long as the next guideline is also followed.
- The rule must check the records that fire it for the name of its forecasting model. Records created by the forecasting engine are tagged in the account and data fields. You can check either one.
There are 3 types of forecast:
singleaccount forecast: A usage and cost estimate for a single--account. You will need to provide the account name, the pricing--modelto be used and the forecast--lengthin days. Usage, charge and billing records are generated automatically.globalforecast: As above, but provides a global estimate that aggregates data from all accounts.patternforecast: Generates a forecast for overall usage for every account.