- Timestamp:
- Oct 9, 2008, 2:12:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-remote-server/files/usr/sbin/sipb-xen-remote-create
r816 r1088 21 21 22 22 def main(argv): 23 if len(argv) < 2:24 print >> sys.stderr, "usage: sipb-xen-remote-create < machine> [<other args...>]"23 if len(argv) < 3: 24 print >> sys.stderr, "usage: sipb-xen-remote-create <operation> <machine> [<other args...>]" 25 25 return 2 26 machine_name = argv[1] 27 args = argv[2:] 26 operation = argv[1] 27 machine_name = argv[2] 28 args = argv[3:] 29 30 if operation == 'install': 31 options = dict(arg.split('=', 1) for arg in args) 32 valid_keys = set(('mirror', 'dist', 'arch', 'imagesize', 'noinstall')) 33 if not set(options.keys()).issubset(valid_keys): 34 print >> sys.stderr, "Invalid argument. Use the help command to see valid arguments to install" 35 return 1 36 if any(' ' in val for val in options.values()): 37 print >> sys.stderr, "Arguments to the autoinstaller cannot contain spaces" 38 return 1 28 39 29 40 p = Popen(['/usr/sbin/sipb-xen-remote-proxy-web', 'listvms'], stdout=PIPE) … … 44 55 sys.stdout.flush() 45 56 return call(['remctl', host, 'remote', 'control', 46 machine_name, 'create'] + args)57 machine_name, operation] + args) 47 58 48 59 if __name__ == '__main__':
Note: See TracChangeset
for help on using the changeset viewer.