+ operation = argv[1]
+ machine_name = argv[2]
+ args = argv[3:]
+
+ if operation == 'install':
+ options = dict(arg.split('=', 1) for arg in args)
+ valid_keys = set(('mirror', 'dist', 'arch', 'imagesize', 'noinstall'))
+ if not set(options.keys()).issubset(valid_keys):
+ print >> sys.stderr, "Invalid argument. Use the help command to see valid arguments to install"
+ return 1
+ if any(' ' in val for val in options.values()):
+ print >> sys.stderr, "Arguments to the autoinstaller cannot contain spaces"
+ return 1