From: Nizamudeen A Date: Mon, 17 Feb 2025 11:30:08 +0000 (+0530) Subject: mgr/dashboard: tox command to generate the nvmeof proto files X-Git-Tag: testing/wip-pdonnell-testing-20250226.141530-debug~10^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=75a74f235e60f7468cc0e196785afcda6d743127;p=ceph-ci.git mgr/dashboard: tox command to generate the nvmeof proto files `tox -e gen-nvmeof-proto` to generate the tox files Fixes: https://tracker.ceph.com/issues/69995 Signed-off-by: Nizamudeen A --- diff --git a/src/pybind/mgr/dashboard/tox.ini b/src/pybind/mgr/dashboard/tox.ini index fdb2dd75809..d92d763fdad 100644 --- a/src/pybind/mgr/dashboard/tox.ini +++ b/src/pybind/mgr/dashboard/tox.ini @@ -161,6 +161,7 @@ description = deps = {[base]deps} {[base-test]deps} +depends = gen-nvmeof-proto passenv = PYTHONPATH setenv = @@ -177,3 +178,13 @@ description = Generate Sphinx documentation from OpenAPI specification deps = -r../../../../admin/doc-requirements.txt changedir = ../../../../doc commands = sphinx-build -W -b html -c . -D suppress_warnings=ref.* -d {envtmpdir}/doctrees mgr/ceph_api {envtmpdir}/html + +[testenv:gen-nvmeof-proto] +allowlist_externals = cp +changedir = ../ +description = Generate Python code from Protobuf files for nvmeof gateway +sitepackages = true +commands_pre = cp ../../nvmeof/gateway/control/proto/gateway.proto dashboard/services/proto/ +commands = + python -c "import grpc; print(f'using grpc version: {grpc.__version__}')" + python -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. dashboard/services/proto/gateway.proto --experimental_allow_proto3_optional