Overview
Comment: | Implemented list --state. Fixed first start of vm, when no monitor socket exists yet |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
33f6d5eeca95e3d854085f5aeed18aab |
User & Date: | vitus on 2015-11-18 14:44:29 |
Other Links: | manifest | tags |
Context
2015-12-11
| ||
15:27 | More or less written command line interface to create vms. Fixed monitor path in the start.template check-in: e43aa4d9b2 user: vitus tags: trunk | |
2015-11-18
| ||
14:44 | Implemented list --state. Fixed first start of vm, when no monitor socket exists yet check-in: 33f6d5eeca user: vitus tags: trunk | |
2015-11-17
| ||
15:36 | Skip unexisting dirs in find_vm check-in: 2d6b5b3575 user: vitus tags: trunk | |
Changes
Modified vws from [14e25b598f] to [a01d53b13c].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + + + + + - - + + + + + + + + + + | def find_vm(name): search_path=[os.environ['HOME']+"/VWs", config.get("directories","SharedVMs"), config.get("directories","AutostartVMs")] for dirname in search_path: if not os.access(dirname,os.X_OK): continue |
︙ | |||
146 147 148 149 150 151 152 153 154 155 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | + + + + + + + + + + + + + + + + + + - + | count = 0 search_path=[os.environ['HOME']+"/VWs", config.get("directories","SharedVMs"), config.get("directories","AutostartVMs")] for dirname in search_path: if not os.access(dirname+"/.",os.X_OK): continue maxlen=0 vms=[] for vmname in os.listdir(dirname): if os.access(dirname+"/"+vmname+"/start",os.X_OK): count += 1 f=[vmname] if maxlen < len(vmname): maxlen = len(vmname) if options.state: sock = connect_vm(dirname+"/"+vmname) if sock is None: state = "stopped" else: sock.close() state = "running" f.append(state) vms.append(f) for f in sorted(vms): if len(f)==2: print "%*s %s" % (-maxlen,f[0],f[1]) else: |
︙ | |||
228 229 230 231 232 233 234 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - - + - - + - - - - - - - + + + + + + - | p=new_command(cmds,'spiceuri',help='Output spice URI of machine') parsed_args=args.parse_args(sys.argv[1:]) parsed_args.stopped = False stopped_vm_commands = ['start','snapshot','revert','commit','snapshots'] if hasattr(parsed_args,'machine'): parsed_args.dir=find_vm(parsed_args.machine) |