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.
Metadata
Release files for vmtreport 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vmtreport-2.1.0.tar.gz | 20.2 kB | Without provenance | Details for vmtreport-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vmtreport-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for vmtreport-2.1.0-py3-none-any.whl |
Total release size: 45.7 kB
Release files / vmtreport-2.1.0.tar.gz
| Download URL | vmtreport-2.1.0.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfe721f660f63e8eb132890e889de02bd70170970a05735c6dc77acf93cf5c2c
|
|
BLAKE2b-256 checksum How to use checksums |
65ecfdb13ff45b7caae9a3d3e0bfeb981a91dea37294cd0f69deb59e27feb3e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.3
|
Release files / vmtreport-2.1.0-py3-none-any.whl
| Download URL | vmtreport-2.1.0-py3-none-any.whl |
|---|---|
| Size | 25.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0343cdfe2cefd549d3d64f0775583689322ed3b77de52765400cbd1f8e9c46e8
|
|
BLAKE2b-256 checksum How to use checksums |
459534c234bfd40ebcab863c2de05b4dd17d665a8204bc57ff3899b194e9ab3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.3
|
Security for vmtreport 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.