diff --git a/AUTHORS.rst b/AUTHORS.rst index d655b7b4..51a8ab4a 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -4,6 +4,7 @@ Authors The list of contributors in alphabetical order: - `Anton Khodak `_ +- `Audrius Mecionis `_ - `Dan Leehr `_ - `Daniel Prelipcean `_ - `Diego Rodriguez `_ diff --git a/reana/reana_dev/cluster.py b/reana/reana_dev/cluster.py index 4d0e7f09..0b9b1757 100644 --- a/reana/reana_dev/cluster.py +++ b/reana/reana_dev/cluster.py @@ -376,10 +376,26 @@ def cluster_unpause(): run_command(cmd, "reana") +@click.option( + "-m", + "--mount", + "mounts", + multiple=True, + help="Which directories are used to mount the cluster nodes? [local_path:cluster_node_path]", +) @cluster_commands.command(name="cluster-delete") -def cluster_delete(): - """Delete REANA cluster.""" - cmd = "kind delete cluster" +def cluster_delete(mounts): # noqa: D301 + """Delete REANA cluster. + + \b + Example: + $ reana-dev cluster-delete -m /var/reana:/var/reana + """ + cmd = "" + for mount in mounts: + cmd += "rm -rf {}; ".format(mount.split(":")[0]) + + cmd += "kind delete cluster" run_command(cmd, "reana")