clonebox 0.1.4__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clonebox-0.1.4 → clonebox-0.1.5}/PKG-INFO +1 -1
- {clonebox-0.1.4 → clonebox-0.1.5}/pyproject.toml +1 -1
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox/cli.py +30 -6
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox.egg-info/PKG-INFO +1 -1
- {clonebox-0.1.4 → clonebox-0.1.5}/LICENSE +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/README.md +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/setup.cfg +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox/__init__.py +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox/__main__.py +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox/cloner.py +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox/detector.py +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox.egg-info/SOURCES.txt +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox.egg-info/dependency_links.txt +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox.egg-info/entry_points.txt +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox.egg-info/requires.txt +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/src/clonebox.egg-info/top_level.txt +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/tests/test_cli.py +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/tests/test_cloner.py +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/tests/test_detector.py +0 -0
- {clonebox-0.1.4 → clonebox-0.1.5}/tests/test_network.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "clonebox"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.5"
|
|
8
8
|
description = "Clone your workstation environment to an isolated VM with selective apps, paths and services"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Apache-2.0"}
|
|
@@ -405,7 +405,7 @@ def cmd_start(args):
|
|
|
405
405
|
vm_name = config["vm"]["name"]
|
|
406
406
|
|
|
407
407
|
# Check if VM already exists
|
|
408
|
-
cloner = SelectiveVMCloner()
|
|
408
|
+
cloner = SelectiveVMCloner(user_session=getattr(args, "user", False))
|
|
409
409
|
try:
|
|
410
410
|
existing_vms = [v["name"] for v in cloner.list_vms()]
|
|
411
411
|
if vm_name in existing_vms:
|
|
@@ -417,7 +417,7 @@ def cmd_start(args):
|
|
|
417
417
|
|
|
418
418
|
# Create new VM from config
|
|
419
419
|
console.print(f"[cyan]Creating VM '{vm_name}' from config...[/]\n")
|
|
420
|
-
vm_uuid = create_vm_from_config(config, start=True)
|
|
420
|
+
vm_uuid = create_vm_from_config(config, start=True, user_session=getattr(args, "user", False))
|
|
421
421
|
console.print(f"\n[bold green]🎉 VM '{vm_name}' is running![/]")
|
|
422
422
|
console.print(f"[dim]UUID: {vm_uuid}[/]")
|
|
423
423
|
|
|
@@ -442,13 +442,13 @@ def cmd_start(args):
|
|
|
442
442
|
console.print("[dim]Usage: clonebox start <vm-name> or clonebox start .[/]")
|
|
443
443
|
return
|
|
444
444
|
|
|
445
|
-
cloner = SelectiveVMCloner()
|
|
445
|
+
cloner = SelectiveVMCloner(user_session=getattr(args, "user", False))
|
|
446
446
|
cloner.start_vm(name, open_viewer=not args.no_viewer, console=console)
|
|
447
447
|
|
|
448
448
|
|
|
449
449
|
def cmd_stop(args):
|
|
450
450
|
"""Stop a VM."""
|
|
451
|
-
cloner = SelectiveVMCloner()
|
|
451
|
+
cloner = SelectiveVMCloner(user_session=getattr(args, "user", False))
|
|
452
452
|
cloner.stop_vm(args.name, force=args.force, console=console)
|
|
453
453
|
|
|
454
454
|
|
|
@@ -461,13 +461,13 @@ def cmd_delete(args):
|
|
|
461
461
|
console.print("[yellow]Cancelled.[/]")
|
|
462
462
|
return
|
|
463
463
|
|
|
464
|
-
cloner = SelectiveVMCloner()
|
|
464
|
+
cloner = SelectiveVMCloner(user_session=getattr(args, "user", False))
|
|
465
465
|
cloner.delete_vm(args.name, delete_storage=not args.keep_storage, console=console)
|
|
466
466
|
|
|
467
467
|
|
|
468
468
|
def cmd_list(args):
|
|
469
469
|
"""List all VMs."""
|
|
470
|
-
cloner = SelectiveVMCloner()
|
|
470
|
+
cloner = SelectiveVMCloner(user_session=getattr(args, "user", False))
|
|
471
471
|
vms = cloner.list_vms()
|
|
472
472
|
|
|
473
473
|
if not vms:
|
|
@@ -861,12 +861,24 @@ def main():
|
|
|
861
861
|
"name", nargs="?", default=None, help="VM name or '.' to use .clonebox.yaml"
|
|
862
862
|
)
|
|
863
863
|
start_parser.add_argument("--no-viewer", action="store_true", help="Don't open virt-viewer")
|
|
864
|
+
start_parser.add_argument(
|
|
865
|
+
"-u",
|
|
866
|
+
"--user",
|
|
867
|
+
action="store_true",
|
|
868
|
+
help="Use user session (qemu:///session) - no root required",
|
|
869
|
+
)
|
|
864
870
|
start_parser.set_defaults(func=cmd_start)
|
|
865
871
|
|
|
866
872
|
# Stop command
|
|
867
873
|
stop_parser = subparsers.add_parser("stop", help="Stop a VM")
|
|
868
874
|
stop_parser.add_argument("name", help="VM name")
|
|
869
875
|
stop_parser.add_argument("--force", "-f", action="store_true", help="Force stop")
|
|
876
|
+
stop_parser.add_argument(
|
|
877
|
+
"-u",
|
|
878
|
+
"--user",
|
|
879
|
+
action="store_true",
|
|
880
|
+
help="Use user session (qemu:///session) - no root required",
|
|
881
|
+
)
|
|
870
882
|
stop_parser.set_defaults(func=cmd_stop)
|
|
871
883
|
|
|
872
884
|
# Delete command
|
|
@@ -874,10 +886,22 @@ def main():
|
|
|
874
886
|
delete_parser.add_argument("name", help="VM name")
|
|
875
887
|
delete_parser.add_argument("--yes", "-y", action="store_true", help="Skip confirmation")
|
|
876
888
|
delete_parser.add_argument("--keep-storage", action="store_true", help="Keep disk images")
|
|
889
|
+
delete_parser.add_argument(
|
|
890
|
+
"-u",
|
|
891
|
+
"--user",
|
|
892
|
+
action="store_true",
|
|
893
|
+
help="Use user session (qemu:///session) - no root required",
|
|
894
|
+
)
|
|
877
895
|
delete_parser.set_defaults(func=cmd_delete)
|
|
878
896
|
|
|
879
897
|
# List command
|
|
880
898
|
list_parser = subparsers.add_parser("list", aliases=["ls"], help="List VMs")
|
|
899
|
+
list_parser.add_argument(
|
|
900
|
+
"-u",
|
|
901
|
+
"--user",
|
|
902
|
+
action="store_true",
|
|
903
|
+
help="Use user session (qemu:///session) - no root required",
|
|
904
|
+
)
|
|
881
905
|
list_parser.set_defaults(func=cmd_list)
|
|
882
906
|
|
|
883
907
|
# Detect command
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|