Compare commits
	
		
			3 Commits
		
	
	
		
			8283f972e4
			...
			9ec2884e40
		
	
	| 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}\"," 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}\"," 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
 | 
			
		||||
 | 
			
		||||
changelog_tmpdir=$( mktemp -d )
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,8 @@ import click
 | 
			
		||||
###############################################################################
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
VERSION = "0.9.107"
 | 
			
		||||
 | 
			
		||||
CONTEXT_SETTINGS = dict(
 | 
			
		||||
    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:
 | 
			
		||||
        return
 | 
			
		||||
 | 
			
		||||
    from pkg_resources import get_distribution
 | 
			
		||||
 | 
			
		||||
    version = get_distribution("pvc").version
 | 
			
		||||
    echo(CLI_CONFIG, f"Parallel Virtual Cluster CLI client version {version}")
 | 
			
		||||
    echo(CLI_CONFIG, f"Parallel Virtual Cluster CLI client version {VERSION}")
 | 
			
		||||
    ctx.exit()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -27,6 +27,7 @@ from requests import get, post, put, patch, delete, Response
 | 
			
		||||
from requests.exceptions import ConnectionError
 | 
			
		||||
from time import time
 | 
			
		||||
from urllib3 import disable_warnings
 | 
			
		||||
from pvc.cli.cli import VERSION
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def format_bytes(size_bytes):
 | 
			
		||||
@@ -166,6 +167,9 @@ def call_api(
 | 
			
		||||
        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
 | 
			
		||||
    if 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])
 | 
			
		||||
 | 
			
		||||
    # Rename each volume in turn
 | 
			
		||||
    rbd_list_new = []
 | 
			
		||||
    for idx, rbd in enumerate(rbd_list):
 | 
			
		||||
        rbd_new = re.sub(r"{}".format(domain), new_domain, rbd)
 | 
			
		||||
        # Skip renaming if nothing changed
 | 
			
		||||
        if rbd_new == rbd:
 | 
			
		||||
            continue
 | 
			
		||||
        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
 | 
			
		||||
    vm_config_new = (
 | 
			
		||||
@@ -627,6 +629,7 @@ def rename_vm(zkhandler, domain, new_domain):
 | 
			
		||||
        [
 | 
			
		||||
            (("domain", dom_uuid), new_domain),
 | 
			
		||||
            (("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
 | 
			
		||||
Homepage: https://www.boniface.me
 | 
			
		||||
X-Python3-Version: >= 3.7
 | 
			
		||||
Build-Depends: pybuild-plugin-pyproject, dh-python
 | 
			
		||||
 | 
			
		||||
Package: pvc-daemon-node
 | 
			
		||||
Architecture: all
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							@@ -14,7 +14,7 @@ override_dh_python3:
 | 
			
		||||
 | 
			
		||||
override_dh_auto_clean:
 | 
			
		||||
	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
 | 
			
		||||
# Add spinxdoc to the dh --with line
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user