Management of resources on System Center Virtual Machine Manager (SCVMM) in a declarative way.
Project description
vmm-manager
Python script that manages resources in the System Center Virtual Machine Manager (SCVMM), in a declarative way, based on a YAML configuration file.
Breaking changes
1.0.0
- The inventory file schema has completely changed. See the inventory_example.yaml file for more details.
- The command parameters were renamed to be more consistent.
- The API and inventory schema are now stable.
Prerequisites
You need a Windows machine, which will serve as the access point to SCVMM, with the following tools:
- OpenSSH
- SCVMM's PowerShell Module (virtualmachinemanager), installed with the Virtual Machine Manager (VMM) Console. You can also get it at https://github.com/MP-ES/VirtualMachineManager-PowerShellModule
Installation
pip install -U vmm-manager
How to use
Use the command below to see the available options:
vmm_manager -h
Environment variables
You can set environment variables to avoid passing the same parameters every time you run the script. See an example in the .env.default file.
Example of a inventory file
Development
Install Poetry
Run the following commands to install Poetry:
# install
curl -sSL https://install.python-poetry.org | python3 -
# auto-completion
# Bash
poetry completions bash >> ~/.bash_completion
Environment variables (optional)
Use the .env.default file as a template to create a .env file with the environment variables needed to run the script. You can load them by running the command export $(cat .env | xargs)
before executing the script.
How to run
# Loading environment variables (optional)
export $(cat .env | xargs)
# Install dependencies
poetry install --no-root
# Run
poetry run python -m vmm_manager -h
Helpful commands
# Poetry shell
poetry shell
# Add a dependency
poetry add <pacote> [--dev]
# Update dependencies
poetry update
# Run linting
./lint.sh
# Fix dependencies sorting
isort .
# Run tests
python -m pytest -vv
# List virtualenvs
poetry env list
# Remove a virtualenv
poetry env remove <name>
References
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
File details
Details for the file vmm_manager-1.1.0.tar.gz
.
File metadata
- Download URL: vmm_manager-1.1.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.8.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76adf9816c96117bf80b7c53a766b25821342128f5dfe843d7a272be8c1907c8 |
|
MD5 | 29786fb402f0716d7a11a52f1ef09f2b |
|
BLAKE2b-256 | 47a6f961e15582116fd7a49e111255ee103e1fc512de6a9cedb83efbb2b0ff67 |
File details
Details for the file vmm_manager-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: vmm_manager-1.1.0-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.8.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a93603d780f6b3a637a721e3ba85d73b72c36213b33ab479ededaeb2416a6e4 |
|
MD5 | 6e3ef3f11abcd4e03567e5a48691c691 |
|
BLAKE2b-256 | 9a8fadef141a7edd2f9c05e1e5415f7111f25dba6b29be6d898b1edc09af68ac |