Metadata-Version: 2.1
Name: vmware-reporter
Version: 0.3.0
Summary: Interact easily with your VMWare clusters.
Author-email: Sébastien Hocquet <dev@ipamo.net>
Project-URL: Homepage, https://github.com/ipamo/vmware-reporter
Project-URL: Bug Tracker, https://github.com/ipamo/vmware-reporter/issues
Keywords: vmware,vsphere,vm,reporter
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: zut[commons] >=0.9.2
Requires-Dist: pyvmomi
Requires-Dist: requests

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
```


## 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
```


## 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.
