From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/pybind/mgr/rook/rook-client-python/generate.sh | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 src/pybind/mgr/rook/rook-client-python/generate.sh (limited to 'src/pybind/mgr/rook/rook-client-python/generate.sh') diff --git a/src/pybind/mgr/rook/rook-client-python/generate.sh b/src/pybind/mgr/rook/rook-client-python/generate.sh new file mode 100755 index 000000000..f7de74aeb --- /dev/null +++ b/src/pybind/mgr/rook/rook-client-python/generate.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +set -ex + +if [ -z "$1" ] ; then + rook_base="${GOPATH:-$HOME/go}/src/github.com/rook/rook" +else + rook_base="$1" +fi +crd_base="$rook_base/cluster/examples/kubernetes" + +cd "$(dirname "$0")" + +if ! [ -x "$(command -v python3)" ]; then + echo 'Error: python3 is not installed.' >&2 + exit 1 +fi + +if [ ! -d venv ] +then + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt +else + . venv/bin/activate +fi + +python generate_model_classes.py "$crd_base/ceph/crds.yaml" "rook_client/ceph" +#python generate_model_classes.py "$crd_base/cassandra/operator.yaml" "rook_client/cassandra" + +python setup.py develop + +tox --skip-missing-interpreters=true -- --crd_base="$crd_base" + +deactivate -- cgit v1.2.3