Turbonomic Report Interface
Reason this release was yanked:
Broken build
Project description
vmt-report: Reporting Helper
vmt-report adds Turbonomic specific handlers for the arbiter data handling package. This enabled Turbonomic API calls to be easily combined and manipulated into standardized output formats such as CSV, and JSON for data export or simple reporting needs.
Installation
pip install vmtreport
Usage
vmt-report installs the appropriate vmtconnect
and credstore
handlers for
connecting to Turbonomic instances using vmt-connect. The JSON config controls most of the behavior of arbiter,
while the process worker handles data manipulation.
Example Script (example.py)
# Dump selected fields from all market actions
import arbiter
import vmtreport
import umsg
# source worker sub-process must accept 3 parameters
def actions(source, config, logger):
umsg.log(f"Retrieving data from {config['resource']}", logger=logger)
res = source.connect().get_actions()
fields = ['createTime', 'actionType', 'details']
return [{x: res[x]} for x in res if x in fields]
if __name__ == '__main__':
report = arbiter.Process('report.config', actions)
report.run()
Example Config (report.config)
{
"sources": [
{
"handler": "vmtconnect",
"resource": "https://localhost",
"authentication": {
"type": "credstore",
"credential": "./credential.credstore",
"keyfile": "./turbo.keyfile"
}
}
],
"outputs": [
{
"handler": "CSV",
"resource": "file:/tmp/{timestamp}-actions.csv"
}
],
"notifications": [
{
"handler": "email",
"on_success": true,
"on_failure": true,
"options": {
"email": {
"from": ["no-reply@turbonomic.com"],
"to": ["user@example.com"],
"subject": "Actions Report for {date}",
"body": "Wasted Storage Report generated on {timestamp}.",
"body_error": "Errors happened: {errors}"
}
}
}
],
"logging": {
"mode": "DEBUG"
},
"process_timeout": 60
}
Documentation
The user guide is a good place to start. Detailed documentation is also available here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for vmtreport-1.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8d03cd8fd8f95e32e9d473435263f5b8b2bd51ae52223d449be48a0a6d5eba0 |
|
MD5 | 6fdfd1cb65a1eca6c04e0ca7a50cecfd |
|
BLAKE2b-256 | 10db71a05e6b82d986a91b72fa8b27e26677a9f5a56a3ddfa6950532f7968170 |