Changeset 29052 in vbox for trunk/src/VBox
- Timestamp:
- May 5, 2010 2:59:23 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 61101
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r29051 r29052 2208 2208 print 'Invalid alias mode: ' + args[a] 2209 2209 print natAlias.__doc__ 2210 return (1, '')2210 return (1, None) 2211 2211 nat.aliasMode = int(nat.aliasMode) | alias[args[a]]; 2212 return (0, '')2212 return (0, None) 2213 2213 2214 2214 def natSettings(ctx, mach, nicnum, nat, args): … … 2231 2231 if args[1] < 16000: 2232 2232 print 'invalid mtu value ({0} no in range [65 - 16000])'.format(args[1]) 2233 return (1, '')2233 return (1, None) 2234 2234 for i in range(2, len(args)): 2235 2235 if not args[i].isdigit() or int(args[i]) < 8 or int(args[i]) > 1024: 2236 2236 print 'invalid {0} parameter ({1} not in range [8-1024])'.format(i, args[i]) 2237 return (1, '')2237 return (1, None) 2238 2238 a = [args[1]] 2239 2239 if len(args) < 6: … … 2244 2244 #print a 2245 2245 nat.setNetworkSettings(int(a[0]), int(a[1]), int(a[2]), int(a[3]), int(a[4])) 2246 return (0, '')2246 return (0, None) 2247 2247 2248 2248 def natDns(ctx, mach, nicnum, nat, args): … … 2261 2261 nat.dnsProxy = 'proxy' in args 2262 2262 nat.dnsUseHostResolver = 'usehostresolver' in args 2263 return (0, '')2263 return (0, None) 2264 2264 2265 2265 def natTftp(ctx, mach, nicnum, nat, args): … … 2295 2295 print 'invalid args:', args 2296 2296 print natTftp.__doc__ 2297 return (1, '')2297 return (1, None) 2298 2298 if cmd == 'prefix': nat.tftpPrefix = args[2] 2299 2299 elif cmd == 'bootfile': nat.tftpBootFile = args[2] … … 2301 2301 else: 2302 2302 print "invalid cmd:", cmd 2303 return (1, '')2304 return (0, '')2303 return (1, None) 2304 return (0, None) 2305 2305 2306 2306 def natPortForwarding(ctx, mach, nicnum, nat, args): … … 2345 2345 print 'invalid port-forwarding or args of sub command ', args[1] 2346 2346 print natPortForwarding.__doc__ 2347 return (1, '')2347 return (1, None) 2348 2348 2349 2349 a = pfcmd[args[1]]['func']() 2350 return (0, '')2350 return (0, None) 2351 2351 2352 2352 def natNetwork(ctx, mach, nicnum, nat, args): … … 2364 2364 if addr.count('.') > 3 or int(mask) < 0 or int(mask) > 32: 2365 2365 print 'Invalid arguments' 2366 return (1, '')2366 return (1, None) 2367 2367 nat.network = args[1] 2368 return (0, '')2368 return (0, None) 2369 2369 def natCmd(ctx, args): 2370 2370 """This command is entry point to NAT settins management … … 2422 2422 mach.saveSettings() 2423 2423 session.close() 2424 el se:2424 elif report is not None: 2425 2425 for r in report: 2426 2426 msg ='{0} nic{1} {2}: {3}'.format(mach.name, nicnum, func, r)
Note:
See TracChangeset
for help on using the changeset viewer.