Overview
Comment: | Added support for machine name patterns in the list command. Added preprocessing of vws.service.in |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
cd20fc353b5d7bfcfe3bad2183867920 |
User & Date: | vitus on 2017-01-13 19:42:27 |
Other Links: | manifest | tags |
Context
2017-01-13
| ||
19:54 | Cleaned up installation procedure check-in: 6d27dc1088 user: vitus tags: trunk | |
19:42 | Added support for machine name patterns in the list command. Added preprocessing of vws.service.in check-in: cd20fc353b user: vitus tags: trunk | |
15:09 | Fix working without /home/vitus env var. Fixes [370911207add19] . Add full path to vws script into service file. Autostart from systemd now works check-in: 83e14cb536 user: vitus tags: trunk | |
Changes
Modified Makefile from [c8d4867043] to [e6aed3cffe].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | + - + + + - + | prefix=/usr/local mandir=$(prefix)/share/man bindir=$(prefix)/bin sysconfdir=/etc INSTALL=/usr/bin/install man: vws.1 find_free_port.1 %.1:%.mkd pandoc -s -t man -o $@ $+ clean: rm -f *.1 vws.service |
Modified vws from [bd152d8839] to [65984fa43e].
︙ | |||
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | + + + + + + + + | """ vws usb remove """ address = find_usb(options, get_vm_devices(options.sock)) answer = send_command(options.sock, "usb_del %s" % address) print answer def cmd_list(options): """ vws list """ import fnmatch count = 0 search_path = [("private",os.path.join(pwd.getpwuid(os.getuid()).pw_dir, "VWs")), ("shared",config.get("directories", "SharedVMs")), ("autostart",config.get("directories", "AutostartVMs"))] maxlen = 0 vms = [] bridges = set() for (vmtype,dirname) in search_path: if not os.access(dirname + "/.", os.X_OK): continue for vmname in os.listdir(dirname): if os.access(dirname + "/" + vmname + "/start", os.X_OK): matches=False for p in options.pattern: if fnmatch.fnmatch(vmname,p): matches=True break if not matches: continue count += 1 f = {"name":vmname} if maxlen < len(vmname): maxlen = len(vmname) if options.state: f["type"]=vmtype sock = connect_vm(dirname + "/" + vmname) |
︙ | |||
837 838 839 840 841 842 843 844 845 846 847 848 849 850 | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | + | cmds = args.add_subparsers(dest='command', help="sub-command help") p = cmds.add_parser("list", help="List existing VWs", description="List existing VWs") p.add_argument("--state", action='store_const', const=True, default=False, dest='state', help='Show state of the machine') p.add_argument("--usb", action='store_const', const=True, default=False, dest='usb', help='Show connected USB devices') p.add_argument("pattern", nargs='*',default='*',help="Name patterns") p = cmds.add_parser("version", help="show vws version") p = cmds.add_parser("autostart",help="Autostart all VMs marked as autostartable") p = cmds.add_parser("shutdown",help="shut down all running VMs") p.add_argument("--wait",help="wait until all machines would be shoutdown", action="store_const", const=True, default=False, dest="wait") p.add_argument("--timeout",type=int,default=90, help="how long to way for VMs shutdown before forcing it off") |
︙ |
Modified vws.mkd from [5adaaaef70] to [423c253021].
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | *vws* - manage Virtual Workstations SYNOPSIS ======== **vws create** *name* [ **--install** *isoimage* ] |
︙ | |||
356 357 358 359 360 361 362 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - + - - + + + + + | interaction with it. **vws spiceuri** *machine* Prints out URI you should feed into your spice viewer to access this machine. |
︙ |
Modified vws.service.in from [d6ec7e4063] to [6b9249971a].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 | - - + + | [Unit] Description=Virtual Workstation Autostart Documentation=man:vws(1) After=network.target dnsmasq.service [Service] Type=forking |