VMware Policy
Author: Wei Zhou, VMware by Broadcom — wei-wz.zhou@broadcom.com This is a community-driven project by a VMware engineer, not an official VMware product. For official VMware developer tools see developer.broadcom.com.
Unified audit logging, policy enforcement, and sanitization for the VMware MCP skill family.
Install
pip install vmware-policy
Usage
from vmware_policy import vmware_tool
@vmware_tool(risk_level="high", sensitive_params=["password"])
def delete_segment(name: str, env: str = "") -> dict:
...
Reporting a failure the tool returns
Most tools signal failure by raising, and @vmware_tool records that. A tool that
instead catches the exception and returns an error payload looks identical to a
successful call — and for a long time was recorded as one, which also meant undo
tokens were written for changes that never happened and the circuit breaker never
saw a failure.
Dict-shaped payloads are now detected automatically. Nothing to do if a tool returns the family shape:
return {"error": msg, "hint": "Run 'vmware-nsx doctor'."} # audited as a failure
A tool whose return type cannot carry that marker — one handing back console text, say — must say so explicitly:
from vmware_policy import report_tool_failure
except Exception as exc:
report_tool_failure(str(exc))
return f"Error: {msg}"
Strings are deliberately not sniffed: skills that return console output can emit text beginning with "Error:" as data, and marking those calls failed would be the same misreport in the opposite direction.
CLI
vmware-audit log --last 20
vmware-audit log --status denied --since 2026-03-28
vmware-audit stats --days 7
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vmware_policy-1.13.0.tar.gz.
File metadata
- Download URL: vmware_policy-1.13.0.tar.gz
- Upload date:
- Size: 164.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0dbd9f9f78233aff885000a6a2bbc19c3bb330c9b51f67a88540468bd0f8399
|
|
| MD5 |
52e3562368c3fb6b3fd48c381dc3fb7f
|
|
| BLAKE2b-256 |
ac3b248bfc8ce8020e7cdfabf6144b56c22a1f3096a90414f0910a50f0a61e92
|
File details
Details for the file vmware_policy-1.13.0-py3-none-any.whl.
File metadata
- Download URL: vmware_policy-1.13.0-py3-none-any.whl
- Upload date:
- Size: 64.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
537f28eb4187889216a57c2e10a91e862ca6c80d82871796ce1932b7247dab34
|
|
| MD5 |
f3b0bc848c522ce49d7500e6be75c72f
|
|
| BLAKE2b-256 |
2402738d97a6b4a0f83f079bde22297ab8cd5152895b92ddbce1eb171782545f
|