Add openvixdisklib as an open NBD replacement for VMware VDDK.
VDDK is no longer publicly distributed, so this library reverse-engineers the vSphere NFC path and exposes ConnectEx, Open, Read, and Write without the proprietary SDK. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
# Copyright 2026 Cloudbase Solutions Srl
|
||||
# All Rights Reserved.
|
||||
|
||||
[tox]
|
||||
minversion = 4.0.2
|
||||
envlist = fmt,flake8,mypy,pep8,py3
|
||||
skipsdist = True
|
||||
|
||||
[vars]
|
||||
src_path = {toxinidir}/openvixdisklib
|
||||
tst_path = {toxinidir}/tests
|
||||
all_path = {[vars]src_path} {[vars]tst_path}
|
||||
vddk_path = {toxinidir}/.vddk
|
||||
|
||||
[testenv]
|
||||
sitepackages = True
|
||||
usedevelop = True
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
allowlist_externals =
|
||||
bash
|
||||
|
||||
[testenv:integration]
|
||||
description = Run integration tests against a VMware environment.
|
||||
sitepackages = True
|
||||
usedevelop = True
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
LD_LIBRARY_PATH={[vars]vddk_path}
|
||||
LD_PRELOAD=
|
||||
commands =
|
||||
stestr run --slowest --concurrency 1 \
|
||||
--test-path tests/integration/ {posargs}
|
||||
|
||||
[testenv:integration-coverage]
|
||||
description = Integration tests with coverage report.
|
||||
sitepackages = True
|
||||
usedevelop = True
|
||||
setenv =
|
||||
{[testenv:integration]setenv}
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
pytest
|
||||
pytest-cov
|
||||
pycobertura
|
||||
commands =
|
||||
pytest --cov=openvixdisklib --cov-report=term-missing \
|
||||
--cov-report=xml -p no:cacheprovider tests/integration/ {posargs}
|
||||
pycobertura show --format html --source openvixdisklib \
|
||||
coverage.xml -o coverage.html
|
||||
|
||||
[testenv:fmt]
|
||||
description = Format the code based on the coding style standards.
|
||||
deps =
|
||||
ruff
|
||||
commands =
|
||||
ruff check --select I --fix {[vars]all_path}
|
||||
ruff format {[vars]all_path}
|
||||
|
||||
[testenv:pep8]
|
||||
description = Verify the coding style (pep8).
|
||||
deps =
|
||||
ruff
|
||||
commands =
|
||||
ruff format --diff {[vars]all_path}
|
||||
ruff check {[vars]all_path}
|
||||
|
||||
[testenv:mypy]
|
||||
description = Type checks (mypy).
|
||||
deps =
|
||||
mypy
|
||||
commands =
|
||||
mypy {[vars]all_path}
|
||||
|
||||
[testenv:flake8]
|
||||
sitepackages = True
|
||||
deps =
|
||||
flake8
|
||||
commands = flake8 {posargs}
|
||||
allowlist_externals =
|
||||
flake8
|
||||
|
||||
[flake8]
|
||||
ignore = E125,E251,W503,W504,E305,E731,E117,W605,F632
|
||||
exclude = .venv,.git,.tox,dist,build,*.egg
|
||||
# Same length as ruff.
|
||||
max-line-length = 88
|
||||
|
||||
[stestr]
|
||||
test_path = ./tests
|
||||
Reference in New Issue
Block a user