VMWare-reporter
===============
Interact easily with your VMWare clusters.
## Installation
VMWare-reporter package is published [on PyPI](https://pypi.org/project/vmware-reporter/):
```sh
pip install vmware-reporter
```
Optionaly, use specifier `[excel]` to also install dependencies for reading and writing Excel files:
```sh
pip install vmware-reporter[excel]
```
## Configuration
Create file `C:\Users\$USER\AppData\Local\vmware-reporter\vmware-reporter.conf` (`/home/$USER/.config/vmware-reporter/vmware-reporter.conf` on Linux).
Example:
```ini
[vmware-reporter]
host = myvcenter.example.org
user = reporter@vsphere.local
password = ...
no_ssl_verify = True
```
Several environments may be distinguished. Example for two environments named `ENV1` and `ENV2`:
```ini
[vmware-reporter:ENV1]
host = myvcenter.env1.example.org
user = reporter@vsphere.local
password = ...
no_ssl_verify = True
[vmware-reporter:ENV2]
host = myvcenter.env2.example.org
user = reporter@vsphere.local
password = ...
no_ssl_verify = True
```
## Usage examples
See also [full documentation](https://ipamo.net/vmware-reporter) (including [API reference](https://ipamo.net/vmware-reporter/latest/api-reference.html)).
VMWare-reporter may be used as a library in your Python code:
```py
from vmware_reporter import VCenterClient
with VCenterClient() as vcenter:
for vm in vcenter.iterate_objs('vm'):
print(vm.name)
```
VMWare-reporter may also be invoked as a command-line application (the `vmware-reporter` executable is installed with the package). Examples:
- Export inventory of VMWare managed objects to a YAML file:
```sh
vmware-reporter inventory
```
- Export all available information about VMWare managed objects to JSON files:
```sh
vmware-reporter dump
```
- Reconfigure VMs (mass operation): copy template [vms_reconfigure.xlsx](https://ipamo.net/vmware-reporter/latest/_static/templates/vms_reconfigure.xlsx) to `data/vms_reconfigure.xlsx`, fill-in this file, then:
```sh
vmware-reporter vm reconfigure
```
- If you use several environments, put files in `data/ENV1/` instead of `data/` and specify environment on the command line. Example:
```sh
vmware-reporter -e ENV1 vm reconfigure
```
Complete help about command-line usage may be displayed by typing:
```sh
vmware-reporter --help
```
## Run every day (using a systemd timer)
Copy [vmware-reporter.service](https://ipamo.net/vmware-reporter/latest/_static/vmware-reporter.service), [vmware-reporter.timer](https://ipamo.net/vmware-reporter/latest/_static/vmware-reporter.timer) and [notify-email@.service](https://ipamo.net/vmware-reporter/latest/_static/notify-email@.service)
in `/etc/systemd/system` and adapt them to your configuration.
Run:
sudo systemctl daemon-reload
sudo systemctl enable vmware-reporter.timer
sudo systemctl start vmware-reporter.timer
## Credits
This library leverages [pyvmomi](https://github.com/vmware/pyvmomi), the vSphere API Python bindings provided by VMWare.
## Legal
This project is licensed under the terms of the [MIT license](https://raw.githubusercontent.com/ipamo/vmware-reporter/main/LICENSE.txt).
This project is not affiliated in any way with VMWare or Broadcom.
Raw data
{
"_id": null,
"home_page": null,
"name": "vmware-reporter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "vmware, vsphere, vm, reporter",
"author": null,
"author_email": "S\u00e9bastien Hocquet <dev@ipamo.net>",
"download_url": null,
"platform": null,
"description": "VMWare-reporter\n===============\n\nInteract easily with your VMWare clusters.\n\n\n## Installation\n\nVMWare-reporter package is published [on PyPI](https://pypi.org/project/vmware-reporter/):\n\n```sh\npip install vmware-reporter\n```\n\nOptionaly, use specifier `[excel]` to also install dependencies for reading and writing Excel files:\n\n```sh\npip install vmware-reporter[excel]\n```\n\n## Configuration\n\nCreate file `C:\\Users\\$USER\\AppData\\Local\\vmware-reporter\\vmware-reporter.conf` (`/home/$USER/.config/vmware-reporter/vmware-reporter.conf` on Linux).\n\nExample:\n\n```ini\n[vmware-reporter]\nhost = myvcenter.example.org\nuser = reporter@vsphere.local\npassword = ...\nno_ssl_verify = True\n```\n\nSeveral environments may be distinguished. Example for two environments named `ENV1` and `ENV2`:\n\n```ini\n[vmware-reporter:ENV1]\nhost = myvcenter.env1.example.org\nuser = reporter@vsphere.local\npassword = ...\nno_ssl_verify = True\n\n[vmware-reporter:ENV2]\nhost = myvcenter.env2.example.org\nuser = reporter@vsphere.local\npassword = ...\nno_ssl_verify = True\n```\n\n\n## Usage examples\n\nSee also [full documentation](https://ipamo.net/vmware-reporter) (including [API reference](https://ipamo.net/vmware-reporter/latest/api-reference.html)).\n\nVMWare-reporter may be used as a library in your Python code:\n\n```py\nfrom vmware_reporter import VCenterClient\nwith VCenterClient() as vcenter:\n for vm in vcenter.iterate_objs('vm'):\n print(vm.name)\n```\n\nVMWare-reporter may also be invoked as a command-line application (the `vmware-reporter` executable is installed with the package). Examples:\n\n- Export inventory of VMWare managed objects to a YAML file:\n\n```sh\nvmware-reporter inventory\n```\n\n- Export all available information about VMWare managed objects to JSON files:\n\n```sh\nvmware-reporter dump\n```\n\n- Reconfigure VMs (mass operation): copy template [vms_reconfigure.xlsx](https://ipamo.net/vmware-reporter/latest/_static/templates/vms_reconfigure.xlsx) to `data/vms_reconfigure.xlsx`, fill-in this file, then:\n\n```sh\nvmware-reporter vm reconfigure\n```\n\n- If you use several environments, put files in `data/ENV1/` instead of `data/` and specify environment on the command line. Example:\n\n```sh\nvmware-reporter -e ENV1 vm reconfigure\n```\n\nComplete help about command-line usage may be displayed by typing:\n\n```sh\nvmware-reporter --help\n```\n\n\n## Run every day (using a systemd timer)\n\nCopy [vmware-reporter.service](https://ipamo.net/vmware-reporter/latest/_static/vmware-reporter.service), [vmware-reporter.timer](https://ipamo.net/vmware-reporter/latest/_static/vmware-reporter.timer) and [notify-email@.service](https://ipamo.net/vmware-reporter/latest/_static/notify-email@.service)\nin `/etc/systemd/system` and adapt them to your configuration.\n\nRun:\n\n sudo systemctl daemon-reload\n sudo systemctl enable vmware-reporter.timer\n sudo systemctl start vmware-reporter.timer\n\n\n## Credits\n\nThis library leverages [pyvmomi](https://github.com/vmware/pyvmomi), the vSphere API Python bindings provided by VMWare.\n\n\n## Legal\n\nThis project is licensed under the terms of the [MIT license](https://raw.githubusercontent.com/ipamo/vmware-reporter/main/LICENSE.txt).\n\nThis project is not affiliated in any way with VMWare or Broadcom.\n",
"bugtrack_url": null,
"license": null,
"summary": "Interact easily with your VMWare clusters.",
"version": "0.3.1",
"project_urls": {
"Bug Tracker": "https://github.com/ipamo/vmware-reporter/issues",
"Homepage": "https://github.com/ipamo/vmware-reporter"
},
"split_keywords": [
"vmware",
" vsphere",
" vm",
" reporter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5b552e649e52b3b75a8db79029f4d803a390fff6d9cc71b0745f8413dad3a3fc",
"md5": "3b8d4133868cafe1b0c75cfc59965143",
"sha256": "aae6c0b7d0c85e56ad4cd5307c1d198ba0dbf0826af0816246851f719cff5500"
},
"downloads": -1,
"filename": "vmware_reporter-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b8d4133868cafe1b0c75cfc59965143",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 46825,
"upload_time": "2024-05-28T15:38:27",
"upload_time_iso_8601": "2024-05-28T15:38:27.804995Z",
"url": "https://files.pythonhosted.org/packages/5b/55/2e649e52b3b75a8db79029f4d803a390fff6d9cc71b0745f8413dad3a3fc/vmware_reporter-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-28 15:38:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ipamo",
"github_project": "vmware-reporter",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "zut",
"specs": [
[
">=",
"0.9.4"
]
]
},
{
"name": "pyvmomi",
"specs": []
},
{
"name": "requests",
"specs": []
}
],
"lcname": "vmware-reporter"
}