Compare commits
3 Commits
client-spe
...
master
Author | SHA1 | Date | |
---|---|---|---|
9ec2884e40 | |||
e5c8318b8e | |||
5831c3a425 |
@ -22,7 +22,8 @@ sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," node-d
|
|||||||
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," health-daemon/pvchealthd/Daemon.py
|
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," health-daemon/pvchealthd/Daemon.py
|
||||||
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," worker-daemon/pvcworkerd/Daemon.py
|
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," worker-daemon/pvcworkerd/Daemon.py
|
||||||
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," api-daemon/pvcapid/Daemon.py
|
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," api-daemon/pvcapid/Daemon.py
|
||||||
sed -i "s,version=\"${current_version}\",version=\"${new_version}\"," client-cli/setup.py
|
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," client-cli/pyproject.toml
|
||||||
|
sed -i "s,VERSION = \"${current_version}\",VERSION = \"${new_version}\"," client-cli/pvc/cli/cli.py
|
||||||
echo ${new_version} > .version
|
echo ${new_version} > .version
|
||||||
|
|
||||||
changelog_tmpdir=$( mktemp -d )
|
changelog_tmpdir=$( mktemp -d )
|
||||||
|
@ -51,6 +51,8 @@ import click
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
VERSION = "0.9.107"
|
||||||
|
|
||||||
CONTEXT_SETTINGS = dict(
|
CONTEXT_SETTINGS = dict(
|
||||||
help_option_names=["-h", "--help"], max_content_width=MAX_CONTENT_WIDTH
|
help_option_names=["-h", "--help"], max_content_width=MAX_CONTENT_WIDTH
|
||||||
)
|
)
|
||||||
@ -97,10 +99,7 @@ def version(ctx, param, value):
|
|||||||
if not value or ctx.resilient_parsing:
|
if not value or ctx.resilient_parsing:
|
||||||
return
|
return
|
||||||
|
|
||||||
from pkg_resources import get_distribution
|
echo(CLI_CONFIG, f"Parallel Virtual Cluster CLI client version {VERSION}")
|
||||||
|
|
||||||
version = get_distribution("pvc").version
|
|
||||||
echo(CLI_CONFIG, f"Parallel Virtual Cluster CLI client version {version}")
|
|
||||||
ctx.exit()
|
ctx.exit()
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ from requests import get, post, put, patch, delete, Response
|
|||||||
from requests.exceptions import ConnectionError
|
from requests.exceptions import ConnectionError
|
||||||
from time import time
|
from time import time
|
||||||
from urllib3 import disable_warnings
|
from urllib3 import disable_warnings
|
||||||
|
from pvc.cli.cli import VERSION
|
||||||
|
|
||||||
|
|
||||||
def format_bytes(size_bytes):
|
def format_bytes(size_bytes):
|
||||||
@ -166,6 +167,9 @@ def call_api(
|
|||||||
config["api_scheme"], config["api_host"], config["api_prefix"], request_uri
|
config["api_scheme"], config["api_host"], config["api_prefix"], request_uri
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add custom User-Agent header
|
||||||
|
headers["User-Agent"] = f"pvc-client-cli/{VERSION}"
|
||||||
|
|
||||||
# Craft the authentication header if required
|
# Craft the authentication header if required
|
||||||
if config["api_key"]:
|
if config["api_key"]:
|
||||||
headers["X-Api-Key"] = config["api_key"]
|
headers["X-Api-Key"] = config["api_key"]
|
||||||
|
@ -605,12 +605,14 @@ def rename_vm(zkhandler, domain, new_domain):
|
|||||||
rbd_list.append(disk["name"].split("/")[1])
|
rbd_list.append(disk["name"].split("/")[1])
|
||||||
|
|
||||||
# Rename each volume in turn
|
# Rename each volume in turn
|
||||||
|
rbd_list_new = []
|
||||||
for idx, rbd in enumerate(rbd_list):
|
for idx, rbd in enumerate(rbd_list):
|
||||||
rbd_new = re.sub(r"{}".format(domain), new_domain, rbd)
|
rbd_new = re.sub(r"{}".format(domain), new_domain, rbd)
|
||||||
# Skip renaming if nothing changed
|
# Skip renaming if nothing changed
|
||||||
if rbd_new == rbd:
|
if rbd_new == rbd:
|
||||||
continue
|
continue
|
||||||
ceph.rename_volume(zkhandler, pool_list[idx], rbd, rbd_new)
|
ceph.rename_volume(zkhandler, pool_list[idx], rbd, rbd_new)
|
||||||
|
rbd_list_new.append(f"{pool_list[idx]}/{rbd_new}")
|
||||||
|
|
||||||
# Replace the name in the config
|
# Replace the name in the config
|
||||||
vm_config_new = (
|
vm_config_new = (
|
||||||
@ -627,6 +629,7 @@ def rename_vm(zkhandler, domain, new_domain):
|
|||||||
[
|
[
|
||||||
(("domain", dom_uuid), new_domain),
|
(("domain", dom_uuid), new_domain),
|
||||||
(("domain.xml", dom_uuid), vm_config_new),
|
(("domain.xml", dom_uuid), vm_config_new),
|
||||||
|
(("domain.rbdlist", dom_uuid), ",".join(rbd_list_new)),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
1
debian/control
vendored
1
debian/control
vendored
@ -5,6 +5,7 @@ Maintainer: Joshua Boniface <joshua@boniface.me>
|
|||||||
Standards-Version: 3.9.8
|
Standards-Version: 3.9.8
|
||||||
Homepage: https://www.boniface.me
|
Homepage: https://www.boniface.me
|
||||||
X-Python3-Version: >= 3.7
|
X-Python3-Version: >= 3.7
|
||||||
|
Build-Depends: pybuild-plugin-pyproject, dh-python
|
||||||
|
|
||||||
Package: pvc-daemon-node
|
Package: pvc-daemon-node
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -14,7 +14,7 @@ override_dh_python3:
|
|||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
find $(CURDIR) -name "__pycache__" -o -name ".pybuild" -exec rm -fr {} + || true
|
find $(CURDIR) -name "__pycache__" -o -name ".pybuild" -exec rm -fr {} + || true
|
||||||
rm -r $(CURDIR)/client-cli/build
|
rm -r $(CURDIR)/client-cli/build || true
|
||||||
|
|
||||||
# If you need to rebuild the Sphinx documentation
|
# If you need to rebuild the Sphinx documentation
|
||||||
# Add spinxdoc to the dh --with line
|
# Add spinxdoc to the dh --with line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user